Monday, January 20, 2014

Exploring OpenStack Savanna, Part I: Launching a Hadoop Cluster

I recently started playing with OpenStack Savanna, a service for provisioning Hadoop clusters on top of OpenStack.  Savanna makes it easy to create clusters, but users may be confused by the initial process.  Here, I go through the steps of creating a Hadoop cluster using Savanna based on the Quick Start guide provided by the Savanna developers.

Part I: Launching a Hadoop Cluster
To begin with, I wanted to look at the process for provisioning a cluster.  The first step is to register one of the images available in your OpenStack installation for use with Savanna.  By clicking on the "Image Registry" tab on the lefthand side, we get a list of all images (none in my case) registered with Savanna:

We can register can image by clicking the "Register Image" button on the right.  A dialog comes up like so:

Select the image you want to use and give it a name.  Click the "Done" button to save your changes.  You should now see the newly added image in the list:

After adding an image, the we need to create template for the master and worker nodes.  Node templates control which processes run on the nodes (e.g., job tracker, task tracker, name node, data node, etc.) Start by clicking on the "Node Group Templates" tab on the left-hand side.

We'll create two templates: one for a master and one for a worker.  To begin, click on "Create Template."  The following dialog should appear:

Go with the defaults here and click "Create."  (I will ignore this dialog for the rest of the entry since you can always go with the defaults for this tutorial.) A second dialog will appear:

This dialog allows you to select options for the template.  As we're creating the master template, give the template the name "master," select the small flavor, and check "namenode" and "jobtracker."  Click "Create" to finish.

To create the client, follow the same procedure but use a different name and select "datanode" and "tasktracker":

You should now see your templates in your template list:

You now need to create a cluster template, which defines how many nodes a cluster has and their types.  Click the "Cluster Templates" tab on the left-hand side:

To create a cluster template, click "Create Template."  The following dialog will appear:

On the first tab, you will want to provide a name such as "test-cluster-template."  Next, switch to the "Node Groups" tab.

Add one master and two workers to the cluster.  The rest of the parameters can be ignored, so simply press "Create."  Your cluster template should appear in the list:

Now, onto the fun part -- starting our cluster!  Click on the "Clusters" tab and press "Create Cluster":

Add a hostname, select a template, select the base image, and select a key pair.  When you press "Create," the cluster will be created and spawned.

1 comment:

  1. very nice and informative, looked for many openstack tutorial, recently joined in, can anyone suggest me some books and videos.