Monday, May 11, 2015

Run OpenStack on your laptop using DevStack

DevStack requires Ubuntu 14.04 (Trusty Tahr) to run. First create a sudo user in you Linux box.

If you are using any higher version of Ubuntu then you can forcefully run DevStack by setting FORCE environment variable to yes. However you may face issue due to python library mismatch.

export FORCE=yes

Add a new user to run DevStack. This step is optional and DevStack can be run from any sudo user.
Sudo is required since DevStack downloads various  packages and also mounts disk partitions.

groupadd stack
useradd -g stack -s /bin/bash -d /opt/stack -m stack

user@ubuntuvm:~$ id
uid=1001(stack) gid=1001(stack) groups=1001(stack),27(sudo),130(libvirtd)

apt-get install sudo -y
echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

DevStack project is hosted on GIT and therefore install git client if not installed.

sudo apt-get install git -y

git clone

To download a specific branch

git clone -b stable/juno devstack/

cd devstack

First this script will checkout DevStack source code from DevStack repository and it will download and install dependency packages from Ubuntu package repository. uses screen command. Once it is started you can close the terminal. To reconnect to the screen just ./

To stop DevStack, run


This will stop all the processes and close screens.

Configuration file

In DevStack features can be enabled or disabled through local.conf file. I have created a sample local.conf file in which almost all OpenStack components
are enabled.

git clone

cp local.conf /opt/devstack

Stop DevStack instance and restart it.

No comments:

Post a Comment