use Amazon EC2 tools in Capistrano to get the servers to push the code
- by APZ
I am trying to use EC2 tools to get all the machines with a particular tag in some type of array in /config/deploy/prod.rb file in Capistrano. Something like this:
In prod.rb file:
//untested command
workers-array[]=$(ec2-describe-instances -F vpc-id=1234 -F tag:Env=prod -F tag:SystemType=worker)
for(i=0;i<workers-array.len;i++){
role :worker-A, workers-array[i]
}
I am not sure how we can do this in capistrano, am new to ruby too.
Guys any help on this would be really appreciated.