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

api-umbrella-deploy user's password #99

Closed
dmolinaestrada opened this issue Feb 4, 2015 · 3 comments
Closed

api-umbrella-deploy user's password #99

dmolinaestrada opened this issue Feb 4, 2015 · 3 comments
Milestone

Comments

@dmolinaestrada
Copy link

I am trying to deploy from git (http://nrel.github.io/api-umbrella/docs/deployment/).
In this step "$ bundle exec cap production deploy", I need the api-umbrella-deploy's password. Which is?

Thank

@dmolinaestrada
Copy link
Author

I change a api-umbrella-deploy user's password and I can continue, but I get another error:

INFO [021cf794] Running /usr/bin/env mkdir -p /tmp/router/ as [email protected]
INFO [021cf794] Finished in 0.138 seconds with exit status 0 (successful).
....
INFO [d43c8069] Running /usr/bin/env sudo api-umbrella reload --router as [email protected]
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: sudo exit status: 1
sudo stdout: Nothing written
sudo stderr: sudo: no tty present and no askpass program specified

SSHKit::Command::Failed: sudo exit status: 1
sudo stdout: Nothing written
sudo stderr: sudo: no tty present and no askpass program specified

Tasks: TOP => deploy:restart
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as [email protected]: sudo exit status: 1
sudo stdout: Nothing written
sudo stderr: sudo: no tty present and no askpass program specified

I am deploying in Ubuntu 14.04

Thanks

@GUI
Copy link
Member

GUI commented Feb 5, 2015

In our default setup instructions, the "api-umbrella-deploy" user doesn't actually have a password. Instead, we have you setup ssh keys for that account so the logins all happen via those keys rather than with a passowrd. However, if you want to use a password, like you setup, that's also fine.

This second error you ran into is I believe an omission in our installation scripts that will be fixed in the upcoming v0.7 package release, but I forgot to document in the current instructions. If you want to fix this now, can you try adding the following file to your server at /etc/sudoers.d/api-umbrella:

Defaults:api-umbrella-deploy !requiretty

Cmnd_Alias API_UMBRELLA_DEPLOY_COMMANDS = /etc/init.d/api-umbrella,/usr/bin/api-umbrella
api-umbrella-deploy ALL=(ALL) NOPASSWD:API_UMBRELLA_DEPLOY_COMMANDS

After putting that file into place on the server, do your deployments now work?

@GUI GUI added this to the v0.7 milestone Feb 10, 2015
@GUI
Copy link
Member

GUI commented Feb 10, 2015

The new packages have been released which should include these sudoers fixes for deployments. So I'm going to close this issue, but please reopen if you're still running into any issues.

@GUI GUI closed this as completed Feb 10, 2015
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