[ec2-beta] Automated bundling?

Eric Hammond ehammond at thinksome.com
Fri Jan 30 21:04:33 GMT 2009


James:

When the image includes the EC2 AMI tools, rebundling a running instance 
comes down to just a couple commands like:

   time ec2-bundle-vol              \
     -r $arch                       \
     -d /mnt                        \
     -p $prefix                     \
     -u $AWS_USER_ID                \
     -k /mnt/pk-*.pem               \
     -c /mnt/cert-*.pem             \
     -s 10240

   ec2-upload-bundle                \
       -b $bucket                   \
       -m /mnt/$prefix.manifest.xml \
       -a $AWS_ACCESS_KEY_ID        \
       -s $AWS_SECRET_ACCESS_KEY

   ec2-register $bucket/$prefix.manifest.xml

You can find more in the EC2 Getting Started Guide:

   http://ec2gsg-creating.notlong.com

The hardest part of this is getting the private key and certificate 
files uploaded to the instance.  Note: If you plan to make the image 
public, there are other security considerations not suitable for this 
short note.

The community Ubuntu AMIs on http://alestic.com already come with the 
EC2 AMI tools installed and it looks like the official Ubuntu beta AMIs 
should get them soon :)

If you want to build Ubuntu AMIs from scratch, I publish the 
ec2ubuntu-build-ami script linked to from the "Build Script" section of 
http://alestic.com which many folks are using.  There is also an EC2 
plugin being developed for the new Ubuntu vmbuilder package which will 
do the same thing when it is released.

That said, I generally recommend to folks that they not bundle their own 
AMIs, but first try to use the user-data script hook to have a base 
public AMI customize itself at boot.

Application data should never be stored on an AMI, but should be 
accessed through EBS, S3, SimpleDB, or the like.

--
Eric Hammond
ehammond at thinksome.com



James Wyatt wrote:
> Hello,
> 
> Just a suggestion for dev efforts. The biggest barrier for a lot of ec2 
> users is bundling their own AMIs. Automating this would greatly reduce 
> the technical expertise required to effectively use ec2.
> 
> Jim Wyatt
> 
> 




More information about the Ec2-beta mailing list