I’ve posted a similar method here: https://gist.github.com/3722252
This uses cloud-init rather than a custom script (pros and cons there) in
the user-data and works on recent Ubuntu AMIs. I believe Amazon have also
forked cloud-init to make it work on Amazon Linux, CentOS, etc. I’ve only
ever used it with Ubuntu though.
On 14 September 2012 15:04, Edward Sargisson email@example.com wrote:
Point 2 doesn’t require a custom AMI if you don’t want it to. You can do
autoscaling with a virgin AMI and use user-data bootstrapping to get
chef-client on there and running.
Details on my site here:
On Thu, Sep 13, 2012 at 9:15 AM, John Martinez firstname.lastname@example.org:
On Sep 13, 2012, at 9:01 AM, Daniel DeLeo email@example.com wrote:
On Thursday, September 13, 2012 at 7:46 AM, Maven User wrote:
Hi all -
With knife’s ec2 plugin (which is awesome), I can create and instance
from an ami, but I cannot go the other way.
The use case is this:
virgin ubuntu 12.X ami -> knife clone/bootstrap with our product ->
create ami from this instance (for consumption elsewhere)
Before I start diving down this rabbit hole, is/was there a reason NOT to
do this? Time? Or was there a technical reason? Does this feature exist
and I don’t see it?
Just curious, seems like a good feature to have but don’t want to waste a
ton of time if there was a technical reason NOT to do this.
Creating an AMI is an involved process. Most people only follow the
pattern you describe when their initial chef-client runs take a prohibitive
amount of time and they need really fast instance creation for things like
Concur. From my experience, the two main reasons I use to create custom
AMIs in AWS to use in conjunction with Chef:
- To cut-down on instance boot up time (as described by Daniel)
- You are using Autoscaling or CloudFormation where the knife API
command can’t be used
Systems Developer, Cloudreach Limited
Support Cloudreach at ByteNite http://goo.gl/dWWyT
Case Study: Transforming business at BRI http://goo.gl/ng4LJ
Cloudreach Limited is a limited company registered in England with registered number 06975407
The above terms reflect a potential business arrangement, are provided solely as a basis for further discussion,
and are not intended to be and do not constitute a legally binding obligation. No legally binding obligations
will be created, implied, or inferred until an agreement in final form is executed in writing by all parties involved.
This email may be confidential or privileged. If you received this communication by mistake, please don’t forward
it to anyone else, please erase all copies and attachments, and please let us know that it has gone to the wrong person.