OpenStack Lab on VMware Workstation – Adding Cinder volume features

image_pdfimage_print

cinderblockNow that we have our OpenStack lab up and running, we want to click around and kick the tires on all of the features. One of the first things that we will find is that the All-In-One is really an “almost” All-In-One. What I mean by that, is that there are services available which aren’t configured, and require a little more care and feeding.

Where is my Cinder?

The Block Storage feature of OpenStack is appropriately (or perhaps tongue-in-cheek) named Cinder. This service allows you to create block storage in your OpenStack cloud and attach to virtual machine instances. While the administration dashboard has the Volumes tab and appears to be all set to go, it requires a few extra steps to get Cinder volumes up and running.

Testing our Cinder volumes out of the box

Before we do anything, I wanted to show you how it doesn’t work. That sounds strange, but I’m stubborn and I like to prove things out, and if you are like me, you probably clicked through the dashboard provisioning some goodies and then realized that something wasn’t right with the Volumes page.

First, log in to your All-In-One dashboard as Demo (user account created during the deployment):

01-login

In your dashboard (aka Glance) click on the Volumes tab and click the Create Volume button:

02-volume-create

In the Create Volume options box, fill in the name of your volume and a description first:

03-create-volume-1

Next, scroll down and fill in the Size (GB) field. I’m using a 1 GB volume for my test:

04-create-volume-2

In a matter of a few seconds we see the results of our volume creation:

05-error

Yup…it failed. Booooo! But that’s ok, because as I mentioned at the start of the post, we have to configure Cinder and the volume space before this would work.

Adding the Cinder foundation

We need to do the following to enable and configure Cinder for our All-In-One build. These steps are:

  1. Create a disk drive to store our Cinder volumes
  2. Add Cinder components to the OpenStack build
  3. Create the virtual storage volume and assign it to our Cinder volume pool
  4. Restart the newly installed services
  5. Test Cinder volume creation

Although we have a large disk assigned to the All-In-One (200 GB in my case), we still need another disk to use for the Cinder volumes. Remember that our 200 GB disk is for the virtual machines only. Additional volumes will be stored in our dedicated Cinder volumes.

For cleanliness, I’m going to shut down my OpenStack instance and add the disk to my VMware Workstation. We edit the settings and click on the Add button:

06-add-disk

Choose Disk and click Next:

07-new-disk

We choose to Create a new virtual disk and click Next:

08-create-new

Take the default which is SCSI and click Next:

09-disk-type

For fun, I’ve set it at 40 GB and as always I choose the Store virtual disk as a single file:

10-disk-file

I’ll name the disk appropriately as OPENSTACK01-cinder.vmdk so I remember which one it is:

11-name-mydisk

Now that we have our new disk added, we start up our All-In-One VM. Once we are up and running we will SSH into the machine to configure the new Cinder volume. You will need a client such as PuTTY, or whatever your SSH client of choice is.

Log in as the user you have created during the initial build. Once we are logged in, we will elevate our privileges to configure everything:

12-ssh-login

Type in sudo su – which puts you into the console with su privileges and the full environment. Next you type source openrc which loads the environment variables for our OpenStack configuration that we need for the other script processes:

13-sudo-source

 Before we add new things, run the knife node show <your node name> which shows the results like the screen below. You see under the Run List that there is no Cinder mentioned:

14-knife-node-show

 Now we type knife node run_list add <your node name> ‘role[cinder-all]’ which will add the Cinder roles to the Run List:

15-knife-add-cinder

Now we type chef-client which executes the cookbook recipe to create and initialize the Cinder services which are cinder-volume, cinder-api and cinder-scheduler.

This step takes a while once you start it, so you can leave it running for 5 minutes or so:

16-chef-client

Once the installation process completed, you will see a screen like the one below with the last message being Report Handlers Complete:

17-chef-complete

 Now we create the volume by using the pvcreate /dev/sdb command:

18-pvcreate

Next we create the volume group using the vgcreate cinder-volumes /dev/sdb command:

19-vgcreate

Finally we have to restart the Cinder services with the following commands:

service cinder-volume restart

service cinder-api restart

service cinder-scheduler restart

20-service-restarts

Phew! We did it! Now we head back to our dashboard to retry the process of creating a volume. Just as before, log in as demo, go to the Volumes tab and click on the Create Volume button:

21-new-volume

In a few seconds you will see the console working away on your volume creation and finally it shows our new volume with a status of Available:

22-volume-created

We did it!

Now you can deploy Cinder volumes as a part of your All-In-One lab deployment. This will come in handy later 🙂

DiscoPosse

People, Process, and Technology. Powered by Community!

You might also like

4 Comments

  • Steve
    May 14, 2013 at 10:37 am

    Thanks for taking the time to write this up; it’s really helpful.

    • DiscoPosse
      Eric
      May 14, 2013 at 3:46 pm

      Thanks Steve! I’m glad it was helpful 🙂

LEAVE A COMMENT

Proudly Sponsored By

Advertisement

GC On-Demand

Subscribe to the Blog

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Upcoming events:

Archives