Friday, July 29, 2011

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

Why Eucalyptus? Because it is also used by Amazon’sEC2 cloud platform. Even better, Eucalyptus comes with Ubuntu Server edition 11.04.


I began by reading Eucalyptus beginner’s guide, which contains all the installation procedure and configuration items, as well as a high-level reference diagram showing all of the private cloud's components (please read the guide in case if this diagram is not clear due to low resolution):
While I do not intend to go through every step in the beginner's guide, the definition of an "instance" is worth paying attention to (since this is what I aimed at running eventually), "The VMs running on the hypervisor and controlled by UEC are called instances."As you may notice, the private cloud implementation is across two desktop PCs:

Although there is an option of installing the entire private cloud on a single computer, I decided to use my old PC as a dedicated Cloud Controller.
My old PC's CPU does not support Intel’s Virtual Hardware Acceleration (VT) technology but it has a hard-drive of 1.5TB (ample storage space). For the Node Controllers, I purchased a second hand PC from EBay for $190, which is only strong enough to run Windows XP but its CPU supports VT and also upgraded it to 4GB of ram in total.
Installation Notes
The actual OS installation was rather straight forward. I inserted Ubuntu’s installation CD and followed the screen instructions. As a note, it would be a good idea to be connected to the internet to do apt-get update as well as sync up the time with NTP.
Node Controller
Prior to installation, consider the Node Controller is the only component which CPU is required to support hardware virtualization. To identify the CPU model, either check in BIOS or check the /proc/cpuinfo file (if Linux is already installed):
root@ubuntu-NodeController:/var/log# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
model name : Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz
address sizes : 36 bits physical, 48 bits virtual
Cross check with this Intel's link to confirm if the process supports VT technology.
Virtual Hardware Acceleration (VT) technology needs to be enabled through BIOS settings (in my case, it was enabling the "Hardware Virtualization" cpu setting). Otherwise, Eucalyptus complaints about BIOS stopping KVM from starting in the following syslog messages:
root@ubuntu-NodeController:/var/log# cat syslog | grep -i kvm
Jul 21 20:39:29 ubuntu-NodeController kernel: [ 27.885070] kvm:disable TXT in the BIOS or activate TXT before enabling KVM
Jul 21 20:39:29 ubuntu-NodeController kernel: [ 27.885074] kvm: disabled by bios
Jul 21 20:39:29 ubuntu-NodeController init: qemu-kvm pre-start process (1086) terminated with status 1
Another thing worth nothing about Node Controller is, the "eth1" interface should be part of the bridge interface, which, as its named, bridges the physical port to a virtual/ internal interface on the instance.
Cloud Controller
As you may note in the diagram above, the Cloud Controller has two NIC cards installed. One for internet access (public), the other for cloud access (private). I attempted setting up both Private and Public interfaces on the same Ethernet port, but remote access worked intermediately (...I doubt does single port setup works).
Herewith the /etc/network/interfaces file for reference:
root@ubuntu-CloudController:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The internet interface
auto eth0
iface eth0 inet static
address 192.168.10.153
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.1
# The Cloud Computing interface (This was changed to a bridge interface later to resolve an error message)
auto eth1
iface eth1 inet static
address 192.168.20.1
netmask 255.255.255.0
network 192.168.20.0
broadcast 192.168.200.255
Also worth mentioning, I have setup my Cloud Controller as client as well, installing the following packages:
apt-get install qemu-kvm
apt-get install euca2ools
P.S. I setup my Cloud Controller as NAT to allow Node Controller to access the internet (Somehow my home’s internet gateway does not allow me to configure static routing so I had to resolve to this work around).
So herewith the list of considerations I came across during installation of Eucalyptus. Part two will contain configuration and troubleshooting items needed to get Eucalyptus up-and-running.

No comments:

Post a Comment