Deploy Openstack using Kolla Ansible [Step-by-Step]

Deepak Prasad



Overview on Kolla Ansible

In this tutorial I'll teach you how to install Openstack Kolla Ansible on Ubuntu 20.04 on a VMware workstation step by step.

The Kolla project is described as a service that provides production-ready containers and deployment tools to operate OpenStack clouds that are scalable, fast, reliable, and upgradable using community best practices.

In order to deploy OpenStack, Kolla has three projects as follows:

  • kolla: All the Docker container images for OpenStack projects are maintained in this project. Kolla provides an image building tool called kolla-build to build container images for most of the projects.
  • kolla-ansible: This provides Ansible playbooks for deploying OpenStack inside Docker containers. It supports both the all-in-one and multi-node setups of the OpenStack cloud.
  • kolla-kubernetes: This deploys OpenStack on Kubernetes. This aims to leverage the self-healing, health checks, upgrade, and other capabilities of Kubernetes for managing containerized OpenStack deployment. kolla-kubernetes uses Ansible playbooks and the Jinja2 template to generate configuration files for the services.


Kolla's advantages

On the market, there are several OpenStack deployment tools and solutions. The advantages of Kolla are mostly due to container technology:

Rapid deployment, smooth upgrade, and upgrade impact time is very short.

The upgrade granularity is small. It can be upgraded in units of components. For example, to upgrade the nova component, use the kolla-ansible -i ~/kolla/all-in-one upgrade -t nova command.

Only the operating system is compatible with docker.

Docker reduces a lot of conflicts between the openstack installation package and the basic installation package.

The kolla project has better community support.


What we intend to do

We are planning to deploy All in One OpenStack deployment using Ubuntu 20.04 as our host server, where:

  • kolla-ansible uses the  installation package.
  • The kolla-ansible runtime environment uses virtualenv instead of the local python environment.
  • Docker's registry uses the public Docker Hub instead of building it yourself.
  • The openstack components deployed in this experiment are nova, neutron and some neutron plug-ins, heat, glance, cinder-volume , and horizon.

By the end of this tutorial, you will have an up and running OpenStack deployment with all the services running on the same Ubuntu server.


Host Machine Requirements

Here the host machine is the server on which we will be installing the kolla ansible to deploy openstack. In our case the host server is Ubuntu 20.04 Virtual Machine running on VMware Workstation.

The following minimal criteria must be met by the host machine:

  • 2 network interfaces
  • 8GB main memory
  • 40GB disk space



This article assumes that you already have fair idea of using Ansible. You may follow our detailed ansible tutorial to get more insights.

The host server (Ubuntu 20.04) must have an active internet connection as during the course of this tutorial, we will also download and install certain packages.


My Lab Environment

To demonstrate the steps to deploy OpenStack using Kolla Ansible, we will be using VMs created using VMware Workstation. So, I have already installed VMware Workstation on my Windows Desktop on which I have created a VM using the following specs:

  • OS: Ubuntu 20.04
  • RAM: 16GB
  • Disk: 100 GB
  • CPU: Quad Core
  • ens33(Bridge):
  • ens34(NAT): Make sure no IP Address is assigned to this interface


Step-1: Install dependency packages

Always install stable version of python to avoid conflicts and errors. Before installation update you Ubuntu machine to get latest packages and dependencies.

Run the following command in your terminal to update the packages.

golinuxcloud@ubuntu:~$ sudo apt update

In the next step I am going to install python build and dependencies.

golinuxcloud@ubuntu:~$ sudo apt install python3-dev libffi-dev gcc libssl-dev


Step-2: Create Python Virtual Environment

In this step I am going to create a virtual environment to avoid any conflicts with the system and site packages. When the virtual environment is created I am going to install Kolla Ansible and its dependencies.

First I need to install Python virtual environment package and we need “pip” and for that I am going to use the following commands.

golinuxcloud@ubuntu:~$ sudo apt install python3-pip

Deploy Openstack using Kolla Ansible [Step-by-Step]

Then install virtual environment.

golinuxcloud@ubuntu:~$ sudo apt install python3-virtualenv

Deploy Openstack using Kolla Ansible [Step-by-Step]

Verify your virtual environment installation with following command.

golinuxcloud@ubuntu:~$ virtualenv --version
virtualenv 20.0.17 from /usr/lib/python3/dist-packages/virtualenv/

In the next step I am going to create a virtual environment and name it” golinux” with the following command. I have created my environment in “home” directory.

golinuxcloud@ubuntu:~$ python3 -m venv golinux

Deploy Openstack using Kolla Ansible [Step-by-Step]
This command will create the following directory structure:

golinuxcloud@ubuntu:~$ ls -l golinux/
total 20
drwxrwxr-x 2 golinuxcloud golinuxcloud 4096 Nov 27 23:01 bin
drwxrwxr-x 2 golinuxcloud golinuxcloud 4096 Nov 27 23:01 include
drwxrwxr-x 3 golinuxcloud golinuxcloud 4096 Nov 27 23:01 lib
lrwxrwxrwx 1 golinuxcloud golinuxcloud    3 Nov 27 23:01 lib64 -> lib
-rw-rw-r-- 1 golinuxcloud golinuxcloud   70 Nov 27 23:01 pyvenv.cfg
drwxrwxr-x 3 golinuxcloud golinuxcloud 4096 Nov 27 23:01 share

Now we will activate our virtual environment that we have created and will configure everything in that environment.

golinuxcloud@ubuntu:~$ source golinux/bin/activate
(golinux) golinuxcloud@ubuntu:~$

Once you activate the virtual environment, your terminal prompt will change as shown above which would mean that you are inside the virutal environment.


Step-3: Install dependency packages using virtual environment

Next we must handle some more dependencies before we go ahead and install Kolla Ansible. Upgrade the pip to the latest version using the command.

golinuxcloud@ubuntu:~$ pip install -U pip

Deploy Openstack using Kolla Ansible [Step-by-Step]

Install Ansible. Kolla Ansible requires at least Ansible 2.10 and supports up to 4.

golinuxcloud@ubuntu:~$ pip install 'ansible<5.0'

Deploy Openstack using Kolla Ansible [Step-by-Step]


Step-4: Install and Setup Kolla Ansible

Next we will install Kolla-ansible using pip command:

golinuxcloud@ubuntu:~$ pip install kolla-ansible

Create the /etc/kolla directory for the configuration of kolla and Openstack projects

golinuxcloud@ubuntu:~$ sudo mkdir -p /etc/kolla

Change the ownership of the directory. Here replace golinuxcloud with the user you are using for the deployment.

golinuxcloud@ubuntu:~$  sudo chown golinuxcloud:golinuxcloud /etc/kolla

Deploy Openstack using Kolla Ansible [Step-by-Step]

For our deployment, the most crucial files are globals.yml and passwords.yml, copy these two files to the /etc/kolla directory.

(golinux) golinuxcloud@ubuntu:~/golinux$ cp -r /home/golinuxcloud/golinux/share/kolla-ansible/etc_examples/kolla/* /etc/kolla/

Copy the inventory file to the /etc/kolla folder as well. Inventory files are simply used to notify kolla-ansible which are our hosts and type of installation we need on these hosts.The inventory file defines the division of ansible host groups. If it is an all-in-one environment, use the all-in-one file directly without modification.

(golinux) golinuxcloud@ubuntu:~/golinux$ cp /home/golinuxcloud/golinux/share/kolla-ansible/ansible/inventory/* /etc/kolla/

In our case we will use all-in-one file because we use multinode file when we are deploying OpenStack on more than one host

(golinux) golinuxcloud@ubuntu:~$ ls -l /etc/kolla/
total 64
-rw-rw-r-- 1 golinuxcloud golinuxcloud  8980 Nov 27 23:14 all-in-one
-rw-rw-r-- 1 golinuxcloud golinuxcloud 30991 Nov 27 23:14 globals.yml
-rw-rw-r-- 1 golinuxcloud golinuxcloud  9446 Nov 27 23:14 multinode
-rw-rw-r-- 1 golinuxcloud golinuxcloud  4854 Nov 27 23:14 passwords.yml


Step-5:Configure Ansible

Create an ansible directory and ansible.cfg file

golinuxcloud@ubuntu:~$ sudo mkdir /etc/Ansible

Here is the sample content of ansible.cfg file:

golinuxcloud@ubuntu:~$ sudo vi /etc/ansible/ansible.cfg

Deploy Openstack using Kolla Ansible [Step-by-Step]


Step-6: Create Inventory

I am deploying everything in one machine. Therefore, I will use all-in-one inventory file.

The file being kept as it is because we are only using one host for installation you can change the file as you need for you OpenStack installation.The inventory file defines the division of ansible host groups. If it is an all-in-one environment, use the all-in-one file directly without modification.

golinuxcloud@ubuntu:~$ cat  /etc/kolla/all-in-one
# These initial groups are the only groups required to be modified. The
# additional groups are for more control of the environment.
localhost       ansible_connection=local

localhost       ansible_connection=local

localhost       ansible_connection=local

localhost       ansible_connection=local



Step-7: Configure globals.yml

globals.yml is the most important file in kolla Ansible. There are few options that we need to add in the file.

  • enable_haproxy:
  • kolla_internal_vip_address(ens33): Next we need to provide floating IP for management traffic. This IP will be managed by keepalived to provide high availability, and should be set to be not used address in management network that is connected to our network_interface.
  • network_interface: This is the default interface for multiple management-type networks
  • neutron_external_interface(ens34):  Second interface required is dedicated for Neutron external (or public) networks, can be vlan or flat, depends on how the networks are created. This interface should be active without IP address.
  • enable_cinder: Kolla Ansible provides a bare compute kit, however it does provide support for a vast selection of additional services. To enable them, set enable_* to “yes”
  • kolla_base_distro: Kolla provides choice of several Linux distributions in containers. But if you are deploying for the first time i will recommend that you should use Ubuntu or Centos.


Sample output:

$ cat /etc/kolla/globals.yml
kolla_internal_vip_address: ""
network_interface: "ens33"
neutron_external_interface: "eth1"
enable_cinder: "yes"
kolla_base_distro: "Ubuntu"


Step-8: Generate Password

In the next step generate the password for the services. These generated passwords will be stored in /etc/kolla/passwords.yml file

golinuxcloud@ubuntu:~$ kolla-genpwd

Deploy Openstack using Kolla Ansible [Step-by-Step]


Step-9: Perform Deployment

Once the passwords are generated and every thing is done without getting  errors. Now in the next step we are going to install bootstrap servers.

golinuxcloud@ubuntu:~$ kolla-ansible -i /etc/kolla/all-in-one bootstrap-servers

Ansible playbooks will be running using this command. This will take some time if you get “failed=0” at your terminal when the command is finished and you will see the following output.
Deploy Openstack using Kolla Ansible [Step-by-Step]

Always do deployment checks.

golinuxcloud@ubuntu:~$ kolla-ansible -i /etc/kolla/all-in-one prechecks

You would get the same output like bootstraping if everything’s goes without any errors.

In the last step we will perform deployment.

golinuxcloud@ubuntu:~$ kolla-ansible -i /etc/kolla/all-in-one deploy

Now install the Openstack client and its dependencies using pip.

(golinux) golinuxcloud@ubuntu:/$ pip install python-openstackclient

Deploy Openstack using Kolla Ansible [Step-by-Step]

Step-10: Post Deployment

Now createadmin-openrc” file that basically contains admin credentials.

(golinux) golinuxcloud@ubuntu:/etc/kolla$ kolla-ansible post-deploy  /etc/kolla/

Now in the next step we will run the deployment.

(golinux) golinuxcloud@ubuntu:~$ source /etc/kolla/

Deploy Openstack using Kolla Ansible [Step-by-Step]

(golinux) golinuxcloud@ubuntu:~$ cd /home/golinuxcloud/golinux/share/kolla-ansible

The initialization script will create virtual machine resources such as cirros image, network, subnet, routing, security group, specification, quota, etc.

(golinux) golinuxcloud@ubuntu:~/golinux/share/kolla-ansible$ ./init-runonce

Mange your Openstack using the Graphical User Interface.

Deploy Openstack using Kolla Ansible [Step-by-Step]

Use Openstack client commands list different images, host and services. You can do a lot of things with Openstack client.

Deploy Openstack using Kolla Ansible [Step-by-Step]

Deploy Openstack using Kolla Ansible [Step-by-Step]



This method of deployment of Openstack using Kolla Ansible is easiest way of using cloud services and you can learn a lot. I hope my article was helpful to you in understanding the Openstack deployment on Ubuntu 20.04 using Kolla Ansible. Let me know how I can improve more to help you on cloud services.


What's Next

How to Install TripleO Undercloud (Openstack) on RHEL 7
How to Configure Tripleo Undercloud to deploy Overcloud in OpenStack



Openstacl CLI List
Operating Kolla


Further Reading

You can use the above references to get understanding of Openstack commands and other services that are running in the Openstack.


Views: 237

Deepak Prasad

He is the founder of GoLinuxCloud and brings over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels in various domains, from development to DevOps, Networking, and Security, ensuring robust and efficient solutions for diverse projects. You can reach out to him on his LinkedIn profile or join on Facebook page.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to

Thank You for your support!!

Leave a Comment

GoLinuxCloud Logo

We try to offer easy-to-follow guides and tips on various topics such as Linux, Cloud Computing, Programming Languages, Ethical Hacking and much more.

Programming Languages