How to Install OpenStack in Less Than an Hour
OpenStack is a framework for building IT infrastructure. This framework consists of a collection of many smaller projects including OpenStack Nova (compute), Keystone (identity service), Glance (image service), Neutron (networking), and many others.
These components are combined into working software, either through a do-it-yourself (DIY) approach or by using one of the many available distributions. Brave admins will go the DIY route which allows you to select exactly which components you need and stay on the cutting edge with constant access to the latest and greatest OpenStack releases, which happen every six months.
A distribution is less work to build and maintain. You can get the whole setup installed in less than an hour -- although you will also need to wait for the hot new features from the latest OpenStack releases.
There are many available OpenStack distributions including RDO/RHOS, Mirantis, SUSE, Ubuntu, DevStack, HPE, Oracle, VMware and others in the OpenStack marketplace. However, they are not all lightweight. The distribution you choose will depend on its features. These include the following:
Support offering (to help you out if things go wrong)
Integration with your existing infrastructure
Support for different hypervisors. Some distributions don't go beyond supporting KVM, while others include support for nearly all of the available hypervisors.
Pick your distribution
The first step is to pick your distribution. My personal favorite is Red Hat based OpenStack, running on CentOS (RDO). It offers different deployment solutions which will lead to a fairly standardized configuration. It’s lightweight, running on a minimum of 6 GiB RAM, and supports KVM and ESXi hypervisors. And best of all it’s free, with a fast and easy deployment using Packstack. This makes it ideal to configure a demo OpenStack that will run as a virtual machine on your laptop, for instance.
For a POC setup, install CentOS using the ”Server with GUI” installation pattern. Make sure you have at least 6 GiB RAM, more is better! Note that the Packstack installer will allocate processes according to the number of CPUs you’re using, which highly increases RAM requirements. If you're installing in a VM, it's a good idea to configure it with just 1 CPU while installing, and if so required, increase the number of CPUs one the installation has finished.
After installation, use yum search openstack. It will show a list of packages available for different distributions. I recommend that you don’t use the latest release, but the one before as it’s likely to have fewer bugs.
You can install OpenStack with a few simple commands:
yum install centos-release-openstack-ocata
yum install openstack-packstack
packstack --answer-file=/root/answers.txt (takes 10-15 minutes, depending on Internet speed)
An important part of the installation is the answer file. This long file contains a long list of parameters that need to be configured to determine what is going to be installed and how it will be installed. Below is a list of some of the parameters I'd recommend that you change to get to a simple POC setup.
Verifying the Installation
Once the Packstack based installation has finished, you'll want to figure out if it was successful. A few simple commands can help you verify your installation. To start with, use source ˜/keystonerc_admin. This command sources the OpenStack credentials file that has automatically been created. This file authenticates you with Keystone, the OpenStack authentication service, after which you'll have full access to all of the OpenStack components and you'll be able to run the different OpenStack commands.
Another useful command is openstack-status (you'll need to install the openstack-utils RPM). After sourcing the credentials file, it gives an overview of the complete configuration that's currently operational. You can also use the OpenStack command-line interface. The openstack command from the CLI has hundreds of options to allow you to manipulate all parts of OpenStack. Type, for example:
openstack user list
which will show a list of users currently configured in your OpenStack cloud.
After verifying that OpenStack has been configured successfully, you can also start a browser and connect to the Horizon configuration interface. This is a nice graphical interface that gives easy access to most of the tasks that OpenStack admins need to do on a frequent basis.
Now that it’s installed and verified, services are defined in the database and exist at a Keystone level, many configuration files have been created with a common structure, and SDN has been set up, all through the magic of Packstack.
Now you can get started creating a project and user and running an instance. In part 2 of this series on OpenStack, I’ll show you how to get instances up and running in 40 minutes!
Now updated for OpenStack Newton! Our Essentials of OpenStack Administration course teaches you everything you need to know to create and manage private and public clouds with OpenStack. Download a sample chapter today!