More Than a Hobby..

CentOS 7 (64) OpenStack - DevStack Installation – Kilo

All images for VirtualBox and VMware have the same username and password. After logging into virtual machine that you’ve downloaded from here you can change ‘username’ & ‘password’ or create you new user.
Username – osboxes
Password – osboxes.org
For Root user account
Password – osboxes.org


login as: osboxes
Dit e-mailadres wordt beveiligd tegen spambots. JavaScript dient ingeschakeld te zijn om het te bekijken.'s password:
Last login: Fri May 27 12:29:02 2016
[osboxes@osboxes ~]$ sudo su -
Last login: Fri May 27 12:26:49 BST 2016 on pts/0
[root@osboxes ~]#


vi - press escape to get into command mode if you re not already in command mode (if you are, it s OK to press it anyway). :q to quit :w to save, :wq to do both.

Centos Lab11 : DevStack Installation – Kilo

DevStack is a tool that was initially developed to speed the deployment of OpenStack for development purposes, hence “Dev” Stack.

 Note:For this reason you should not use a DevStack deployment to build or run a ‘production’ OpenStack cloud.

DevStack also allows you to build a quick example OpenStack deployment with all of the latest features, as it pulls its components from the “master” branch of each of the services. One divergence to the ‘latest features’ model is that at present, DevStack still uses the nova-network engine by default; however, we provide instructions on how to enable Neutron in this lab exercise.

One thing that is both nice and potentially confusing is the range of options available to you when building an openstack deployment. For this lab exercise, we have chosen VirtualBox as a hypervisor and CentOS as the operating system. This should be a good place to start, as this lab is based on CentOS and VirtualBox is a free hypervisor. When you get through this lab exercise, you could try some of the other ‘flavors’ of OS available.

What’s that? Your really prefer Ubuntu? We have instructions for that too here: >>Get DevStack with Ubuntu<<

Step 1. Get VirtualBox

You need a base operating system on which to install DevStack, and in the spirit of the developer, this is often on a laptop. You will need a hypervisor of some nature to do this on your laptop. The following instructions will step you through obtaining and installing VirtualBox, a free hypervisor. If you already have a hypervisor installed, you can skip “using VirtualBox”, otherwise, you download the VirtualBox hypervisor and management UI from here:


Although we suggest using your laptop, it is also an option to use a remote virtual platform (or even a remote physical machine) to deploy onto.

Step 2. Install CentOS

Install the latest version of CentOS as a base OS for the installation Devstack. Download the latest CentOS image from the CentOS repository. We recommended you use the desktop version, to avoid some of the peculiarities of VirtualBox networking, as you would then potentially use the embedded graphical interface for use of tools like Horizon or other web services interfaces (e.g. if you used RESTclient for Firefox to exercise the actual REST APIs).


See the end of this section for potential alternatives.

Once you have the ISO, you will want to create a new VM in VirtualBox, select Linux and CentOS, and provide a name like “devstack1” for your instances. You’ll want 4 GB of RAM (2 GB is the minimum you can likely get away with), and you’ll want to define a 32 GB thin provisioned disk (We suggest using qcow2 when available as it tends to be a much smaller file size than other image formats). Once complete, start the VM, and add the ISO you downloaded to the machine. Once booted, follow the instructions to install CentOS onto the local disk.

Note: We are providing you with all the steps to build your own system. However, in some classes, you may also receive these files from the instructor via USB or similar method, or your instructor may provide you with an OVA bundle that you can install in most hypervisors to further accelerate the process of bringing up a DevStack environment. (OVA default user: centos, default password: centos)

Step 3. Start a terminal session and log in.

Once CentOS is installed in VirtualBox, or your OVA is imported and running, log into the user interface, and start a terminal session.

 While we did run operations as sudo in our lab, you do not want to do this during this DevStack process.

Step 4. Install OpenStack

sudo yum update -y
sudo yum install git -y
cd devstack
ONE: If you prefer to run Neutron, jump to step 6 before running stack.sh
TWO: If you don’t want to run neutron, just follow the instructions from DevStack.
Note:If the above command returns error status as “c- api did not start,” run the following commands:
./unstack.sh     #Ignore any errors, they are not likely to be relevant.
reboot                    #reboot your VM

Step 5.

Once the installation is complete, you will be provided with the IP address, username and password that can be used to access the Horizon dashboard. In the same directory where the stack.sh script was run, there is an openrc file that can be sourced (a little different than most as it allows for the potential to have more than just one user/tenant associated with the file), allowing the use of the command line client tools that are also installed:

source ./openrc admin admin

OR for the demo account:

source ./openrc demo demo

Run the below command to check the status of your instance:

nova list

Step 6. Install Neutron

It is often preferable to actually leverage the OpenStack Neutron project for the network service, and in fact in order to modify the behavior of DevStack, it is often useful to modify other services (documentation, as with many recent OSS projects is “in the script”). We’ll create a new file on the CentOS machine and copy in the following data {note copy in your VM}:

Create a new file called local.conf, and copy the below content into it, with vi or your favorite editor.

vi local.conf
# Uncomment the next line after you've run devstack once if you don't want to try to download everything again.

# Set default passwords, further accelerate deployment, maybe make this less generic if you're in an environment where someone may 'play' with your system

# This is the token used to set up Keystone – It just needs to be a long random string
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-metering
Note:The OFFLINE parameter reference – use this only after having run against this local.conf file, so that all of the code needed for Neutron is downloaded. Then setting it will speed up the re-start of DevStack if you want to tweak configuration parameters. (We do not cover this topic in this simple tutorial).

You may find it easier to grab this file from within the VM by pointing your browser (in the VM) to the following gist:




Step 7. Clean up

Once you’ve created your local.conf file, as defined above, run the un-stack.sh script to clean up your environment, and then run stack.sh again to build it against the new configuration. You may also want to run re-join-stack.sh in order to load the screen environment (where all of the services log files are accessible as separate screen sessions).


Note: This should run to completion, otherwise run the previous command again.

Stop here or check step 5 again for basic access/usage instructions or run the following for access to all of the log files.


Screen commands: <CTRL>-a List all screens in a tabular format <CTRL>-a D Leave the screen session (but do not destroy the screen sessions) screen -r Rejoin the screen session if you are in the same terminal as where you just left Otherwise, use re-join-stack.sh

Step 8. Start working with your new OpenStack environment.

As with Step 5, you now have a running environment and can use either Horizon or the CLI tools to manipulate the system.

Happy OpenStacking!