OpenStack Deployment using Devstack on CentOS 7 / RHEL 7 System

Devstack is a collection of scripts which deploy the latest version of openstack environment on virtual machine, personal laptop or a desktop. As the name suggests it is used for development environment and can be used for Openstack Project’s functional testing and sometime openstack environment deployed by devstack can also be used for demonstrations purpose and for some basic PoC.


In this article I will demonstrate how to install Openstack on CentOS 7 / RHEL 7 System using Devstack. Following are the minimum system requirements,

  • Dual Core Processor
  • Minimum 8 GB RAM
  • 60 GB Hard Disk
  • Internet Connection

Following are  the details of my Lab Setup for Openstack deployment using devstack

  • Minimal Installed CentOS 7 / RHEL 7 (VM)
  • Hostname – devstack-linuxtechi
  • IP Address –
  • 10 vCPU
  • 14 GB RAM
  • 60 GB Hard disk

Let’s start deployment steps, login to your CentOS 7 or RHEL 7 System

Step:1 Update Your System and Set Hostname

Run the following yum command to apply latest updates to system and then take a reboot. Also after reboot set the hostname

~]# yum update -y && reboot
~]# hostnamectl set-hostname "devstack-linuxtechi"
~]# exec bash

Step:2) Create a Stack user and assign sudo rights to it

All the installations steps are to be carried out by a user name “stack“, refer the below commands to create and assign sudo rights .

[[email protected] ~]# useradd -s /bin/bash -d /opt/stack -m stack
[[email protected] ~]# echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
[[email protected] ~]#

Step:3) Install git and download devstack

Switch to stack user and install git package using yum command

[[email protected] ~]# su - stack
[[email protected] ~]$ sudo yum install git -y

Download devstack using below git command,

[[email protected] ~]$ git clone
Cloning into 'devstack'...
remote: Counting objects: 42729, done.
remote: Compressing objects: 100% (21438/21438), done.
remote: Total 42729 (delta 30283), reused 32549 (delta 20625)
Receiving objects: 100% (42729/42729), 8.93 MiB | 3.77 MiB/s, done.
Resolving deltas: 100% (30283/30283), done.
[[email protected] ~]$

Step:4) Create local.conf file and start openstack installation

To start openstack installation using devstack script (, first we need to prepare local.conf file that suits to our setup.

Change to devstack folder and create local.conf file with below contents

[[email protected] ~]$ cd devstack/
[[email protected] devstack]$ vi local.conf
#Specify the IP Address of your VM / Server in front of HOST_IP Parameter
HOST_IP= #Specify the name of interface of your Server or VM in front of FLAT_INTERFACE
FLAT_INTERFACE=eth0 #Specify the Tenants Private Network and its Size
FIXED_NETWORK_SIZE=4096 #Specify the range of external IPs that will be used in Openstack for floating IPs
FLOATING_RANGE= #Number Host on which Openstack will be deployed
MULTI_HOST=1 #Installation Logs file
LOGFILE=/opt/stack/logs/ #KeyStone Admin Password / Database / RabbitMQ / Service Password
SERVICE_PASSWORD=sr-secret #Additionally installing Heat Service
enable_plugin heat master
enable_service h-eng h-api h-api-cfn h-api-cw

Save and exit the file.

Set the Permissions on /opt/stack

[[email protected] devstack]$  sudo chmod 755 /opt/stack

Now start the deployment or installation by executing the script (

[[email protected] devstack]$ ./

It will take between 30 to 45 minutes depending upon your internet connection.

While running the above command, if you got the below errors

+functions-common:git_timed:607            timeout -s SIGINT 0 git clone git:// /opt/stack/requirements --branch master
fatal: unable to connect to[0:]: errno=Connection timed out[1: 2001:4800:7819:103:be76:4eff:fe04:77e6]: errno=Network is unreachable
Cloning into '/opt/stack/requirements'...
+functions-common:git_timed:610            [[ 128 -ne 124 ]]
+functions-common:git_timed:611            die 611 'git call failed: [git clone' git:// /opt/stack/requirements --branch 'master]'
+functions-common:die:195                  local exitcode=0
[Call Trace]
[ERROR] /opt/stack/devstack/functions-common:611 git call failed: [git clone git:// /opt/stack/requirements --branch master]
Error on exit
/bin/sh: brctl: command not found
[[email protected] devstack]$

To Resolve these errors, perform the following steps

Install bridge-utils package and change parameter from “GIT_BASE=${GIT_BASE:-git://}” to “GIT_BASE=${GIT_BASE:-}” in stackrc file

[[email protected] devstack]$ sudo yum install bridge-utils -y
[[email protected] devstack]$ vi stackrc

Now re-run the script,

[[email protected] devstack]$ ./

Once the script is executed successfully, we will get the output something like below,


This confirms that openstack has been deployed successfully,

Step:5 Access OpenStack either via Openstack CLI or Horizon Dashboard

if you want to perform any task from openstack cli, then you have to firsr source openrc file, which contain admin credentials.

[[email protected] devstack]$ source openrc
WARNING: setting legacy OS_TENANT_NAME to support cli tools.
[[email protected] devstack]$ openstack network list
| ID                                   | Name    | Subnets                                                                    |
| 5ae5a9e3-01ac-4cd2-86e3-83d079753457 | private | 9caa54cc-f5a4-4763-a79e-6927999db1a1, a5028df6-4208-45f3-8044-a7476c6cf3e7 |
| f9354f80-4d38-42fc-a51e-d3e6386b0c4c | public  | 0202c2f3-f6fd-4eae-8aa6-9bd784f7b27d, 18050a8c-41e5-4bae-8ab8-b500bc694f0c |
[[email protected] devstack]$ openstack image list
| ID                                   | Name                     | Status |
| 5197ed8e-39d2-4eca-b36a-d38381b57adc | cirros-0.3.6-x86_64-disk | active |
[[email protected] devstack]$

Now Try accessing the Horizon Dashboard, URL details and Credentials are already there in stack command output.




Remove/ Uninstall OpenStack using devstack scripts

If are done with testing and demonstration and want to remove openstack from your system then run the followings scripts via Stack user,

[[email protected] ~]$ cd devstack
[[email protected] devstack]$ ./
[[email protected] devstack]$ ./
[[email protected] devstack]$ rm -rf /opt/stack/
[[email protected] ~]$ sudo rm -rf devstack
[[email protected] ~]$ sudo rm -rf /usr/local/bin/

That’s all from this tutorial, if you like the steps, please do share your valuable feedback and comments.

Posted by WordPress Guru