Thursday, March 31, 2011

Shell scripting to generate an EC2 image

I am getting started with Amazon EC2 and it looks like the best way to go is to generate scripts that take a base OS image and configure the OS/apache/php/mysql after boot-up. That way you can always change base images without having to redo everything.

Sometimes when you do an apt-get install on a package, it asks you configuration questions during the installation. How do you deal with that inside a script?

Also, if you need to edit a configuration file as part of the install process how do you deal with that? Do you make a copy of the modified file and store it on a server where it can be downloaded into the instance and overwrite the default file?

From stackoverflow
  • You can configure your images using parameterized data. See here for details.

  • You can also use a service like RightScale.com. They provide a handy interface for free.

0 comments:

Post a Comment