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

Unable to run cap production puma:jungle:install #3

Closed
kyledecot opened this issue Oct 28, 2013 · 7 comments
Closed

Unable to run cap production puma:jungle:install #3

kyledecot opened this issue Oct 28, 2013 · 7 comments

Comments

@kyledecot
Copy link
Contributor

When attempting to run cap production puma:jungle:install I get:

DEBUG Uploading /tmp/run-puma 0.0%
 INFO Uploading /tmp/run-puma 100.0%
 INFO [7c6dec29] Running chmod +x /tmp/run-puma on 162.243.33.179
DEBUG [7c6dec29] Command: chmod +x /tmp/run-puma
 INFO [7c6dec29] Finished in 0.264 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/puma 0.0%
 INFO Uploading /tmp/puma 100.0%
 INFO [f32b7752] Running chmod +x /tmp/puma on 162.243.33.179
DEBUG [f32b7752] Command: chmod +x /tmp/puma
 INFO [f32b7752] Finished in 0.268 seconds with exit status 0 (successful).
 INFO [a0a78463] Running sudo mv /tmp/run-puma /usr/local/bin/run-puma on 162.243.33.179
DEBUG [a0a78463] Command: ( RAILS_ENV=production sudo mv /tmp/run-puma /usr/local/bin/run-puma )
DEBUG [a0a78463]    [sudo] password for deploy:

The problem is that my deploy user doesn't have a password. What would you suggest?

@seuros
Copy link
Owner

seuros commented Oct 29, 2013

i added this line to my sudoer file (/etc/sudoer.d/deploy)

deploy ALL=NOPASSWD:/usr/sbin/service, /bin/mv, /usr/sbin/update-rc.d,/usr/bin/touch

But i think it bad, since it give deploy user the right to move files. You can always remove the ' /bin/mv, /usr/sbin/update-rc.d,/usr/bin/touch' reference after installation.

I'm thinking about another solution that won't require such privilege.

I will be updated the gems to reflect this soon. The next version will have jungle tasks as option.

@kyledecot
Copy link
Contributor Author

Okay, now it appears to be trying to run RAILS_ENV=production sudo update-rc.d -f puma defaults which doesn't work on centos and returns w/ a sudo: update-rc.d: command not found.

@seuros
Copy link
Owner

seuros commented Oct 29, 2013

yes. Centos/Redhat uses chkconfig instead update-rc.d.
you have to run

 chkconfig --add puma
 touch /etc/puma.conf #to create the conf file.

can you check if centos has : service ?

I will install centos tonight and try to make it work

@kyledecot
Copy link
Contributor Author

Centos does have service. I ran the two commands above (ssh'ed in as the deploy user). Executing service puma now gives me

/etc/init.d/puma: line 28: /lib/init/vars.sh: No such file or directory

@seuros
Copy link
Owner

seuros commented Nov 5, 2013

Can you comment line 28 of /etc/init.d/puma and see if it compatible ?
This gist https://gist.github.com/niwo/4526179 and https://fedoraproject.org/wiki/Packaging:SysVInitScript?rd=Packaging/SysVInitScript#Initscript_template might be useful.

Note: The gist is not fully compatible with the paths(state,pid) of the current setup.

We will have to write another compatible start-up script if this fail.

@seuros
Copy link
Owner

seuros commented Nov 20, 2013

@kyledecot , i updated the gem and it should now support Centos. Can you test it in your side ?

@seuros seuros closed this as completed Dec 10, 2013
@khiem-nguyen
Copy link

@seuros Bug on Amazon linux(Fedora), install debian instead of rhel

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

No branches or pull requests

3 participants