Centos 5 AMI for Amazon EC2 install script October 29th, 2008
Excited about the load balancing, auto-scaling and other new features coming to Amazon EC2?
Here's a script to bootstrap a lean 32bit Centos 5 into m1.small AMI-form for use on EC2. I started with the Rightscale scripts and removed the interactivity and RightScale specifics and added some features: it's using a mirror based yum config to do a base install and I added the same scripts you can find on the Fedora AMI from Amazon itself to update the ec2-ami-tools and kernel-modules. I also included a couple of Dag's packages like dstat and others from RPMForge
Insert your AWS specifics in the top of the file, choose a bucket to store the bundles AMI in, and give your image a nice name. To bootstrap just launch a Fedora 8 instance (use ami-2b5fba42), copy over the script, your certificate and key, and run the script. With some luck - and no boobo on my part - you should see this in your terminal at the end:
Done! Put a fork in it!
Baking the AMI can take a while, so be patient. Afterwards you need to register this AMI so it shows up in your ec2-describe-images -o self command:
This is currently for a 32bit m1.small AMI only, I'm hoping to use some kind of template system to be able to bake a similar script for 64bit and 32bit AMI's alike.