Jay, 

The original requester was asking about auto-populating the roles based on 
using the ec2 described instances. 

Which is valid, I've written similar auto role populating scripts for scalr. 
It's great to not have to keep updating the roles list manually for an auto 
scaling farm when the information you need is only an API call away. 

I didn't find anything relevant on your site that addresses the same problem 
for newguy. 

Also I was less worried about WHAT they were trying to do, but how to better 
express HOW to do it in ruby and capistrano.

HTH 

On Nov 23, 2011, at 1:01 PM, [email protected] wrote:

> 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 <[email protected]> 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 <[email protected]> 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 [email protected]
>>> * To unsubscribe from this group, send email to 
>>> [email protected] 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 [email protected]
>> * To unsubscribe from this group, send email to 
>> [email protected] 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 [email protected]
> * To unsubscribe from this group, send email to 
> [email protected] 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 [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to