21
Jan
12

Eustore, a set of image tools for your cloud

I want to talk about something new we’re working on at Eucalyptus, but first let me start with a little background. Quite simply, it is a hassle to get an image installed. The current process for Eucalyptus (as we document it) is to download a tarball, untar it, bundle/upload/register the kernel/ramdisk and image itself. That’s about 11 steps. We thought there must be a simpler way to do this.

What we came up with is eustore. In the spirit of euca2ools (euca- and euare- commands), eustore commands give  you access to a Eucalyptus image store. That’s store, as in storehouse, not a shop. We have some updated “base” images available on our servers. We have a catalog file that contains metadata about those images. The eustore tools simply give you access to those, and let you issue a single command to download an install an image on your local cloud (or any Eucalyptus cloud you have access to).

The code has been checked in with the euca2ools. To install and use the commands, you’ll need to install from source. Let’s go over that now.

A python package call “boto” is required and you’ll get that from github.com


git clone https://github.com/boto/boto.git

To install boto, simply run the following within the boto directory


python setup.py install

If you don’t have bzr, you’ll need to download it and grab the code with

bzr branch lp:euca2ools

Installing euca2ools (+eustore) is as simple as running (as root) within the euca2ools directory

python setup.py install

Once you do this, you’ll have access to 2 new commands; eustore-describe-images and eustore-install-image. Here are the command summaries;

Usage: eustore-describe-images [options]

Options:
 -h, --help show this help message and exit
 -v, --verbose display more information about images
Usage: eustore-install-image [options]

Options:
 -h, --help show this help message and exit
 -i IMAGE_NAME, --image_name=IMAGE_NAME
              name of image to install
-t TARBALL, --tarball=TARBALL
              name local image tarball to install from
-s DESCRIPTION, --description=DESCRIPTION
              description of image, mostly used with -t option
-a ARCHITECTURE, --architecture=ARCHITECTURE
              i386 or x86_64, mostly used with -t option
-p PREFIX, --prefix=PREFIX
              prefix to use when naming the image, mostly used with -t option
-b BUCKET, --bucket=BUCKET
              specify the bucket to store the images in
 -k KERNEL_TYPE, --kernel_type=KERNEL_TYPE
              specify the type you're using [xen|kvm]
 -d DIR, --dir=DIR specify a temporary directory for large files
 --kernel=KERNEL Override bundled kernel with one already installed
 --ramdisk=RAMDISK Override bundled ramdisk with one already installed

eustore-describe-images list the images available at emis.eucalyptus.com. You have the ability to change the url (using the EUSTORE_URL environment variable which is helpful sometimes). The output looks like this;

4150406313 centos i386 2011.07.02 CentOS 5 1.3GB root, Hypervisor-Specific Kernels
1643448352 centos x86_64 2011.07.02 CentOS 5 1.3GB root, Hypervisor-Specific Kernels
3235725435 centos x86_64 2012.1.14 CentOS 5 1.3GB root, Single Kernel
0155946749 centos i386 2011.07.02 CentOS 5 4.5GB root, Hypervisor-Specific Kernels
2606989864 centos x86_64 2011.07.02 CentOS 5 4.5GB root, Hypervisor-Specific Kernels
0598061105 centos x86_64 2012.1.14 CentOS 5 4.5GB root, Single Kernel
0308481541 debian i386 2011.07.02 Debian 6 1.3GB root, Hypervisor-Specific Kernels
3402295892 debian x86_64 2011.07.02 Debian 6 1.3GB root, Hypervisor-Specific Kernels
1450309069 debian x86_64 2012.1.14 Debian 6 1.3GB root, Single Kernel
1258936568 debian i386 2011.07.04 Debian 6 4.5GB root, Hypervisor-Specific Kernels
3056211774 debian x86_64 2011.07.02 Debian 6 4.5GB root, Hypervisor-Specific Kernels
4084351385 debian x86_64 2012.1.14 Debian 6 4.5GB root, Single Kernel
0061180839 ubuntu i386 2011.07.02 Ubuntu 10.04 1.3GB root, Hypervisor-Specific Kernels
3192747366 ubuntu x86_64 2011.07.02 Ubuntu 10.04 1.3GB root, Hypervisor-Specific Kernels
2378540351 ubuntu x86_64 2012.1.14 Ubuntu 10.04 1.3GB root, Single Kernel
1497058306 ubuntu i386 2011.07.02 Ubuntu 10.04 4.5GB root, Hypervisor-Specific Kernels
1463636971 ubuntu x86_64 2011.07.02 Ubuntu 10.04 4.5GB root, Hypervisor-Specific Kernels
0962847746 ubuntu x86_64 2012.1.14 Ubuntu 10.04 4.5GB root, Single Kernel

To install one of these images on your local cloud, you’d use eustore-install-image like this;

eustore-install-image -i 3235725435 -b myimages

This command installs the image named into the myimages bucket on the cloud you are setup to talk to. As with all euca2ools, you’d first source the eucarc file that came with your cloud credentials. I should point out something about uploading kernel and ramdisk to your cloud. Only the admin can install these. If you have admin credentials, the above command will work fine. If you don’t and want to install an image anyway, you would use the –kernel and –ramdisk options to refer to a kernel id and ramdisk id already installed on the cloud. That way, this command will ignore the kernel and ramdisk bundled with the image and refer to the previously uploaded ones.

The project management is happening here: https://projects.eucalyptus.com/redmine/projects/eustore/

It is discussed during the images meetings on IRC  (calendar here)

About these ads

7 Responses to “Eustore, a set of image tools for your cloud”


  1. January 22, 2012 at 7:53 am

    This is great, I should try this out. But on my home setup I doubt it would work considering the fact that I am on a not so good internet connection. How about setting up a local Eustore for your own cloud, eh? I hope it’s pretty simple. Would be glad if you share the instructions to do that! :)

  2. 2 hspencer77
    January 22, 2012 at 4:47 pm

    Reblogged this on More Mind Spew-age from Harold Spencer Jr. and commented:
    David Kavanagh provides a way to make it easy to do image management with Eucalyptus..

  3. January 25, 2012 at 1:32 pm

    Hey David,

    Just tried the stuff and works like a charm. Perfect.

    Looks like the command should be modified to something like

    eustore-install-image -i debian-x86_64-20120114 -b myimages -k kvm
    or
    eustore-install-image -i debian-x86_64-20120114 -b myimages -k xen

    Otherwise one will get an error:

    BotoClientError: Required parameters are missing: (-k, –kernel_type)

    Cheers,

    • 4 dkavanagh
      January 25, 2012 at 2:39 pm

      Deependra,
      I think you may have an older version of euca2ools. I just checked launchpad which I thought was sync’ed daily with our internal bzr repo, and it looks like that is out of date. I’ll see what I can do about that!
      Thanks for finding this,
      David

      • 5 dkavanagh
        February 2, 2012 at 5:08 pm

        launchpad has been updated, so you can get the latest euca2ools code from there now. Sorry for the delay. Our sync mechanism wasn’t working.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: