Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration still rather choppy #131

Open
arokem opened this issue Jan 25, 2018 · 3 comments
Open

Configuration still rather choppy #131

arokem opened this issue Jan 25, 2018 · 3 comments

Comments

@arokem
Copy link
Member

arokem commented Jan 25, 2018

Running on an AWS machine, after installing docker (with apt-get) and cloudknot (with sudo python setup.py install), I try to run cloudknot configure. I found that I cannot run this as a user (presumably because I need to run docker as sudo?).

And when I try to configure using sudo, I get:

ubuntu@ip-172-31-11-136:~$ sudo cloudknot configure
sudo: unable to resolve host ip-172-31-11-136

`cloudknot configure` is passing control over to `aws configure`. If you have already configured AWS CLI just press <ENTER> at the prompts to accept the pre-existing values. If you have not yet configured AWS CLI, please follow the prompts to start using cloudknot.

AWS Access Key ID [None]: XXXXXXXXXXXX
AWS Secret Access Key [None]: XXXXXXXXXXXX
Default region name [None]: us-west-2
Default output format [None]: 

`aws configure` complete. Resuming configuration with `cloudknot configure`

AWS profile to use [default]: 
Default region name [us-east-1]: us-west-2
Traceback (most recent call last):
  File "/usr/local/bin/cloudknot", line 9, in <module>
    load_entry_point('cloudknot==0.3.dev0', 'console_scripts', 'cloudknot')()
  File "/usr/local/lib/python2.7/dist-packages/cloudknot-0.3.dev0-py2.7.egg/cloudknot/cli.py", line 40, in main
    command.run()
  File "/usr/local/lib/python2.7/dist-packages/cloudknot-0.3.dev0-py2.7.egg/cloudknot/commands/configure.py", line 106, in run
    setter(new_value)
  File "/usr/local/lib/python2.7/dist-packages/cloudknot-0.3.dev0-py2.7.egg/cloudknot/aws/base_classes.py", line 444, in set_region
    response = clients['ec2'].describe_regions()
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 317, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 602, in _make_api_call
    operation_model, request_dict)
  File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 143, in make_request
    return self._send_request(request_dict, operation_model)
  File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 168, in _send_request
    request = self.create_request(request_dict, operation_model)
  File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 152, in create_request
    operation_name=operation_model.name)
  File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 227, in emit
    return self._emit(event_name, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 210, in _emit
    response = handler(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/signers.py", line 90, in handler
    return self.sign(operation_name, request)
  File "/usr/local/lib/python2.7/dist-packages/botocore/signers.py", line 154, in sign
    auth.add_auth(request)
  File "/usr/local/lib/python2.7/dist-packages/botocore/auth.py", line 352, in add_auth
    raise NoCredentialsError
botocore.exceptions.NoCredentialsError: Unable to locate credentials
@arokem
Copy link
Member Author

arokem commented Jan 25, 2018

If I first create the .aws/credentials file first (w/o sudo) and then run sudo cloudknot configure the configuration completes fine, but I worry that I will have to run all of my CK code under sudo (because of docker...).

@arokem
Copy link
Member Author

arokem commented Jan 25, 2018

Looks like linux users should do this before installing cloudknot: https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user

@arokem
Copy link
Member Author

arokem commented Mar 28, 2018

Still an issue... Just ran this on my mac laptop. On the first time through, I got the "unable to locate credentials" error. Then I ran it again, and it completed fine. Seems like something needs to happen before configuring the AWS account and the cloudknot-specific configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant