Archive for May, 2010

Amazon EC2 Gentoo AMIs and the Cloud

Lately I have been very much traveling around and visiting different conferences related to cloud computing. I have been discussing a lot the assets and drawbacks for us at work to put some stuff into the cloud. Well, very soon I had to dig into the AWS. I had a look at all the available EC2 AMIs and I asked myself why there is no recent gentoo based x86_64 AMI for Amazons EC2. And in truth I needed a proper gentoo EC2 AMI asap to start testing.

So what’s wrong? Is it too much weird command line kung fu to create such an machine image? Or is there no demand for Gentoo x86_64 images? People don’t use Gentoo anymore since the Gentoo hype was over long before there was AWS? Gentoo people are unaware there is 64bit available and still stick to 32bit? AWS people don’t want Gentoo people to use Gentoo images since the Fedora machine images are much better for everyone? Yeah.

I deceided to roll out my own AMI. I did some research and read lots of articles about the different ways to create those machine images. Twenty minutes later I felt enlightened:

1. You can convert an existing xen image or
2. create your AMI with VMware and convert this or
3. you can use an existing AMI and base your AMI on it and so forth.

Sounds like crap. I like building things by my own and have more control on the inside of the result.
It took some time to figure out how to proceed and how to solve small emerging hurdles.

Working on a good build host it takes maybe twenty to thirty minutes from zero to have a basic AMI ready to go. Basically you need to create the AMI file, format it with some filesystem, mount the file as a loop device, extract an stage3 archive, install some requirements and modify some config files. The most time is wasted waiting for ec2-upload-bundle to complete. It’s enough time to get another cup of coffee, sit on the sofa and read some pages in the newspapers.

I think the result is pretty good already. I have completed different automations and have begun working on the details to create almost autonomous clusters, this is again funny stuff with crons, bash, sed, awk and perl.

EC2 is definitly very interesting. If you need some help with gentoo AMIs you can just sent me an email or put a line in the comments.

All the best, Emil