I’ve been doing some work with Eucalyptus Cloud setup lately and I thought I could speak about my experience with it. I was interested in the possibility of using other popular open source available in cloud domain and I thought Eucalyptus could be a good candidate for developing Private & Public clouds.

Many instructions said below refer to a single-cluster installation, in which all components except NC(Node Controller) are co-located on one machine, which we refer to as front-end. All other machines, running only NCs, will be referred to as nodes. In more advanced configurations, such as those with multiple CCs or with Walrus deployed separately, the front-end will refer to just the machine running the CLC.

Steps for installation :
All packages can be found on the Eucalyptus Web site: http://open.eucalyptus.com/downloads
Unpack the Eucalyptus source using the below mentioned command:

tar zvxf eucalyptus-1.6.1-src.tar.gz
cd eucalyptus-1.6.1

Installing the eucalyptus-cloud,eucalyptus-cc packages on the front-end machine .

sudo apt-get install eucalyptus-cloud eucalyptus-cc

Next, installing the eucalyptus-nc package on each node.(mynode / 0.0.0.0)

sudo apt-get install eucalyptus-nc

– Finally, on the node, bring down the eucalyptus-nc service and modify the file /etc/eucalyptus/eucalyptus.conf with the name of the bridge that we set up as the node’s primary interface.

Hence after successfully adding a node to the cluster we have to register the eucalyptus components.

Registering Eucalyptus Components :

Eucalyptus assumes that each node in the system belongs to a cluster and that each cluster belongs to a cloud. Each node (there is only one node in this example) which runs a copy of eucalyptus-nc. Similarly, each cluster (again, there is only one cluster in this example) must run a copy of eucalytpus-cc. For simplicity, the eucalyptus-cc in this example runs on the same machine as the cloud controller (eucalyptus-clc).

sudo euca_conf -addcluster <mycluster> localhost

where <mycluster> is the name that we would like this cluster to appear as to your users. Note that this name is logical and local only to Eucalyptus. It will correspond to an availability zone in the output of the client tools. Next, register our node with the cluster(mycluster) by running the following command on the front-end:

sudo euca_conf -addnode <node_hostname>

We can add more nodes by repeating the above command for each node running a copy of eucalyptus-nc.

Most likely, on the front-end you would run :

$EUCALYPTUS/etc/init.d/eucalyptus-cloud start EUCALYPTUS/etc/init.d/eucalyptus-cc start

And on each of the compute nodes you would run: $EUCALYPTUS/etc/init.d/eucalyptus-nc start

 

 

NOTE: If you later decide to make changes to$EUCALYPTUS/etc/eucalyptus/

eucalyptus.conf that will effect the cluster-controller, make sure to use the ‘cleanstart’,

‘cleanstop’, and/or ‘cleanrestart’ directives to the init scripts (as opposed to start/stop/restart).

This will both remove all existing CC state, and will cause it to re-read the configuration file.

Initial Login setup :

The first time Eucalyptus boots, we are required to go through some configuration steps that set up the administrative environment for the cloud. From our web browser (either remotely or on your server) access the following URL:

https://<front-end-ip-address>:8443/ (https://0.0.0.0:8443)

Use username ‘admin’ and password ‘admin’ for the first time login (you will be prompted to change your password) therafter.

* When you finish the first time configuration process, click the ‘credentials’ tab located in the top-left portion of the screen. Click the ‘Download Certificate’ button to get your credentials.

Next installed Euca2ools for launching the instances .

Now you will need to setup EC2/Euca2 API and AMI tools on your server using X.509 certificates. Unzip the downloaded zipfile into a safe location (~/.euca), and source the included “eucarc” file to set up your Eucalyptus environment.

Eucalyptus treats this set of credentials as ‘administrator’ credentials that allow the holder global privileges across the cloud.A admin user can further add another user(s) for monitoring purpose.

In addition to modifying the configuration, euca_conf attempts to synchronize x509 credentials across the nodes of a Eucalyptus installation by relying on rsync and scp. We highly recommend setting up password-less SSH access for the root user across all nodes of your Eucalyptus installation (otherwise, euca_conf will prompt you for remote system passwords).

Bundling and registering the image :

Next, we will need to bundle, upload and register a kernel, ramdisk and finally our image. Using the Euca API tools, perform the following steps:

# bundle and upload the systems kernel

$ mkdir kernel

$ euca-bundle-image –image /boot/vmlinuz-$(uname -r) \

–destination ./kernel –kernel true

$ euca-upload-bundle –bucket kernel \

–manifest ./kernel/vmlinuz-$(uname -r).manifest.xml

$ EKI=`euca-register kernel/vmlinuz-$(uname -r).manifest.xml | awk ‘{print $2}’`

$ echo $EKI

# create a ramdisk with acpiphp, bundle and upload

$ mkdir ramdisk

$ sudo sh -c ‘grep -q acpiphp /etc/initramfs-tools/modules ||

printf “#acpiphp needed for ebs\nacpiphp\n” > /etc/initramfs-tools/modules’

$ sudo mkinitramfs -o ./ramdisk/initrd.img-$(uname -r)

$ euca-bundle-image –image ./ramdisk/initrd.img-$(uname -r) \

–destination ./ramdisk –ramdisk true

$ euca-upload-bundle –bucket ramdisk \

–manifest ramdisk/initrd.img-$(uname -r).manifest.xml

$ ERI=`euca-register ramdisk/initrd.img-$(uname -r).manifest.xml | awk ‘{print $2}’`

$ echo $ERI

After successfully creating the buckets ,copy the manifest file hence builded and stored them under the unique(mybucket) bucket name.

Running an Instance:

A user may choose a specific kernel/ramdisk at instance run time as an option to ‘euca-run-instances’

euca-run-instances –kernel <eki-XXXXXXXX> –ramdisk <eri-XXXXXXXX> <emi-XXXXXXXX>

Before running an instance of our image,we should first create a keypair (ssh key) that you can use to log into our instance as root, once it boots.The key will be stored in your m/c, so you will only have to do this once.

The first time we run an instance, the system will be setting up caches for the image from which it will be created. This can often take some time the first time an instance is run given that VM images are usually quite large.

$ euca-describe-instances

The above command will give the essential details about the instance status as active,shutting down or terminated.

Deleting the image :

In order to delete an image, you must first de-register the image:

euca-deregister <emi-XXXXXXXX>

Then, you can remove the files stored in your bucket. Assuming you have sourced your ‘eucarc’ to set up EC2 client tools:

euca-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY –url $S3_URL -b <bucket> -p <file prefix>

If you would like to remove the image and the bucket, add the ‘–clear’ option:

euca-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY –url $S3_URL -b <bucket> -p <file prefix> –clear

Despite the issues faced, I think that this has been a good experience as I have got to know better Eucalyptus and I’ve had the chance to dig into Cloud domain via an open source and understood it more how it works under the hood .

I’m no expert in Eucalyptus though, so if I’m missing something, don’t hesitate to say it, I’ll appreciate it!