Friday, July 29, 2011

Implementing Cloud Computing on your average Desktop PC (Part 3/3)

Bundling an image
Under the Cloud Controller webpage’s Extras tab, there are some “ready-made” packages available for downloading:


Referencing the instructions on Eucalyptus Image Management, link:
There are basically three steps to bundle an image:
1. Add a root disk image
2. Add a kernel/ramdisk pair to Walrus
3. Register the uploaded data with Eucalyptus.


Having extracted the “ready-made” packages into my home directory, /home/jonathonl/ubuntu9.04-bucket/euca-ubuntu-9.04-i386/kvm-kernel, I carried out the following steps:
[Kernel]
euca-bundle-image -i ubuntu.9-04.x86.img --kernel true
euca-upload-bundle -b kvm-kernel/ -m /tmp/ubuntu.9-04.x86.img.manifest.xml
euca-register kvm-kernel/ubuntu.9-04.x86.img.manifest.xml
[VM]
euca-bundle-image -i /vmlinuz-2.6.28-11-server
euca-upload-bundle -b kvm-kernel/ -m /tmp/vmlinuz-2.6.28-11-server.manifest.xml
euca-register kvm-kernel/vmlinuz-2.6.28-11-server.manifest.xml
[RAM disk]
euca-upload-bundle -b kvm-kernel/ -m /tmp/initrd.img-2.6.28-11-server.manifest.xml
euca-bundle-image -i kvm-kernel/initrd.img-2.6.28-11-server --ramdisk true
euca-register kvm-kernel/initrd.img-2.6.28-11-server.manifest.xml

The kernel, vm and ram images should be available under the “images” tab:
Hybridfox - Launch Instance
I used Hybridfox to manage and launch an instance. To begin with, Firefox 5.01 does NOT work with Elasticfox(installation error). However, Firefox works well with Hybridfox (v1.7b89). This link has all the instructions for setting up Hybridfox to communicate with your cloud systems.
During the setup, a KeyPair will be created. Be sure to save this key somewhere handy as it will be used for SSH into the instance later.
The following settings were used to launch an instance:



With my setup, I am also using the Cloud Controller as a jump host to access the instance running on Node Controller. The Keypair file mentioned earlier is used as follows to allow for a password-less SSH login:
root@ubuntu-CloudController:~# ssh -i /home/jonathonl/keypair.pem 192.168.133.1
Linux ubuntu 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
root@ubuntu:~#
So, this concludes the implementation of Cloud Computing, from installation to running an instance.

No comments:

Post a Comment