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

#Specify the name of interface of your Server or VM in front of FLAT_INTERFACE

#Specify the Tenants Private Network and its Size

#Specify the range of external IPs that will be used in Openstack for floating IPs

#Number Host on which Openstack will be deployed

#Installation Logs file

#KeyStone Admin Password / Database / RabbitMQ / Service Password

#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.

7 thoughts on “OpenStack Deployment using Devstack on CentOS 7 / RHEL 7 System”

  1. As of today, you need to #chmod 755 /opt/stack before running ./ otherwise this will error out with an “583 path permission” error.

  2. Hi..
    Deployment complete without any error as per output above but horizon not able to launch ..with error below
    Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. I have deployed 3 times with same problem. Any solution please. Thanks

  3. while running file i am getting below error.

    ++functions:write_devstack_version:815 git log ‘–format=%H %s %ci’ -1
    +./ [[ ! rhel8 =~ (bionic|stretch|jessie|f30|opensuse-15.0|opensuse-15.1|opensuse-tumbleweed|rhel7) ]]
    +./ echo ‘WARNING: this script has not been tested on rhel8’
    WARNING: this script has not been tested on rhel8
    +./ [[ ” != \y\e\s ]]
    +./ die 227 ‘If you wish to run this script anyway run with FORCE=yes’
    +functions-common:die:193 local exitcode=0
    +functions-common:die:194 set +o xtrace
    [Call Trace]
    [ERROR] ./ If you wish to run this script anyway run with FORCE=yes
    /home/stack/devstack/functions-common: line 239: /opt/stack/logs/error.log: Permission denied

    1. Hi Vipin,

      It seems like you are trying this on CentOS 8 or RHEL 8 but the script is tested only on CentOS 7 / RHEL 7.

      I would recommend try this on CentOS 7 / RHEL 7 system as required package repositories and script are not available for CentOS 8 / RHEL 8

  4. everytime after deploying openstack using devstack when we reboot the system ,the openstack services are not coming up.

  5. Hello Pradeep,
    I followed your documentation. It helped me up to certain extent. –Thanks!
    However, I gave up on devstack and installed openstack using packstack which I found less troublesome than devstack, of course this is my personal opinion.

Leave a Reply

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