Forum: Rails deployment Deploying mongrel_cluster without sudo rights

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E4afe00726a6db914982c25c4c91fde8?d=identicon&s=25 Steve (Guest)
on 2007-02-15 19:23
(Received via mailing list)
Hello all,

I am in the looking at capistrano to deploy our near future Rails
application on RHEL 4.4 servers. I followed the instructions at the
site below and everything worked fine.
http://mongrel.rubyforge.org/docs/mongrel_cluster.html

After meeting with the SAs I was told that username used to deploy the
apps will not have access to sudo. Its seems that all the
mongrel_cluster recipes require sudo to start/stop/restart mongrel
cluster.

When I run the mongrel cluster without sudo everything "looks" ok but
the mongrel cluster does not start. No process is spawned. I get no
errors or indication that a problem occurred:

Starting 2 Mongrel servers...
mongrel_rails start -d -e production -p 8000 -a 127.0.0.1 -P
/opt/apps/subscribe/rails-test-app/shared/mongrel.8000.pid -c
/opt/apps/subscribe/rails-test-app/current --user mongrel--group apps
mongrel_rails start -d -e production -p 8001 -a 127.0.0.1 -P
/opt/apps/subscribe/rails-test-app/shared/mongrel.8001.pid -c
/opt/apps/subscribe/rails-test-app/current --user mongrel --group apps

Does anyone know a way around this problem? I also need to the cluster
to start whenever the machine starts. I am no Linux expert so I am not
sure what my options are. Is sudo access something that I should fight
over?

Thanks,
Steve
E4afe00726a6db914982c25c4c91fde8?d=identicon&s=25 Steve (Guest)
on 2007-02-15 20:02
(Received via mailing list)
Hi all,

It turned out it was my fault for 2 reasons:
1. In the deploy.rb I needed to set :use_sudo to false. Capistrano now
deploys, and restarts the mongrel clusters successfully.
2. The user that I was testing at the command line on the Linux box
was not the user I was using for the deployment and therefor did not
have the same rights.

I hate making these stupid mistakes.

Steve
This topic is locked and can not be replied to.