Hi D,

I would suggest not to complicate the deployment using ec2 tools.

You can do the deployment without the tools.  

Just connect to the instance  via the key. Run the apt-get packages.  -) then 
Deploy using capistrano.

More on this at my blog:  recipe4developer.wordpress.com

Cheers!

Jay

On Nov 22, 2011, at 8:02 PM, Donovan Bray <donno...@gmail.com> wrote:

> It should probably look something like this:
> 
> //untested command
> run_locally("ec2-describe-instances -F vpc-id=1234 -F tag:Env=prod -F 
> tag:SystemType=worker").each_line do |worker|
>   server worker, :worker_a 
> end
> 
> notes: 
> 
> symbols ( the words that start with :  ) don't like dashes use underscores 
> and keep them lowercase. 
> 
> You can populate roles by passing an array, or you can add individual servers 
> to a role with the server helper; which lends itself nicely to processing 
> with each and a block. 
> 
> I used run_locally both because I believe it is more declarative, ... and my 
> phone doesn't have back ticks. 
> 
> On Nov 21, 2011, at 8:55 AM, newguy <aimanparv...@gmail.com> wrote:
> 
>> Hi guys,
>> 
>> 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.
>> 
>> Thanks
>> 
>> -- 
>> * You received this message because you are subscribed to the Google Groups 
>> "Capistrano" group.
>> * To post to this group, send email to capistrano@googlegroups.com
>> * To unsubscribe from this group, send email to 
>> capistrano+unsubscr...@googlegroups.com For more options, visit this group 
>> at http://groups.google.com/group/capistrano?hl=en
> -- 
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to capistrano@googlegroups.com
> * To unsubscribe from this group, send email to 
> capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to capistrano@googlegroups.com
* To unsubscribe from this group, send email to 
capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to