[chef] Re: Automatically starting a new EC2 instance with Chef


Chronological Thread 
  • From: Bryan Brandau < >
  • To:
  • Subject: [chef] Re: Automatically starting a new EC2 instance with Chef
  • Date: Sat, 14 May 2011 09:37:21 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vqGj+m9nJ6wHeqLTkdHTbUsgEEDQsePi07C3GGOWgAwnLwaHyFer+OZhae2ygVrJHG pBzDi4kpi+TIZM3AfZnIfOugtRrvq23H94kX/mKq998RgJCufSODMagvC5BCc1tXlHpU O36IU5BaAw0rmWtPMneI0dnvow1VQu2nhFPLI=

You can use AWS auto scaling.  Create an AMI with chef-client on it and your launch configuration for auto scaling should pass in the user data that you would get from "knife ec2 instance data".  You can then run with a minimum and desired instances of 1.

I would build a fully functional AMI that is fairly baked with your chef run.  This would minimize your downtime when that instance becomes unhealthy.  Chef then just acts as the enforcer of the configuration.

On Sat, May 14, 2011 at 8:55 AM, Edward Sargisson < "> > wrote:
Hi all,
What tools and services are available to automatically start a new EC2
instance with Chef?

My site has just one server and yesterday it failed. Unfortunately, I
was at my day job and couldn't do anything about it. It's configured
with Chef so starting up a new server with knife then using Opscode
Platform to put the roles on was reasonably easy (it could be easier
but I have some issues to fix).

What I would like is for some service to realise that my server is
down and then call Chef to setup a new one. Amazon Auto Scaling almost
does this - the issue is that it merely starts an AMI and doesn't do
anything cleverer than that. My Chef setup assumes a brand new Ubuntu
image and goes from there. I suppose that, for future use, whatever
solution I use needs to also listen to the CloudWatch metrics to scale
up and down when required.

So:
Do I write an image which bootstraps chef automatically?
Or is there some other way to solve this problem?

Thanks,
Edward




Archive powered by MHonArc 2.6.16.

§