Using UEC consists of creating and registering images with the Cloud Controller.

There is more than one way to obtain a virtual image:

  • Download an image from the network, bundle and upload it
  • Create a custom image using VMBuilder
  • Use the Image store to download and install and image

Here we will describe the process of downloading one of the daily builds that are built and published automatically. The process is similar for Official Released Images

Note: the shell variables that are set in the below code snippets are very useful for scripts or to reuse them when typing commands.

  1. Download the UEC image for the architecture you want. You can do it from your browser or from the command line:
    TIMESTAMP=$(date +%Y%m%d%H%M%S)
    ARCH=amd64    # Or this might be i386
    [ $ARCH = "amd64" ] && IARCH=x86_64 || IARCH=i386
    [ ! -e $UEC_IMG.tar.gz ] &&  wget $URL/$UEC_IMG.tar.gz # This may take a bit, depending on your connectivity
  2. Next, you will need to bundle, upload and register. The cloud-utils package contains a utility named 'uec-publish-tarball' that makes this a one step process. Also available in that package is 'uec-publish-image' operates on an unpacked image rather than a tar file:

    uec-publish-tarball ${UEC_IMG}.tar.gz "${RELEASE}-${TIMESTAMP}" "${ARCH}"

    Alternate: The following is not needed if you've used uec-publish-tarball. It is left as documentation of the full process

    1. Unpack the UEC image tarball
      [ ! -e $UEC_IMG.img ] && tar -S -xzf $UEC_IMG.tar.gz
    2. Bundle the kernel
      euca-bundle-image -i $UEC_KERNEL -r $IARCH --kernel true
      euca-upload-bundle -b $BUCKET_KERNEL -m /tmp/$UEC_KERNEL.manifest.xml
      EKI=$(euca-register $BUCKET_KERNEL/$UEC_KERNEL.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $EKI
    3. Bundle the initrd (Note: some kernels may not need a ramdisk. If no ramdisk is present, skip this step)

      euca-bundle-image -i $UEC_INITRD -r $IARCH --ramdisk true
      euca-upload-bundle -b $BUCKET_INITRD -m /tmp/$UEC_INITRD.manifest.xml
      ERI=$(euca-register $BUCKET_INITRD/$UEC_INITRD.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $ERI
    4. Bundle the image itself (this can take some time)
      euca-bundle-image -i $UEC_IMG.img -r $IARCH --kernel $EKI ${ERI:+--ramdisk ${ERI}} # This will take a long time (~10m)
      euca-upload-bundle -b $BUCKET_IMAGE -m /tmp/$UEC_IMG.img.manifest.xml
      EMI=$(euca-register $BUCKET_IMAGE/$UEC_IMG.img.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $EMI
  3. Now, your kernel, ramdisk and image will have been uploaded into Eucalyptus and should be ready to run. To confirm, run the following command:
    You should see a registered kernel, ramdisk and image and they should be marked as 'available'.

UEC/BundlingImages9.10 (last edited 2010-04-08 22:26:11 by kirkland)