Re:How I migrated from Heroku to Digital Ocean with Chef and...
by danso on Thursday March 07, 2013 @08:20AM
(#5337414)
This was a very helpful and practical tutorial. I don't know why sysops is a source of perpetual confusion for me but it's good to have as many examples as possible. Could you elaborate on the actual hoops that creating a non-root user was creating for you?
[ Parent
| on HN ]
Re:How I migrated from Heroku to Digital Ocean with Chef and...
by matteodepalo on Thursday March 07, 2013 @08:29AM
(#5337454)
First of all I didn't know whether to provision my machine with root or not. Scraping through sysadmin resources I found people installing Ruby with the "deployer" user and people using root for that task. When I tried installing Ruby with deployer I got many permission errors, but I realize that was caused in large part by my lack of experience with sysadministration.
Also, running processes with runit as non-root requires extra [care][1] and I just wanted to get everything up and improve my scripts AFTER I knew that my setup was viable.
Edit
One more thing: I couldn't install ruby-shadow, which is needed to handle passwords with chef, due to some errors with the version of ruby I had.
Re:How I migrated from Heroku to Digital Ocean with Chef and...
by rschmitty on Thursday March 07, 2013 @08:58AM
(#5337555)
With rbenv you can install ruby directly to your deploy user, no sudo required as it installs to your home directory
https://github.com/sstephenson/rbenv/wiki/Deploying-with-rbe...
Re:How I migrated from Heroku to Digital Ocean with Chef and...
by matteodepalo on Thursday March 07, 2013 @09:04AM
(#5337577)
Thanks, I'll try it as soon as I can :-)
Re:How I migrated from Heroku to Digital Ocean with Chef and...
by thibaut_barrere on Thursday March 07, 2013 @09:25AM
(#5337681)
You can deploy the infrastructure with root (or a sudoer), and run the app as a regular user (which is quite often called "deploy" in capistrano recipes).
Re:How I migrated from Heroku to Digital Ocean with Chef and...
by calgaryeng on Thursday March 07, 2013 @11:25AM
(#5338464)
If I am deploying an application with "deploy" (i.e. non-priviliged), it is ok to also run Unicorn as deploy? Or should it be run as nobody or www-data ?