logo       

Problem with a new role: msg#00120

lang.ruby.capistrano.general

Subject: Problem with a new role


Hello.

We've been using capistrano sucessfully for a while now with the basic
roles (:app, :web and :db). Now we added a new server with a custom
role :import, that should have the actual release on it, but no
mongrels running.

The roles are configured like this:

role :app,
"root-Q0ErXNX1RuYjwlwYZV3FlQ@xxxxxxxxxxxxxxxx","root-Q0ErXNX1Rub7JcoBIUF6mw@xxxxxxxxxxxxxxxx",
"root-Q0ErXNX1RuZrj7GURp3nyw@xxxxxxxxxxxxxxxx"
role :web,
"root-Q0ErXNX1RuYjwlwYZV3FlQ@xxxxxxxxxxxxxxxx","root-Q0ErXNX1Rub7JcoBIUF6mw@xxxxxxxxxxxxxxxx","root-Q0ErXNX1RuZrj7GURp3nyw@xxxxxxxxxxxxxxxx"
role :db, "root-Q0ErXNX1Rub7JcoBIUF6mw@xxxxxxxxxxxxxxxx", :primary => true
role :import, "root-eEed58MKCH+l5wQoFSNtmw@xxxxxxxxxxxxxxxx"

The relevant tasks for handling the mongrel clusters are:

namespace :deploy do
task :start, :roles => :app do
mongrel.cluster.start
end

task :stop, :roles => :app do
mongrel.cluster.stop
end

task :restart, :roles => :app do
mongrel.cluster.restart
end
end

namespace :mongrel do
namespace :cluster do
[ :stop, :start, :restart ].each do |t|
desc "#{t.to_s.capitalize} the mongrel appserver"
task t, :roles => :app do
if stage.to_s == 'staging'
run "mongrel_rails cluster::#{t.to_s} -C #{mongrel_conf}"
else
run "monit -g mongrel #{t.to_s} all"
end
end
end
end
end

But when i deploy just to the import server with 'cap ROLES="import"
production deploy', capistrano always tries to restart the mongrel on
pimp01, even though it is definitely not an :app-server.

Why does capistrano think it has to restart the mongrel cluster on
that machine, and how does one configure this scenario so there's no
mongrel handling on pimp01 at all?




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise