Kolla Ansible deploying OpenStack wallaby on Ubuntu 20.04 [part-1]

Share this article

Prepration phase

Minimum machine requirements

For this experiment, we are using an ubuntu 20.04 server Virtual machine, you can also use these operating systems for your deployment.

Minimum machine requirements are following:

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

In my virtual machine, I have only one network interface, I have created an extra network interface. Follow create new interface guide to check out how to create a new interface.

Installing Python

Update ubuntu to get information on the newest versions of packages and their dependencies.

ubuntu@ubuntu-exp:~$ sudo apt update

Now, Installing python build and dependencies.

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

Creating python virtual environment

To avoid conflicts with the system site-packages, we will use a virtual environment to install Kolla Ansible and its dependencies.

Use the following command to install the virtual environment package.

ubuntu@ubuntu-exp:~$ sudo apt install python3-venv

For creating the virtual environment I am using my my home folder and use the following command to create virtual environment

ubuntu@ubuntu-exp:~$ pwd
ubuntu@ubuntu-exp:~$  python3 -m venv  wallaby
ubuntu@ubuntu-exp:~$ ls

Now switch to the virtual environment. By using below-mentioned command

ubuntu@ubuntu-exp:~$ source wallaby/bin/
Activate.ps1      activate          activate.csh      activate.fish     easy_install      easy_install-3.8  pip               pip3              pip3.8            python            python3
ubuntu@ubuntu-exp:~$ source wallaby/bin/activate
(wallaby) ubuntu@ubuntu-exp:~$ 

Now we will run all the commands in our virtual environment. In my case, you can see (wallaby) at the start of the command line, which means I am working in my virtual environment.

Installing important package for the deployment

Install the latest version of pip by using the following command.

(wallaby) ubuntu@ubuntu-exp:~$ pip install -U pip

Install Ansible. The important thing to note here Kolla Ansible version should be from Ansible 2.9  to 2.10. Therefore, to make sure to use the following command.

(wallaby) ubuntu@ubuntu-exp:~$ pip install ansible==2.9.27
(wallaby) ubuntu@ubuntu-exp:~$
(wallaby) ubuntu@ubuntu-exp:~$
(wallaby) ubuntu@ubuntu-exp:~$ pip list |grep ansible
ansible       2.9.27
ansible-base  2.10.12
(wallaby) ubuntu@ubuntu-exp:~$ 

Install kolla-ansible and its dependencies.

(wallaby) ubuntu@ubuntu-exp:~$ pip install kolla-ansible


Create the /etc/kolla directory for the configuration of kolla and Openstack projects (we will see in later section and in other blogs). Also change ownership of the kolla directory. In my case my user name is ubuntu.

(wallaby) ubuntu@ubuntu-exp:~$ sudo mkdir -p /etc/kolla 
(wallaby) ubuntu@ubuntu-exp:~$ 
(wallaby) ubuntu@ubuntu-exp:~$ 
(wallaby) ubuntu@ubuntu-exp:~$ sudo chown $USER:$USER /etc/kolla
(wallaby) ubuntu@ubuntu-exp:~$ 
(wallaby) ubuntu@ubuntu-exp:~$ ll /etc/|grep kolla
drwxr-xr-x  2 ubuntu ubuntu     4096 Aug  3 14:34 kolla/
(wallaby) ubuntu@ubuntu-exp:~$ 

The most important files are  globals.yml and passwords.yml for our deployment. Therefore, copying these two files to /etc/kolla directory.

(wallaby) ubuntu@ubuntu-exp:~$ cp -r wallaby/share/kolla-ansible/etc_examples/kolla/* /etc/kolla 
(wallaby) ubuntu@ubuntu-exp:~$ 
(wallaby) ubuntu@ubuntu-exp:~$ ls /etc/kolla/
globals.yml    passwords.yml  
(wallaby) ubuntu@ubuntu-exp:~$ 

Also, copy the inventory file to the /etc/kolla folder. Inventory files are basically which are used to tell the kolla-ansible which are our hosts and type of installation we need on these hosts.

(wallaby) ubuntu@ubuntu-exp:~$ cp wallaby/share/kolla-ansible/ansible/inventory/* /etc/kolla/
(wallaby) ubuntu@ubuntu-exp:~$ 
(wallaby) ubuntu@ubuntu-exp:~$ ls /etc/kolla/
all-in-one     globals.yml    multinode      passwords.yml  
(wallaby) ubuntu@ubuntu-exp:~$ 

When we are deploying OpenStack more than one host then we use multinode file. In our case we will use all-in-one file.

Ansible configuration

Tune the ansible configuration for better results. Use the following commands to create an ansible directory and ansible.cfg file.

(wallaby) ubuntu@ubuntu-exp:~$ sudo mkdir /etc/ansible
(wallaby) ubuntu@ubuntu-exp:~$ sudo vi /etc/ansible/ansible.cfg
(wallaby) ubuntu@ubuntu-exp:~$ 

Your /etc/ansible/ansible.cfg should look like following

(wallaby) ubuntu@ubuntu-exp:~$ cat /etc/ansible/ansible.cfg
(wallaby) ubuntu@ubuntu-exp:~$ 

Deployement Configuration

Inventory configuration

In the previous steps, we have copied configuration files in /etc/kolla/ directory. In this blog, we are deploying everything in one machine. Therefore we will use all-in-one inventory file. This is a very long file where you can add the right host for your OpenStack installation and specify host explicitly for the OpenStack project.

We are keeping it as it is because we are installing everything on one host and it is the same machine itself where I have installed everything till now.

(wallaby) ubuntu@ubuntu-exp:~$ 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

localhost       ansible_connection=local

localhost       ansible_connection=local

Configuring globals.yml

global.yml file is the most important file. In this file, we mention that which OpenStack projects we want to install. For kolla docker image what base OS do we want. globals.yml file describes our whole deployment. In coming blogs, we will look more closely at this configuration file.

For now, we want only those projects which are most important for OpenStack deployment. Under Neutron -Networking Option heading I changed the network interface according to my interface name.

ifconfig command output from my machine, showing all the network interfaces in my VM.

ubuntu@ubuntu-exp:~$ ifconfig 
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet  netmask  broadcast
        inet6 fe80::f816:3eff:fe6e:4661  prefixlen 64  scopeid 0x20<link>
        ether fa:16:3e:6e:46:61  txqueuelen 1000  (Ethernet)
        RX packets 37643  bytes 243102588 (243.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30372  bytes 5130479 (5.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 536  bytes 55148 (55.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 536  bytes 55148 (55.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vr-br: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
        inet6 fe80::384f:ecff:fea3:ad68  prefixlen 64  scopeid 0x20<link>
        ether 3a:4f:ec:a3:ad:68  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 1120 (1.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


We are not using keepalive or haproxy. Therefore, we don’t need haproxy option and it is by default enabled. Also, we will change our kolla_internal_vip_address with your IP interface address. In my case, I have added ens3 IP address.

enable_haproxy: "no"
kolla_internal_vip_address: ""

network_interface: would be your interface where you have an IP address, which you are commonly using.
neutron_external_interface: Which we have created a virtual interface in the beginning.

network_interface: "ens3"
neutron_external_interface: "vr-br"

To enable the OpenStack project installation you have to enable the project in globals.yml under the OpenStack option heading.

For example, if you want to enable cinder service. You have to just enable by uncommenting and changing “no” to “yes” in front of the service like mentioned below.

enable_cinder: "yes"

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

(wallaby) ubuntu@ubuntu-exp:~$ kolla-genpwd


When the configuration is done. Firstly, we need to install docker or other important packages.

(wallaby) ubuntu@ubuntu-exp:~$ kolla-ansible -i /etc/kolla/all-in-one bootstrap-servers

After running this command you will see ansible playbooks running, if everything is fine you will see below-mentioned output on your terminals at the end.

PLAY RECAP *****************************************************************************************
localhost                  : ok=42   changed=21   unreachable=0    failed=0    skipped=36   rescued=0    ignored=0   

(wallaby) ubuntu@ubuntu-exp:~$ 

Do deployment checks. Similarly, like bootstrapping if everything is fine then there would be no error.

(wallaby) ubuntu@ubuntu-exp:~$ kolla-ansible -i /etc/kolla/all-in-one prechecks

Now, it is the time for deployment.

(wallaby) ubuntu@ubuntu-exp:~$ kolla-ansible -i /etc/kolla/all-in-one deploy

Check out part-2 of this tutorial, where we discuss issues we faced in whole process and testing of our deployment. This article is based on kolla-anisible Quick start Guide.

4 thoughts on “Kolla Ansible deploying OpenStack wallaby on Ubuntu 20.04 [part-1]”

  1. I have followed your guide but getting a Connection Timeout Error during the deploy step on RUNNING HANDLER [heat : Restart heat-api-cfn container]. There is no error in kolla/heat logs. Internet is also fine and accessing the URLs which are generating error during terminal access in installation process. Any help will be appreciated.

    1. From your message, it seems like there is something wrong with heat-api-cfn container. There could be many reasons for the issue. For more insight, you can look at the container logs use “docker logs heat_api_cfn” command. Also, you can run kolla-ansible command with verbose mode (mariadb_recoverykolla-ansible -i /etc/kolla/multinode deploy -vvv).
      If still these logs are not useful for correcting the issue, send me the logs.

  2. I have followed your guide, but the following command:
    ` kolla-ansible -i /etc/kolla/all-in-one bootstrap-servers`
    raise the following error:
    `ERROR: Ansible version should be between 2.11 and 2.12. Current version is 2.10.17 which is not supported.`

    However, it seems that there are no version “2.11 or 2.12” for ansible available!!!
    I tried the following command:
    `pip install ‘ansible=2.11’`
    but no result gained:
    `ERROR: No matching distribution found for ansible=2.11`

    1. Hi,
      When you are installing the Ansible version should be from Ansible 2.9 to 2.10. At the time when I wrote the article, using “pip install ‘ansible<3.0'” command was installing “ansible 2.9.27”.
      Now mentioned command in the article install ansible and ansible-base, you have to uninstall both packages for that use the following command “pip uninstall ansible ansible-base” and then install ansible by using “pip install ansible==2.9.27“.

      Also, you rightly mentioned that there is no version “2.11 or 2.12” for ansible.

Leave a Comment

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