Prepare XMaaS.

Ok, you downloaded Controller and Compute images and you want to play with XMaaS. In this simple tutorial we will show you how to use virtual machines to test XMaaS, but the procedure remains the same if you create bootable CDs or USB keys using downloaded images and use these to boot your machines

Create virtual machines

Let us start. Obviously want to create a few virtual machines we can play with, so we create

  • one virtual machine, that will act as a Controller node, so let us give it 2 processors, 2GB of RAM, bridged network and XMaaS Controller image attached to the CD/DVD,
  • two virtual macines, that will act as Compute nodes and we'll give them one processor each, 2GB of RAM, bridged network and XMaaS Compute image attached to the CD/DVD.

Set up the Controller node

Next we will set up persistence partition on the Controller VM (Virtual Machine), giving our Juju environment some space to live in. So boot up the VM and it will automatically log into the terminal. Run sudo fdisk /dev/sda and once you see the menu press n to create a new partition. Unless you have special requirements just keep pressing ENTER util you find yourself back in the initial menu. This will confirm all default settings and create one partition taking up the entire hard drive of the VM. But that's ok as long as the partition is larger than 5GB - it's just a virtual machine. Once back in the initial menu press w to write the partition table to the drive.

This will also return you to the terminal and all we have to do now is to format the partition and label it "casper-rw", which will let the live cd/usb know, that this partition is to be used for persistence using aufs. Run mkfs.ext3 -L casper-rw /dev/sda1. Remember that /dev/sda1 is the partition you just created using fdisk. Once finished formatting, you can reboot the Controller VM. Press CTRL+ALT+DEL and the system will prompt you to remove the CD/DVD and press enter. At this point re-attach the XMaaS Controller image to the VM's CD/DVD and press ENTER. The VM will reboot and when returned to the terminal run watch juju status.

And wait.. a bit longer.. When started the live cd will check if the machine meets criteria (it checks if there is at least 5GB of free space on the aufs partition) and then bootstraps the Juju environment. After a while you should see something like this:

	  environment: "null"
	  machines: 
	    "0":
	    agent-state: started
	    agent-version: 1.17.0.1
	    dns-name: 10.0.0.1
	    instance-id: 'manual:'
	    series: precise
	    hardware: arch=amd64 cpu-cores=2 mem=1995M
	  services: {}
	  

Congratulations! Your Controller node is ready to go.

Set up Computer nodes

Now is the time to spin up the Compute VMs. Following the same procedure describe in the previous section create a persistence partition in each of them and reboot - but remember to re-attach the XMaaS Compute image to each VM on reboot.

When started with more than 5GB of free space on the aufs partition the VM will automatically add itself to the juju environment and you will see additional machines in the output of the "juju status". In this tutorial, having created two compute nodes, we expect to see:

    machines: 
	    "0":
	    agent-state: started
	    agent-version: 1.17.0.1
	    dns-name: 10.0.0.1
	    instance-id: 'manual:'
	    series: precise
	    hardware: arch=amd64 cpu-cores=2 mem=1995M
	    "1":
	    agent-state: started
	    agent-version: 1.17.0.1
	    dns-name: 10.0.0.10
	    instance-id: 'manual:'
	    series: precise
	    hardware: arch=amd64 cpu-cores=1 mem=1995M
	    "2":
	    agent-state: started
	    agent-version: 1.17.0.1
	    dns-name: 10.0.0.11
	    instance-id: 'manual:'
	    series: precise
	    hardware: arch=amd64 cpu-cores=1 mem=1995M
    services: {}
	  

And that is it! Your XMaaS HPC infrastructure is ready to host your Juju HPC services.