Tuesday, March 30, 2010

OpenNebula Cluster

My OpenNebula cluster is up an running, and all seems to be stable. There were a few fits along the way, but must was probably due to the crap hardware I'm running this thing on. Understand, of course, that this is not a production cluster, so the fact that it runs on four Pentium III's can be forgiven.

The thing to understand about OpenNebula, is a cloud environment, not a virtualization platform. This means that we need to choose an OS first. Because of the hardware, I'm using Fedora 8 with Xen. (I prefer Fedora Core 6, since it is more like RHEL 5.2, but it was not stable with OpenNebula. Lesson learned: use F8.)

I did a base kickstart on the nodes, to ensure a slim footprint. I loaded the Xen kernel and libraries, but left off virt-manager to avoid the overhead of an X server. In my cluster, three of the four nodes are identical, but the fourth is more powerful. That will be our head node.

When I tried to load the one-1.4.0 rpm on the head node, I ran into dependencies. (Ah, yes: the download says its for F11, and I'm using F8.) Needed packages:
yum install -y xmlrpc xmlrpc-c
yum install -y ruby
This extracted to the /srv/cloud/one directory.

The RPM created accounts:
/etc/passwd: oneadmin:x:512:903
/etc/group: cloud:x:903
The users's home directory is set to the containerized directory created above. A little simple sysad magic to clean up the account and assign keys to allow oneadmin the SSH to localhost without a password.

And here is where it gets beautiful: We now use NFS to export the directory to the nodes. Log in to the nodes, mount the NFS share, and replicate the user accounts. (Note to self: add user and group to NIS.) With the mount in place, return to the head node, become the oneadmin user, and SSH to the node. Since the user's home is the share, and keys are in the share, we get right in.

The infrastructure is in place, now its on to VMs.

No comments:

Post a Comment