Chapter 7. Installing Nova

With the basics and theory behind us, it is time to get hands-on with Nova and install the code on a server. In this chapter, we will walk through the installation and configuration of Nova on a single node with both the StackOps distro and Ubuntu packages. You’ll get a feeling for the complexities of implementing your design choices in actual usage. While these installations will be only single nodes, they will contain the entire array of OpenStack software and features.

As we described back in StackOps, StackOps provides a distro for OpenStack with a bare metal installer. The bare metal installer automates most of the installation and configuration tasks, leaving very little command line or configuration file editing for the administrator. It will install an operating system, necessary software packages, and Nova configuration files for us.

Caution

Installing StackOps will overwrite any operating system on your server. It is not intended to overlay Nova onto already installed servers.

Since our purpose is to get some hands-on experience with Nova, we will be installing a single node that runs all the services. As StackOps is a full distribution, it makes many of the cloud design choices for us. The single node installation has made the following design choices:

  • nova-api supporting both the OpenStack API and EC2 API

  • nova-objectstore (instead of Glance) for an image service

  • nova-volume with iSCSI volumes

  • nova-network using FlatDHCP manager (configurable)

  • MySQL for our database

  • RabbitMQ for the messaging queue

  • nova-compute using KVM or UML for virtualization

  • MySQL database for authentication

  • nova-scheduler chance (default) scheduler

If you have any problems following along with the installation, you can find more detailed documentation at the StackOps Documentation Site.

StackOps has a very basic set of requirements for a minimal installation as you can see in Table 7-1. While these minimal requirements will get the system installed and running, you will be constrained in the number of virtual machines that you can launch. At the base 2GB of RAM, you might only be able to launch a single small instance.

As you can see, this minimal configuration should be able to be satisfied by most desktops or servers bought within the last few years.

Of course, the minimal requirements are only useful for a proof of concept or experimental system, but it fits perfectly for our needs. A more appropriately configured system could be used as a production system. The baseline for this would be as shown in Table 7-2.

For the purposes of this book, we will be installing on a very small server system called an HP ProLiant MicroServer™. While the exact model is irrelevant, it does show that StackOps and Nova can be installed on relatively inexpensive and modestly configured hardware (The MicroServer retails for under $400 in the United States). The test server specifications are shown in Table 7-3.

The StackOps Distro is available free from their community website at http://www.stackops.org/. It comes in several versions and two formats (CD or USB stick image). For the purposes of this book, we will be using version 0.2.1 - Build 112 (stackops-0.2.1-b112-d20110517), which is based on the Nova “Cactus” release. Once you have downloaded the software, burn it to a CD or transfer it to your USB stick (depending on which image you downloaded).

Now that we have our CD or USB stick ready, we will go ahead and install it on our server. As we decided earlier, we will be installing a single node system (everything running on one server) with basic network and iSCSI volumes. StackOps makes most of these configuration decisions easy for us with their predefined deployment scenarios. All together, they offer four deployment scenarios:

We’ll use the “Single Node” scenario for this exercise.

Your first step in installing your StackOps distro is the installation of the operation system, all the necessary prerequisite packages, OpenStack packages, and preconfigured nova components. In addition, it installs an agent that configures OpenStack for you. When you first boot your system with the CD or USB Stick, you’ll be greeted with the StackOps splash screen (as seen in Figure 7-1) that resembles most Linux distro installations.

After choosing the “Install StackOps Controller Node,” you’ll be led through a number of standard Linux installation screens. They will ask you about your language and keyboard layout before installing a number of basic components.

After it has completed the basic components installation, it will ask you to configure your network settings. Enter your IP address, management network IP, netmask, and default gateway address. It will then try and contact a public NTP (Network Time Protocol) server. If it fails, it will ask you to specify one manually.

Since I am putting this server on my home network, I have chosen 192.168.1.65 as my server node IP address. This is out of my home router’s DHCP block so that I won’t have any conflicts. I’ve set the gateway address to 192.168.1.254 (my DSL router) and used the normal 255.255.255.0 netmask.

Once the network has been configured, you will move on to disk partitioning. This shows standard Linux disk partitioning screens.

After the disk is partitioned and formatted, the base operating system and OpenStack packages will be installed. This will take a while. When it is finished, pop out the CD or USB stick and reboot the machine. It should boot to the command prompt, as shown in Figure 7-2.

Now that the machine is up and running, let’s test to make sure everything went all right before we move on to configuring our cloud. Login to the server as the “root” user with the password “stackops” to get a root user prompt. Check to make sure that the StackOps agent is running by checking its log file:

# more /var/log/nova/installer-agent.py.log
2011-07-04 11:28:14-0700 [-] Log opened.
2011-07-04 11:28:14-0700 [-] Starting server: 2011-07-04 11:28:14.515648
2011-07-04 11:28:14-0700 [-] twisted.web.server.Site starting on 8888

With the basic distro successfully installed, it is now time to configure the Nova software. StackOps has an agent-based “Smart Installer” that guides you through the configuration process, gives you intelligent defaults, and then applies the configuration to your newly installed server. While we are only using it for a simple single-node install here, it will also configure and apply to multiple servers according to their role in the deployment scenario.

The first step in running the Smart Installer is to connect a web browser to the address shown in the banner of your server’s login screen. This should be an address in the form of http://xxx.xxx.xxx.xxx:8888/, where xxx.xxx.xxx.xxx is your server’s IP address. Once you connect to that address, you will be redirected to Smart Installer login screen.

The first screen of the Smart Installer will ask you to create an account and then login. While creating an account is not a necessity, it will allow you to save, edit, and redeploy your configurations later. Figure 7-3 shows the login screen.

Once registered and logged in, the Smart Installer will step you through a number of screens to configure your Nova deployment. The first screen is the most important: choosing your deployment scenario (Figure 7-4). We will be using the “single node” scenario.

Next, it will help you configure your controller functions (nova-api, networks, database, queue, etc.) of your installation. The first of these screens will review your hardware configuration, as shown in Figure 7-5.

Once you review the hardware configurations, you can advance to the software requirements screen. This is also a read-only screen, and after reviewing your server network configuration, you can go on to the next screen.

The next screen shows the configuration options for network topologies. Since we are using a single-interface test server, we don’t need to change anything (it should be preset to your eth0 interface). In more advanced deployment scenarios, this screen lets you assign separate service, storage, and public networks. Advance to the next screen.

The next screen is the most important screen of our configuration. It shows the global service options. This screen allows you to customize the configurations for:

Of all these options, the only one that we must edit is the network section. Figure 7-6 shows the networking options.

Pay close attention these configurations. Misconfiguring this step will result in your instances not starting or being unable to be reached. Use the following guidelines for these options:

When you are satisfied with your network options, move on to the compute screen. All the options on this screen should be fine for our test installation. The only option that you might want to review is your libvirt type. This pull-down menu lets you choose between QEMU and KVM virtualization. Unless you do not have a KVM capable machine, you should leave it on KVM.

The final configuration screen for the Smart Installer is the volume options. You may need to change the lvm_device option to the device path for your empty partition that you created during the Install Operating System step.

Caution

As the screen says, “Choose a device that you are 100% sure is not already in use!” This device will be completely erased. I usually use a blank USB stick for this step and choose /dev/sdb1 from the pull-down menu.

With the volume configuration done, you are ready to install your configuration to your server, as shown in Figure 7-7.