Create Custom Grid appliance Image on Futuregrid

From Grid-Appliance Wiki

Jump to: navigation, search

This tutorial describe how to package custom images with grid-appliance application and make them available on Futuregrid.

Contents

Pre-requisites

  1. A Futuregrid account. Please follow the account creation process if you don't already have one.
  2. You should be able to run and access your own instances using ssh described in this Guideline
  3. A credential file (.zip file) downloaded from your Futuregrid Eucalyptus account page
  4. (Optional) Upload and register your own custom image to the Futuregrid. This step is only required if you want to use some other images instead of pre-packaged images already available on Futuregrid.

Setup

  1. On the Futuregrid cloud, run an instance of an image that you want to apply grid appliance onto using the following command:
    euca-run-instances -k mykey emi-XXXXXXXX
    Note:
    • Replace emi-XXXXXXXX with the image's emi number that you want to use (You can use one of the tested images listed on the bottom of this page)
    • If you're using a 64-bit image, you may need to add -t c1.medium option to the above command
  2. Make sure your instance has enough disk space on the mounted directory (/mnt) for a new image (the required disk space should be roughly twice the size of your base image plus additional applications' disk usage you're planning to install). If your instance doesn't have enough disk space, follow this instruction on how to create and attach an additional disk volume to a running instance.
  3. Transfer the credential zip file to the instance using the following command:
    scp -i mykey.private euca2-XXXX-x509.zip root@<ip.address>:

Packaging

  1. Use ssh to login into the running instance as root
  2. Install unzip,rsync and euca2ools if they're not already present in your system
  3. Unzip the credential file into /mnt directory and remove the original zip file so it won't be included into the newly built image
    unzip euca2-XXXX-x509.zip -d /mnt
    rm euca2-XXXX-x509.zip
  4. Install grid appliance using this instruction or manually download and install from our deb package . Also install all the software you want to include in the final image
  5. Before starting to bundle image, change to the /mnt directory and source eucarc
    cd /mnt
    source eucarc
  6. Bundle the image using the command
    euca-bundle-vol -c ${EC2_CERT} -k ${EC2_PRIVATE_KEY} -u ${EC2_USER_ID} --ec2cert ${EUCALYPTUS_CERT} --no-inherit --kernel eki-XXXXXXXX --ramdisk eri-XXXXXXXX -d /mnt -r <architecture> -p <image.name> -s <size.in.MB>
    Note:
    • Replace eki-XXXXXXXX and eri-XXXXXXXX with numbers from the running instance. (Use euca-describe-instances to obtain these numbers.)
    • Choose <architecture> from either i386 or x86_64
    • Replace <image.name> with your image name
    • Replace <size.in.MB> with the size of the final image (Specifying a too-small number, i.e. less than the size of the image itself, will result in a "not enough disk space" error)

Upload and Register Image

  1. When the package is ready, upload the image to Futuregrid with the command:
    euca-upload-bundle -b <bucket.name> -m /mnt/<image.name>.manifest.xml
    • Choose any unused name for the <bucket.name> and also replace <image.name> by the name from the previous section.
  2. To make your image available for running on Futuregrid, you need to register the uploaded image by running the command:
    euca-register <bucket.name>/<image.name>.manifest.xml
  3. Once you've finished, the image should be listed on Futuregrid repository when you use euca-describe-images command. You can now deploy your new image using public Condor pool or your own private GroupVPN.


Tested Images

This tutorial has been tested on the following images:

  • Ubuntu 10.04 (64 bit) (emi-FB2D111E)


Personal tools