ec2-osol-bundle /

These scripts automatically (re)bundle an OpenSolaris AMI.
All you need to do is:
- Upload your private key to /mnt/keys/pk.pem
- Upload your cert to /mnt/keys/cert.pem
- add your personal details to private_vars.sh
To turn your current system into a private AMI you can re-launch run:
./package_and_publish.sh
package_and_publish.sh will copy the default rpool, bundle it into an AMI, then
upload the AMI to the ec2 bucket you specified in private_vars.sh
OpenSolaris AMIs are made by using a loopback device at /mnt/osol.img.
The loopback device is added to be a mirror of rpool. It takes about 20
minutes for the image to resilver (synchronize with) rpool.
Your image file will be the size of your rpool zpool but the image is
(hopefully) mostly unallocated space. The image tools will compress the image
for you.
NB: The 2008.11 AMIs include private ssh host keys by default and they
never get regenerated.
If you would like each of your images to have unique host keys do the following
two steps *before* bundling your AMI:
- rm /etc/ssh/ssh_host*
- edit /lib/svc/method/sshd
- On line 53 remove "[ -f /.livecd ] && "
All steps and most of the scripts were adapted from:
http://www.sun.com/third-party/global/amazon/Sun_AmazonEC2_GettingStartedGuide.pdf
Good luck,
-Matt
matt@genges.com