- From: Edward Sargisson <
>
- To:
- Subject: [chef] Re: Re: Automatically starting a new EC2 instance with Chef
- Date: Fri, 27 May 2011 22:30:01 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=FvE2oNAyybpwwjQMyiKPnbKwxXMNkUZuWBpQh00ebKrsk0Xs8/Zxq+4i2dnbcvkycq OCAiWPWofH2jdiulZtLPzV4Fgsit1sQsev/L0XmQzCtDCg4cvAPA9p4hJ//Qqus02rcb /xddd42GiJ2EC5+AGd3JZ+sG4uzP48rfnSGXY=
Hi all,
I followed the advice (and made great use of Avishai's user data
script) and now have my site running so that AWS Elastic Load
Balancing will automatically detect an instance going down and bring
another back up - configured from the standard OS image using Chef.
I hope I don't breach the standards of this list by including a link
to the blog post I've written which details all the steps.
http://www.trailhunger.com/blog/technical/2011/05/28/keeping-an-amazon-elastic-compute-cloud-ec2-instance-up-with-chef-and-auto-scaling/
Many thanks,
Edward
On Sat, May 14, 2011 at 12:36 PM, Avishai Ish-Shalom
<
>
wrote:
>
If you want to achieve this goal with the minimum amount of work, create
>
a launch configuration with a user data script that installs ruby,
>
installs chef, write the validation certificate, chef config and
>
bootstrap json then launch chef. Ubuntu images are bundle with
>
cloud-init which is able to read shell scripts from user data. In other
>
words, edit the attached script and use that as the user data for new
>
instances or autoscaling groups.
>
>
BTW, a native chef plugin for cloud-init is waiting to be merged. If and
>
when it's included, launching ubuntu images with chef will become
>
ridiculously easy.
>
>
Regards,
>
Avishai
>
>
>
On 14/05/11 16:55, 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.