[chef] Re: Attach an ec2 instance on the existing ELB


Chronological Thread 
  • From: Morgan Blackthorne < >
  • To: " " < >
  • Subject: [chef] Re: Attach an ec2 instance on the existing ELB
  • Date: Thu, 30 May 2013 04:46:41 -0700

I would look at elasticbeanstalk if it can support your needs; integrating chef with EB makes things easy to manage and Amazon does the heavy lifting on the EC2/ELB side of the equation. Bear in mind you can migrate the ElasticBeanstalk config to an Ubuntu AMI (that's what I'm doing for Rosetta Stone). Not necessarily easily, but doable.

On Thursday, May 30, 2013, Chandan Maheshwari wrote:
Hi,

I am able to create AS config and then AS group and then create instances in AS group which in turn gets attached to ELB. But that is all using command line tool that I took from  : http://aws.amazon.com/developertools/2535

In this case following http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/ it is doing the job. But in this case steps like creation of instance, chef-client installation, registering to chef-server, running run_list, is performed using user-data script. I am basically not using knife-ec2 plugin.

How can I achieve those tasks pointed in my last email(creation of AS group and then attaching it to ELB), using knife-ec2 plugin or using some other API cooking inside my cookbook/recipe.

Is there any API or gem like right_aws? [which may support ELB and VPC both]



On Wed, May 29, 2013 at 1:33 PM, Chandan Maheshwari < ');" target="_blank"> > wrote:
Thanks Nick,

But I tried to search on AWS console and didn't found any way of attaching/associate AS with ELB. I then found a command line tool for autoscaling. Is this the same you are referring to use. In that case I have some doubts, as I have not used them much :

1) Can you please explain how to create AS group.
2) After step 1) how can I associate ELB with the AS group, again is it one time activity?
3) How the first instance (ec2 created using knife), will be associate with AS group or ELB?
3) Once the step 2 is done (AS is now associated with ELB), how the new nodes created (ec2 instances) will automatically have the AS group. I cant find any option with knife ec2 server create.

Chandan



On Wed, May 29, 2013 at 11:21 AM, nick hatch < ');" target="_blank"> > wrote:
On Tue, May 28, 2013 at 9:16 AM, Chandan Maheshwari < ');" target="_blank"> > wrote:

Is there any other way of doing this.


Yes -- consider not doing it at all.  While there may be valid reasons for taking this approach, I think it might be worthwhile to reevaluate the problem and see if you really need to use chef to manage your ELBs.

An alternative is to associate the ELB with the AS group, so that nodes automatically register. Use a robust health check @ the ELB so that nodes aren't routed traffic unless they can serve the requests successfully. (You'll want a good health check anyways so when things go bump in the cloud, unhealthy nodes aren't attempting to serve requests. )

I've had tens of thousands of instances go through this life-cycle and it works quite well.

AWS's tooling here is good and battle-tested. It seems that Chef's might not be. If it hurts to use your configuration management framework to manage your ELBs, perhaps you shouldn't do that.

There's also probably an argument to be made that introducing Chef as an actor in AS/ELB introduces some complexity around fate sharing that can be problematic if not done carefully.

-n



--
Regards,
Chandan



--
Chandan Maheshwari,
Cloud Softwate Engineer, Clogeny Technologies,
(M) 0091-8956541752
Skype: chandan.maheshwari16


--
--
~*~ StormeRider ~*~

"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS




Archive powered by MHonArc 2.6.16.

§