Thursday, October 13, 2011

Accessing the Eucalyptus Community Cloud with boto

The Eucalyptus Community Cloud (ECC) is a great resource that allows you to try out a real cloud computing system without installing any software or incurring any costs. It's a sandbox environment that is maintained by Eucalyptus Systems to allow people to testdrive Eucalyptus software and experiment with cloud computing.

To access the ECC, you need to sign up following the instructions here. Once you are signed up, you will be able to download a zip file containing the necessary credentials for accessing the ECC. If you unzip that file somewhere on your local filesystem you will find, among other things, a file called eucarc. The contents of that file will look something like this:

To get things to work seamlessly in boto, you need to copy a few pieces of information from the eucarc file to your boto config file, which is normally found in ~/.boto. Here's the info you need to add. The actual values, of course, should be the ones from your own eucarc file.

Notice that the values needed for eucalyptus_host and walrus_host are just the hostname or ip address of the server as specified in the EC2_HOST and S3_HOST variables. You don't have to include the port number or the http prefix. Having edited your boto config file, you can now easily access the ECC services in boto.

This example assumes you are using the latest version of boto from github or the release candidate for version 2.1 of boto.