2

I'm not even sure how to properly phrase this question, so please bear with me as I'm new with EC2 lingo/terminology. What I want to be able to do, is configure a template, if you must, and that templates will include say a LAMP stack that I work with consistently, and has all of the configs in place. All I would need to do is go in and change IPs around. How is this done in the world of EC2? Is it possible to create a template from an existing instance? Does it require firing up a new instance and still depending on tools such as Puppet/Chef/CFEngine to configure the instance once it's online? What if I'm running a cluster of web servers and want to fire one up on demand to alleviate load from the cluster. What's the fastest way to have that node up and running in the world of EC2?

imaginative
  • 1,941
  • 9
  • 32
  • 48

3 Answers3

2

Yes, this can be done, you can use the ec2-bundle-image command to create an AMI from an existing configured AMI. There are instructions on how to do this on the amazon web services website

user9517
  • 114,104
  • 20
  • 206
  • 289
0

If it's an EBS store instance (not instance store) you can easily create an image using the ec2 management console. The image can then be used to create new instances.

0

There are two ways to go about this

  • do it yourself (have either premade templates for each role or run a small 'naked' image that will use some configuration management and become a functional instance from your point of view)
  • use pros that do it - scalarium or rightscale

for do it yourself there are different ways to it but in essence you would need bundle into a image a bootstrap script that will set the connection to your cfengine server or have all the possible 'recipes' already bundle (hard to maintain), then run cfagent.

how you manage cfengine it can be as simple - if a file is into a location then cfagent will do some actions (install a web server, configure it etc.). one of the problems with cfengine is the key distribution for authorization but it can be very well scripted.

a different path is to have for each role into the infrastructure a pre made image that contains all the software it needs.

silviud
  • 2,677
  • 2
  • 16
  • 19