RightScale Blog

Cloud Management Blog
Cloud Management Blog

The First Two RightImages are Now Available

Are you puzzled by the many public Amazon EC2 images that are available? They are all wonderful to get started with, and we all have to thank the many authors who have put a lot of work into creating them. But when we put a server into production we always feel like we should be 100% in control. We want to make sure there is nothing unknown on the images we are using. We also believe that even though we will be offering base images to our customers, some of them may want to recreate them themselves, “just to be sure.” Well, we finally found the right approach to creating base Amazon EC2 images: scripting.Our first RightImages are a Fedora Core 6 image and a CentOS 5 image, both generated entirely automatically. Our goals are:

  1. Create a fairly clean base image with just what we believe are the essentials.
  2. Create the image automatically using a script, this allow you to inspect all the details, create your own version of our image if you choose to, and it allows for easy maintenance.
  3. Put a few seeds onto the image that will support the new features we’re preparing in the context of the RightScale service (you can easily remove these if you want to use the image without RightScale).

Below is a description of the FC6 image we prepared, and you can download the script that we used to prepare it. To reproduce the image yourself, launch the Amazon Fedora Core 4 base image, log in, copy the script onto the image, edit the credentials in the script, and run the script. Then have lunch or dinner, and hopefully everything will have completed by the time you are done.

RightImage Fedora Core 6 Base, Version 2

Amazon AMI-ID: ami-2c8f6a45 The purpose of the Fedora Core 6 base image is to provide the bare essentials for a usable Amazon EC2 image. We started with a GroupInstall Base and made the following customizations.

yum Packages Added

  • wget – for retrieving web based files
  • mlocate – for fast file searching
  • nano – Alternative to Vi/Emacs
  • logrotate – Log Rotation
  • ruby – needed for EC2 and RightScale scripts
  • rubygems – needed for ruby work
  • syslog-ng – replacement to syslog, better remote logging, used by RightScale features
  • postfix – alternative to Sendmail, easier to set-up for most people
  • gcc/gcc-c++ – needed to compile software
  • zip/unzip
  • glibc libraries – these are needed and must be force installed for some software to work.

Non-yum-based Software Added

  • Java JRE 1.6.0su1 – used by the Amazon API tools
  • Amazon Kernel Headers linux-2.6.16-xenU – useful to compile kernel modules
  • Amazon EC2 AMI Tools – enable bundling
  • Amazon EC2 API Tools – EC2 command line tools
  • S3Sync – rsync-like functionality to sync local filesystem with S3
  • RightScale Software – fetches launch data into /var/spool/ec2

Enhancements Made

  • EC2 meta-data is fetched from 169.254.169.254 into /var/spool/ec2/meta-data
  • EC2 meta-data and user-data include files in /var/spool/ec2/metat-data for Bash and Perl.
  • EC2 Command Line tools in /home/ec2
  • AWS variables for EC2 and S3 are set in /etc/profile.d/ec2.sh
  • Java variables are set in /etc/profile.d/java.sh
  • Disabled password authentication in /etc/ssh/sshd_config
  • Modifications to /network config according to Amazon documentation
  • Modifications to /etc/rc.local to fetch ssh key
  • Creation of /opt/rightscale directory tree for RightScale add-ons, they consist on the following:

Services Disabled

The following services are not necessary on EC2 or were replaced by another service:

  • acpid
  • anacron
  • apmd
  • autofs
  • avahi-daemon
  • avahi-dnsconfd
  • bluetooth
  • cpuspeed
  • cups
  • dhcdbd
  • dund
  • firstboot
  • gpm
  • hidd
  • irda
  • irqbalance
  • kudzu
  • mdmpd
  • netplugd
  • NetworkManager
  • NetworkManagerDispatcher
  • nfslock
  • pand
  • pcscd
  • portmap
  • rdisc
  • readahead_later
  • rpcgssd
  • rpcidmapd
  • rpcsvcgssd
  • sendmail
  • smartd
  • syslog
  • wpa_supplicant
  • xfs
  • yum-updatesd (disabled to ensure an update does not break production)

Services Enabled

  • postfix
  • psacct
  • rightscale
  • syslog-ng

RightImage CentOS 5 Base, Version 1

Amazon AMI-ID: ami-268f6a4f The CentOS 5 image is pretty much identical to the FC6, except that some packages come in at different versions and we had to install syslog-ng from source. As above, you can download the script to generate the image. We would love to hear your feedback, especially if you feel that there is anything that we have missed.


Archived Comments

MingsVille
First of all, congrats on offering this great service :).I would like to give it a try, however, I am pretty set on using Debian Linux. Are you guys planning on rolling out a Debian Etch AMI anytime soon? Thanks.
Thorsten
Thanks for the nice words! We weren’t really planning on doing a debian based image at this stage – there’s only so much time in the day… But if we get a lot of requests… Also, there’s a question about ubuntu vs. etch. vs. … If you’re interested to help us put an image together please drop us an email. I’ve bundled debian images in the past, so I know what the necessary fixes are to the tools. But I’d have to figure out how to do the initial install onto a loopback filesystem.
Abner
I also congrats for this superb service and I also prefer to use debian or some ubuntu flavor.
Russler
Good work guys. The CentOS image rocks.Thank you again

Comments

[...] with some publicly available images, I started building my own by modifying their scripts for 32-bit and 64-bit Cent OS [...]
I'm trying to create a CentOS 5 image using the script provided. I'm getting the error below when the script tries to group install Base. Since i'm creating the image while running on a CentOS 5 machine, I;ve tried commenting the part which downloads yum and installs it and use the yum along with the OS installation on my machine, however the resulting error is exacly similar. I've also tried to use the CentOS DVD as well as the repository, however the error remains the same. Any pointers will be appreciated. Error: Setting up repositories Reading repository metadata in from local files primary.xml.gz 100% |=========================| 55 kB 00:01 centosplus: ################################################## 93/93 Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.main(sys.argv[1:]) File "yummain.py", line 94, in main result, resultmsgs = base.doCommands() File "cli.py", line 381, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "yumcommands.py", line 228, in doCommand return base.installGroups(extcmds) File "cli.py", line 1071, in installGroups self.doRepoSetup() File "cli.py", line 109, in doRepoSetup self.doSackSetup(thisrepo=thisrepo) File "__init__.py", line 341, in doSackSetup File "packageSack.py", line 331, in excludeArchs File "sqlitesack.py", line 589, in excludeArchs File "sqlitesack.py", line 431, in db2class File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 97, in __getattr__ raise AttributeError, key AttributeError: CHECKSUM_VALUE

Post a comment