Script to Create OpenStack Node with DevStack on CentOS 7

A lot of times, it is necessary to have an OpenStack deployment that can be quickly set up for testing and training. DevStack is a series of scripts that help to set up OpenStack very quickly. It is mostly used for development environments and functional testing of OpenStack's different projects. This article will detail the steps needed to deploy OpenStack on a CentOS 7 system, using DevStack.

Generate Passwords

You will need to generate four passwords that will be used byDevStack to configure OpenStack:

    • OpenStack Admin
    • Database
    • RabbitMQ
    • Services

You can generate passwords using the openssl CLI tool:

openssl rand -hex 8


On your CentOS 7 system, upgrade to the latest software packages, and install git as well, which will be needed to obtain the scripts.
As root:

yum update; yum install git

Create a user "devstack" to run DevStack with:

adduser devstack

Give sudo privileges to the devstack user by running visudo as root, and entering the following line into the file:

devstack ALL=(ALL) ALL

Switch to the devstack user, and change to its home directory:

su devstack

Obtain the DevStack scripts by cloning the DevStack repository from GitHub:

git clone


Create a local.conf file inside the cloned repository's directory (should be /home/devstack/devstack), and insert the following lines, substituting the passwords that were generated beforehand:

[[local|localrc]] ADMIN_PASSWORD=OpenstackAdminPassword

This is the most basic configuration that can be set. The official devstack configuration reference lists several possible setups and configuration options, should there be further customization required.

Run DevStack

Now that everything is in place, we are now ready to execute DevStack:


This will start the execution of the DevStack scripts. Depending on your Internet connection speed, it could take a while, as it will install packages and pull code from The Internet. On a 16Mbps Internet Connections, it took approximately an hour for DevStack to run to completion.

After concludes its execution, you should see the last few lines of output as something like this:

DevStack Component Timing
Total runtime 3755

run_process 57
pip_install 847
restart_apache_server 18
wait_for_service 38
yum_install 717
git_timed 814

This is your host IP address:
This is your host IPv6 address: ::1
Horizon is now available at
Keystone is serving at
The default users are: admin and demo
The password: secret
2016-07-11 09:25:25.644 | WARNING:
2016-07-11 09:25:25.644 | Using lib/neutron-legacy is deprecated, and it will be removed in the future
2016-07-11 09:25:25.644 | completed in 3755 seconds.
[[email protected] devstack]$

This means that everything involving OpenStack installation and configuration went as expected.

You now have the following OpenStack services running on your node:

  • Keystone
  • Glance
  • Nova
  • Cinder


By running

screen -ls

You should see that DevStack created a screen session automatically. This screen contains multiple windows, wherein each OpenStack service runs. Connect to it by executing

screen -x

You may cycle to the next screen by Hitting Ctrl+a, then space.

Using screen can be particularly intimidating to use; a screen quick reference document is often needed by beginners.

You may now visit the OpenStack Dashboard by using a Web Browser to navigate to the URL that was presented by DevStack, in our case:

Horizon is now available at

The DevStack Dashboard (logged in)


Creating a test OpenStack deployment on CentOS 7 is pretty easy with DevStack. Once again, it should be noted that this is for testing purposes only, and is in no way recommended for production environments. Should further services or configuration customization be required, the devStack configuration reference should be consulted.

Ludwig Tirazona 5:30 am

About Ludwig Tirazona

Ludwig Tirazona is a Linux Infrastructure Architect who has been working full-time with Linux since 2008. Obsessed with High-Availability, Performance and Uptime, he is currently into Open Source IaaS and PaaS solutions, like OpenStack, Cloud Foundry, and Docker.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.