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, [EMAIL PROTECTED] 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, "[EMAIL PROTECTED]","[EMAIL PROTECTED]",
"[EMAIL PROTECTED]"
role :web,
"[EMAIL PROTECTED]","[EMAIL PROTECTED]","[EMAIL PROTECTED]"
role :db,  "[EMAIL PROTECTED]", :primary => true
role :import, "[EMAIL PROTECTED]"

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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---


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

Reply via email to