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 build from source and tweak the setup.py. Let’s go over that now.

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


bzr branch lp:euca2ools

You’ll find the eustore commands in euca2ools/commands/eustore. The commands still need to be added to setup.py, as does the package to get it installed with the rest of euca2ools. Here’s s patch script you can apply with “patch -p0 <setup.patch” (assuming you copy this into a file named setup.patch);

--- setup.py 2012-01-20 17:17:48.000000000 -0800
+++ setup.py 2012-01-20 17:18:53.000000000 -0800
@@ -161,10 +161,13 @@ setup(name = &quot;euca2ools&quot;,
 &quot;bin/euca-unbundle&quot;,
 &quot;bin/euca-unmonitor-instances&quot;,
 &quot;bin/euca-upload-bundle&quot;,
- &quot;bin/euca-version&quot;],
+ &quot;bin/euca-version&quot;,
+ &quot;bin/eustore-describe-images&quot;,
+ &quot;bin/eustore-install-image&quot;],
 url = &quot;http://open.eucalyptus.com&quot;,
 packages = [&quot;euca2ools&quot;, &quot;euca2ools.nc&quot;, &quot;euca2ools.commands&quot;,
- &quot;euca2ools.commands.euca&quot;, &quot;euca2ools.commands.euare&quot;],
+ &quot;euca2ools.commands.euca&quot;, &quot;euca2ools.commands.euare&quot;,
+ &quot;euca2ools.commands.eustore&quot;],
 license = 'BSD (Simplified)',
 platforms = 'Posix; MacOS X; Windows',
 classifiers = [ 'Development Status :: 3 - Alpha',

Once that file is patched, installing euca2ools (+eustore) is as simple as running (as root)

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
 -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;

centos-x86_64-20111228 centos x86_64 2011.12.28 CentOS 5 1.3GB root
centos-x86_64-20120114 centos x86_64 2012.1.14 CentOS 5 1.3GB root
centos-lg-x86_64-20111228centos x86_64 2011.12.28 CentOS 5 4.5GB root
centos-lg-x86_64-20120114centos x86_64 2012.1.14 CentOS 5 4.5GB root
debian-x86_64-20111228 debian x86_64 2011.12.28 Debian 6 1.3GB root
debian-x86_64-20120114 debian x86_64 2012.1.14 Debian 6 1.3GB root
debian-lg-x86_64-20111228debian x86_64 2011.12.28 Debian 6 4.5GB root
debian-lg-x86_64-20120114debian x86_64 2012.1.14 Debian 6 4.5GB root
ubuntu-x86_64-20120114 ubuntu x86_64 2012.1.14 Ubuntu 10.04 1.3GB root
ubuntu-lg-x86_64-20120114ubuntu x86_64 2012.1.14 Ubuntu 10.04 4.5GB root

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

eustore-install-image -i debian-x86_64-20120114 -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

8 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.

  4. 6 Patrick
    February 1, 2012 at 10:40 pm

    David,
    I used the eustore-install-image command to download and install one of the ubuntu images. However the vm hangs on boot.

    Here’s the output from the eustore-install-image command:
    eustore-install-image -i ubuntu-x86_64-2011070 -b myimages2 -k xeneustore-install-image -i ubuntu-x86_64-2011070 -b myimages2 -k xen

    http://pastebin.com/raw.php?i=ESDGdG94

    Here’s the output from the xm console command:

    http://pastebin.com/raw.php?i=9i9nVZqa

    I tried with the with and without the -k xen option. Using euca-describe-instances the instance appears running but no ip address is assigned and you can’t login through the xm console. I have been able to boot some of my other images just fine.

    This is Euca 2.0.2, Xen on CentOS using the FastStart.

    Thanks,
    Patrick


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 )

Google+ photo

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

Connecting to %s


More frequent updates from me

  • 136,810

The Author


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: