Joe Wilcoxson
unread,Nov 3, 2009, 4:31:12 PM11/3/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to capis...@googlegroups.com
Hi, I'm looking for a way to manage systems in multiple datacenters/environments, each with their own gateway.
gateway 1 -> app1 app2 app3
gateway 2 -> app1 app2 app3
I get stuck when trying to set "gateway" within the same capfile after its already been set and was looking for a recommendation on how to approach this problem.
example: I can run "cap datacenter1:ifconfig datacenter2:ifconfig" but if i create a 3rd task consisting of these 2 tasks the first gateway is set and is re-used for the second task. "doboth" would yield the interface info for the appservers in datacenter1 twice.
namespace :datacenter1 do
set :gateway, "gateway1"
task :ifconfig, :roles => [:app] do
run "ifconfig -a"
end
end
namespace :datacenter2 do
set :gateway, "gateway2"
task :ifconfig, :roles => [:app] do
run "ifconfig -a"
end
end
task :doboth do
dnv:ifconfig
phl:ifconfig
end
Thanks for your time.
-Joe Wilcoxson