pumpkinsWell, it’s that time of year again.   The leaves are turning, pumpkins everywhere and everyone but me is working on a costume.   Not only does late October mean Halloween but it means a new Ubuntu release.   As we all know, a new Ubuntu release means that the mirrors will be swamped and often unresponsive for at least a few days.   Sure, I have a local mirror in one location or another but working in just one place is so last century.   Well, this year, I thought I might do something about it.   I created a Ubuntu 8.04 LTS mirror in an EBS volume in Amazon’s EC2 using a JumpBox for LAMPd.

I know that a mirror in EC2 isn’t unique, RightScale is nice enough to provide one.   The interesting thing about this is that Amazon has recently made it possible to share EBS snapshots between users.   That means you can make a copy of my mirror and have your own mirror up and running in no time at very little cost.   Just follow these few simple steps:

  1. Sign up for JumpBox Cloud Gear. (Optional, see Note2)
  2. Log into the Amazon EC2 Console
  3. Launch the latest LAMPd Cloud Gear JumpBox AMI by searching for jumpbox-cloud-gear/lampd and selecting the latest one, this tutorial was made with jumpbox-cloud-gear/lampd-1.1.12. A small instance is fine, and make sure you launch it in a security group that has ports 22, 80, and 3000 open.
  4. Make note of the AMI instance ID and the Availability Zone.
  5. Go to Volumes and click Create Volume. Make the volume 60GB and put it in the same Availability zone as the AMI, use snapshot snap-3c58d855.
  6. Select this volume and Attach it as /dev/sdf to the Instance ID you recorded above.
  7. Get the Public DNS address of that AMI Instance and then visit your LAMPd JumpBox and go through JumpBox Configuration.
  8. After configuration is complete SSH to the JumpBox as the user admin and login with the password you chose during setup. Run the following commands:

    wget http://static.jumpbox.com/godber/misc/jumpbox-ebs-ubuntu-mirror/jumpbox-hardy-mirror-setup.sh
    sudo bash ./jumpbox-hardy-mirror-setup.sh
  9. Visit your AMI public address with your browser for details on using the mirror.

If anyone finds this useful, comment here and I will maintain the mirror and provide regularly updated snapshots.   Check the JumpBox Ubuntu Mirror page for updates.

NOTE: You will have to pay the standard Amazon Charges for the EBS volume, bandwidth and standard JumpBox Cloud Gear charges for access to the AMI.

NOTE2: Technically the EBS snapshot can be used by any AMI so signing up for JumpBox Cloud Gear is not required.   However, these instructions and the downloaded script are written for a LAMPd JumpBox.   So the process will need to be changed if you are not using a LAMPd JumpBox.   If you write instructions or a script for a different AMI and want to share, let me know and I will share them.

Thanks to m.prinke on flickr for the pumpkin picture.