Support: 1-800-961-4454
Sales Chat
1-800-961-2888

Taking OpenStack For A Spin: Using The Rackspace Private Cloud Sandbox

1

Introduction

Late last year, we released  Rackspace Private Cloud (RPC) 4.2.1, which is based on the Havana release of the OpenStack cloud platform. Along with this RPC release, Rackspace also made available version 1.0 of the Rackspace Private Cloud Sandbox, a virtual appliance that runs an all-in-one single node RPC VM that allows anyone to quickly spin up a small OpenStack environment for test and demonstration purposes. This virtual appliance is distributed as an OVA package and can be imported and used in Oracle VM VirtualBox, VMware Fusion, VMware Player or VMware Workstation. The Sandbox was a direct result of your feedback. You said you wanted to be able to experiment with RPC or to demonstrate the OpenStack Horizon dashboard to colleagues or managers; however, you did not want to have to spend time installing a Chef server and running through a full RPC install for these tasks. So in response, the RPC Product team created the RPC Sandbox so you can get a small OpenStack-based cloud environment up and running in minutes on your laptop or workstation.

In this post, I will walk though a high-level setup of the RPC Sandbox (please use the setup guide in the Rackspace Knowledge Center as your primary reference). Then I will share some exercises to help you or anyone new to OpenStack learn how to use the command line interface (CLI) and the dashboard for launching and configuring cloud resources. Before we begin, please note the following:

  • I will be demonstrating the RPC Sandbox setup using VMware Fusion. My experience so far is that the setup is quite simple with Fusion, Player and Workstation. VirtualBox has proven to be more challenging and the setup guide walks through some additional steps that have to be taken to setup the Sandbox.
  • The Sandbox includes a Chef server that installs and manages the the all-in-one RPC role; this role includes the OpenStack components that are supported out of the box with a typical RPC deployment, including Nova compute, Nova networking, Keystone, Glance, Cinder block storage, Ceilometer,and Heat. Although Swift is supported and available with RPC, it is not included in the Sandbox due to the hardware requirements for a representative Swift deployment.
  • Neutron Networking is supported and available with RPC but not currently available with the RPC Sandbox. An updated version of the Sandbox with support for Neutron is expected to be released in the future.

Setting Up The RPC Sandbox

  • Download and install your desktop hypervisor of choice (as mentioned earlier, I will be using VMware Fusion in this post).
  • Download the appropriate virtual appliance/OVA for your desktop hypervisor of choice; the links to them are in the setup guide.
  • After the appropriate OVA has been downloaded, go ahead and import the Sandbox virtual appliance. If you are using VirtualBox, there are additional configuration steps you must perform first. The import process should take approximately five to 10 minutes.

  • Once the import is complete, you can go ahead and start the VM without modification if you using VMware Fusion, Player or Workstation. If you are using VirtualBox, there are additional configuration steps you must perform first.

  • During the boot process, the Sandbox VM will display minimal status messages. If you want to see the entire boot process, click in the VM and hit the [esc] key. You will see the Chef server start up, the node converge and OpenStack services start.

  • After bootup is complete, you will see a screen showing the management IP addresses for both RPC and the included Chef Server. You will be provided the user name and password to log on to the Horizon dashboard and on to the actual Sandbox server.

Taking RPC For A Spin

  • Go ahead and bring up the Horizon dashboard in your web browser of choice. Note that although the dashboard has the RPC skin, everything else about it is the base dashboard that is part of OpenStack trunk.

  • Since we are logging in as the Cloud Admin, we will see with the Admin “Overview” screen; this screen would not be available for Project/Tenant admins.

  • Click on the “Project” tab on the left side of the dashboard to access the “Admin” Project (this is one of multiple Projects you can create as a Cloud Admin) and click on the “Instances” page.

  • Now let’s launch our first cloud instance by clicking on the “Launch Instance” button. In the dialog box that pops up, type in an instance name and choose the available 512MB Flavor (you have the ability to create additional flavors). Then select “Boot From Image” as the Instance Boot Source. Note that while the setup guide states that an Ubuntu image is preloaded, it is actually a cirros Linux image that is preloaded and you should choose that as the source.

  • Once you click “Launch,” you should see your new cloud instance created within minutes. Note that a private IP address, not accessible from outside the “Admin” Project, has been assigned to this instance. In a moment, we will make some configuration changes to allow external access to and from our laptop or workstation.

  • All configuration changes that can be performed via the dashboard can also be performed via CLI. To demonstrate this, we’ll walk though some examples by using the CLI to configure access to our newly created instance.
  • First, we’ll modify the security group rules to allow us to ping our instance and to connect via a secure shell (SSH) session. To do that from the CLI, login to the Sandbox as root and execute the following commands:
    • nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0 (This will allow us to ping our instance.)
    • nova secgroup-add-rule default tcp 22 22 0.0.0.0/0 (This will open port 22 to allow us to login to our instance using ssh.)

  • To access our instance, we’ll need to assign it an external floating IP address. But first, we ‘ll need to create a pool of floating IP addresses that can be associated with our launched instances; these IP addresses will be accessible from outside our RPC Sandbox. For this exercise, we will create an address pool called “public” with floating IP addresses in the same network as our Sandbox.
  • Create this pool by typing a command with the following syntax – “nova-manage floating create x.x.x.x/x public.” You can see the IP addresses that have been created by typing “nova-manage floating list.” An example can be seen below:

  • Now we can go back to the dashboard and make our instance accessible via SSH. First, go back to the “Admin” Project tab and to the “Access & Security” page. The first tab is the “Security Groups” tab where you will see the “default” security group already created.

  • You will recall that earlier we added two rules to the “default” security group: one rule to allow ICMP packets from any source address and a second rule to allow access via TCP port 22 from any source. To see these rules, click on the “Edit Rules” button.

  • Now go back to the previous window and go to the “Keypairs” page. You will see, as discussed in the setup guide, an SSH key called “adminKey” has been created as part of the RPC Sandbox.

  • Now let’s associate a new floating IP address with our cloud instance. Navigate to the “Floating IPs” page and start by clicking on the “Allocate IP To Project” button to access the “Allocate Floating IP” dialog box. At this point, the only pool available is the “public” pool we created earlier and it should already be selected. Go ahead and click on the “Allocate IP’ button and you’ll see the first available Floating IP address ready for association.

  • To associate this floating IP address with our instance, go ahead and click on the “Associate” button. In the “Manage Floating IP Associations” dialog box, choose the IP address you want to associate (we only have one address at this point) and choose the instance we created as the “Instance to be associated.” Finish by clicking on the “Associate” button.

  • Go back to the “Instances” page and you should see the floating IP address assigned to our instance. This IP address will provide two-way access to the “outside” world using SNAT/DNAT.

  • Now we should be able access our instance from our laptop or workstation. Open up a terminal on your laptop or workstation and open a ssh session using the floating IP address and login on as a user called “cirros.”¬† The password is “cubswin:)”

  • The last task I will walk though in this post is creating a Cinder block volume and attaching it to our instance. To get started, navigate to the “Volumes” page and click on the “Create Volume” button.

  • In the “Create Volume” dialog box, type in a volume name, choose “TestVolType” as the Type (this field is optional), choose a volume size and leave “Volume Source” as empty. Note that you could choose “Image” as the “Volume Source” which would allow you to create a volume from either a Glance image or a snapshot. After filling in all required fields (illustrated below), click on the “Create Volume” button to create your new Cinder block volume.

  • To attach the Cinder volume to our instance, click on the “Edit Attachments” button. In the dialog box, select our instance in the drop down “Attach To Instance” box and fill out the “Device Name” field (in this case, you can use the suggested name).

When the attachment process is completed, you will be brought back to the “Volumes” page showing our Cinder volume attached to our instance in the “Attached To” field.

Conclusion

If you’ve managed to follow along through this entire post, CONGRATULATIONS! You’ve brought up an OpenStack cloud platform using the Rackspace Private Cloud Sandbox, launched and configured a cloud instance and created and attached a Cinder block volume to your instance. There are numerous other features and tasks to explore which I will walk though in a follow-up post. Meanwhile, I recommend reading the OpenStack Admin User Guide and the OpenStack End User Guide for more information.

About the Author

This is a post written and contributed by Rackspace .


More
1 Comment

Awesome, great for learning and testing. Thank you very much.
Is it possible to enable and launch docker containers with this setup ?

avatar Bobby C on February 26, 2014 | Reply

Leave a New Comment

(Required)


Racker Powered
©2014 Rackspace, US Inc.