logo       

Re: Problem with a new role: msg#00123

lang.ruby.capistrano.general

Subject: Re: Problem with a new role

If all you want to do is push the code to that role, I'd suggest using deploy:update, instead of a full deploy. The ROLES=import setting on the command-line does not mean "only run tasks associated with this role", it means "use this role for all tasks". It's not really very useful for deployment, as you discovered. It's primary purpose is to restrict tasks like "invoke" or "deploy:setup".

- Jamis

On Dec 19, 2007, at 2:08 AM,
alexander.graefe-gM/Ye1E23mwN+BqQ9rBEUg@xxxxxxxxxxxxxxxx wrote:


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?


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to
capistrano-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@xxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---


Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

News | FAQ | advertise