I'm not concerned with deploying to all of them at once. On the
contrary, just one at a time is preferred. The following additions to
my deploy.rb seem to do the trick so far. We can define the whether or
not to deploy to the QA or LIVE directories, and for which instance of
the app. Still gotta figure out how to make sure it restarts the right
mongrel_cluster but.. so far, so good. I'll toy with the next step on
Monday.
task :before_setup do
if ENV['INST'].blank?
puts "INST='instance_name' required!"
raise 'Instancename Required'
else
section = 'qa'
section = 'live' if ENV['LIVE'] == 'true'
set :deploy_to, "/var/#{section}/#{ENV['INST']}"
end
end
task :before_deploy do
if ENV['INST'].blank?
puts "INST='instance_name' required!"
raise 'Instancename Required'
else
section = 'qa'
section = 'live' if ENV['LIVE'] == true
set :deploy_to, "/var/#{section}/#{ENV['INST']}"
end
end
rake remote:setup INST=ponies
rake remote:setup INST=ponies LIVE=true
rake deploy INST=ponies
rake deploy INST=ponies LIVE=true
Jamis Buck wrote:
> Jon,
>
> I've never done this (and would be curious to hear from people who
> have), but my recommendation would be to see if something like the
> following would do the trick:
>
> LIST_OF_DEPLOY_DIRS = %w(/var/client1 /var/client2 /var/client3)
>
> task :deploy_to_all_clients do
> LIST_OF_DEPLOY_DIRS.each do |dir|
> set :deploy_to, dir
> deploy
> end
> end
>
> (That may very well NOT work--capistrano caches the values of some
> variables, which may defeat the dynamic changing of the deploy_to
> variable.)
>
> - Jamis
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---