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

Ubuntu 13.04: Cannot provision, permission denied #2

Closed
jvandyke opened this issue Jan 9, 2014 · 3 comments
Closed

Ubuntu 13.04: Cannot provision, permission denied #2

jvandyke opened this issue Jan 9, 2014 · 3 comments
Assignees

Comments

@jvandyke
Copy link

jvandyke commented Jan 9, 2014

Trying to provision a Cabot instance on AWS, I get a permission denied error.

Steps:

  • Launch AWS instance using Ubuntu 13.04
  • Run Fabric provision task

I run:
$ fab provision -i ~/.ssh/my-aws-keypair.pem -H ubuntu@ec2-123-123-123-123.compute-1.amazonaws.com -u ubuntu

And get result:

[ubuntu@ec2-123-123-123-123.compute-1.amazonaws.com] Executing task 'provision'
[ubuntu@ec2-123-123-123-123.compute-1.amazonaws.com] put: bin/setup_dependencies.sh -> /tmp/setup_dependencies.sh
[ubuntu@ec2-123-123-123-123.compute-1.amazonaws.com] run: LOCAL_SSH_KEY="ssh-rsa [REDACTED] me@example.com" bash /tmp/setup_dependencies.sh
[ubuntu@ec2-123-123-123-123.compute-1.amazonaws.com] out: /tmp/setup_dependencies.sh: line 15: /etc/sudoers.d/ubuntu: Permission denied
[ubuntu@ec2-123-123-123-123.compute-1.amazonaws.com] out:


Fatal error: run() received nonzero return code 1 while executing!

Requested: LOCAL_SSH_KEY="ssh-rsa [REDACTED] me@example.com" bash /tmp/setup_dependencies.sh
Executed: /bin/bash -l -c "LOCAL_SSH_KEY=\"ssh-rsa [REDACTED] me@example.com\" bash /tmp/setup_dependencies.sh"

Aborting.
Disconnecting from ec2-123-123-123-123.compute-1.amazonaws.com... done.
@jvandyke
Copy link
Author

jvandyke commented Jan 9, 2014

I'll try again with 12.10 and see what happens.

@dbuxton
Copy link
Contributor

dbuxton commented Jan 9, 2014

Hi James - in our sample provision script included with this repository we run it as root not ubuntu which is why it's failing here. (Ubuntu version may make a difference too but I suspect not, we're not doing anything exciting). 

Probably this can be fixed easily by changing run on line 93 of fabfile.py to sudo. However I haven't tested (a) whether or not that works for AWS and (b) whether or not that will break provisioning on DigitalOcean. However can't see why it wouldn't.

I'd love for someone to do a proper provisioning script for this using Ansible or something. At the moment we actually use our own internal tools to provision so this method isn't particularly well tested. 

@ghost ghost assigned dbuxton Jan 10, 2014
@dbuxton
Copy link
Contributor

dbuxton commented Jan 10, 2014

@jvandyke try again with most recent update, I've just tested against both AWS (it didn't much like running on a micro instance, though) and DigitalOcean.

jerem added a commit to jerem/cabot that referenced this issue Nov 21, 2014
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

2 participants