Advertisment

Cloud Computing Virtual Appliance

author-image
PCQ Bureau
New Update

We talked about deploying a cloud computing infrastructure using Eucalyptus

in our Jan 09 issue. If you read that article you must have noticed that

deploying Eucalyptus is not a child's play. So, to make the deployment pain

free, we've developed the PCQLinux Cloud Computing Virtual Appliance. The beauty

of this appliance is that you can deploy it by just unpacking and inserting it

in HyperV. The rest of the deployment, including the installation of the cloud

nodes is taken care of automatically. And with the help of this appliance you

can deploy your own EC2 based cloud in a couple of hours. Let's see how to use

it.

Advertisment

Running the Appliance



The PCQLinux Cloud Computing Virtual Appliance is a HyperV appliance so it

will run on both Microsoft Virtual Server and MS HyperV. It will not work with

Microsoft VPC because it's a 64-bt appliance and VPC doesn't support 64-bit

guests.

First copy PCQCloud.vhd.bz2 to the machine running MS HyperV. Next, unpack it

using Winrar or any other uncompressing utility which supports BZip format. The

final extracted .vhd file will be around 7.5 GB so please make sure you have

enough disk space while uncompressing. And due to the large file size, the

unzipping process might take pretty long depending on the type of processors you

are using. So, I suggest you better go and grab a cup of coffee till the process

gets over!

Once it has been uncompressed, start the HyperV console and create a new

machine with atleast one GB of RAM and with one legacy network card. You can

start the creation wizard by going to Action  New  Virtual machine. Follow the

wizard and provide the necessary information required. Continue till the time

you see a window which asks you for connecting the virtual hard disk. In this

window, select the second option which says, 'Use an existing virtual hard

disk.' Now click on the browse button and provide the path of the PCQCloud.vhd

file. Continue till you reach the end of the wizard. Once the virtual machine is

created, right click and select the start the option to start the machine.

Advertisment

Your cloud's node is now ready to rock. The appliance boots with a default IP

of 192.168.3.246 and username is root and the password is pass@word1. The

appliance automatically starts a DHCP server on the network, so make sure you

don't run it on a live production network without disabling the DHCP server.

Installing nodes



This is the time to install nodes over the network. For this, run the Rocks

command “insert-ether” from a terminal. It will open up a window with a list of

device types. Select the last option which says “vm-container” and hit enter. A

blank window will open. Boot up all nodes and make sure they all connect to the

cloud network and their boot preference is set to Network/PXE boot. Once you do

so, you will start seeing entries being added to the blank window of

“insert-ether”. You will see one entry each for the number of nodes you have

booted.

On the nodes, the remote installation will start automatically and the

complete installation will happen with some amount of manual intervention. You

can even have your nodes headless and see the installation screen remotely

through a VNC client with the host name of the nodes shown in the insert-ether

window.

Advertisment

Once all the nodes are installed, reboot all your node machines. I don't know

why, but I faced a lot of trouble in getting all nodes attached to the cloud

till the time I rebooted all of them. Once the reboot process has been done,

your EC2 enabled Eucalyptus cloud is up and running. This is the time to start

using it.

Adding images



Now your cluster is ready but you need some virtual machines to run on top

of it. For doing so, you have to upload some Linux OS images to it. For getting

your hands dirty, you can use a very tiny Linux image which is available from

Eucalyptus' website. You can download it from http://eucalyptus.cs. ucsb.edu/releases/euca-ttylinux.

tgz. Once downloaded, untar and unzip it and run the following command:

#/opt/eucalyptus/usr/sbin/euca add_image --disk-image

ttylinux.img --kernel-image vmlinuz-2.6.16.33-xen --image-name ttylinux

Advertisment

And the image will be updated to the cloud.

Using the Cloud with Amazon's EC2 client



If you are comfortable with Amazon's EC2 client then you can just skip this

section. But if you are not, then read on. To start with, first get a client

machine, any Windows or Linux machine will do. But the process will vary a bit.

We did it on a Linux machine.

First download Amazon's EC2 toolset and APIs from http://s3. amazonaws.com/ec2-downloads/

ec2-api-tools-1.3-24159.zip. Now unzip them. But before using the commands,

first generate and download a certificate for your cloud's account, so that you

can authenticate the machine from the system that is running the EC2 client. To

do so, open the following link:

https://ip.of.the.cloud.front.end:8443

Advertisment

Change “ip.of.the.cloud. front. end” with the IP or FQDN of the Cloud's

frontend. A login page will appear. Login using admin both as username and

password. Once you login for the first time to the Eucalyptus page, you will be

asked to change the Admin password. Change it and proceed, and you will see the

Admin page. Here, you can add more users and then login through them to get the

certificate or you can just download the Admin's certificate to get started. To

download the Admin's certificate, click on 'Generate Certificate' button on the

page. It will download a zipped file. Once downloaded, unzip it to ~/.euca

folder.

Now move EC2 Tools folder to opt and run the following commands to register

to EC2 and certificate paths, and the cloud's website:



Things to note:
1. The

appliance file when uncompressed generates a 7.5GB VHD file, so make sure

you have enough space on your disk.

2.

The virtual appliance should have atleast 1GB of disk space.

3. It should have atleast one legacy network

adapter.

4. The appliance has DHCP server running by

default, so please make sure you don't run this appliance on a live

production network.

5. If the nodes don't remote boot. Run



#kroll eucalyptus > build.sh


#sh ./build.sh




and try again.

Advertisment

export EC2_HOME=/opt/ec2-api-tools-1.3-24159



export PATH=$PATH:$EC2_HOME/bin


export EC2_PRIVATE_KEY=~/.euca/euca2-*-pk.pem


export EC2_CERT=~/.euca/euca2-*-cert.pem


export EC2_URL=http:// ip.of.the.cloud.front.end:8773/services/Eucalyptus


Now, you will be able to run the following command to see how many cores you

have in your cloud and how many are free for you:

#ec2-describe-availability-zones

You need to create a private key, so that you can use it to connect to an

instance when you run them, through SSH. To do so, run: ec2-add-keypair

key >> key.private

Advertisment

Now run the following command to get the EMI identifier for the image/s you

have added: #ec2-describe-images

It will return a value like emi-xxxxxxx. Now run the following command to

start instances of the image on the cloud:

#ec2-run-instances emi-xxxxxxx -k key

And the Linux image will boot up on the cloud. You can access it through SSH.

But for that you will need its IP which you can get by running the following

command: #ec2-describe-instances

To connect to the image using SSH and the private key you just created, run

the following command: ssh -i key.private root@ip-addresses-of-the-image

And you are done with it. Wasn't that simple!

Advertisment