Our Private Cloud Core deployments provide workload orchestration through the use of Kolla Ansible which deploys OpenStack services and infrastructure components in Docker containers. Should you want to make a change to an OpenStack service’s configuration, add a new OpenStack service, or even repair your OpenStack cluster, you can do so using Kolla Ansible. In this guide, you will learn how to prepare a Kolla Ansible environment, from which changes can be made.
- Experience working with Docker
- Experience working with Ansible
Using Kolla Ansible
To start using Kolla Ansible, an environment needs to be created. This section explains the steps needed to create that environment.
Note! — Making changes using Kolla Ansible can potentially cause degradation of services or the cloud to be inoperable. Be careful!
To get a quick idea of what is required, here is a high-level overview of the steps:
# Copy Kolla Ansible configuration from fm-deploy docker container $ docker cp fm-deploy:/opt/kolla-ansible /opt/kolla-ansible # Navigate to /opt/kolla-ansible $ cd /opt/kolla-ansible # Initialize a Python virtual environment $ virtualenv .venv # Activate the virtual environment $ source .venv/bin/activate # Update pip pip install --upgrade pip # Install Kolla Ansible using requirements.txt $ pip install -r requirements.txt
Once prepared, make the needed changes and perform the Kolla Ansible run where
<subcommand> is one in the list of available Kolla Ansible commands:
$ kolla-ansible -i /etc/fm-deploy/kolla-ansible-inventory <subcommand>
These steps are explained in more detail below.
Prepare and use Kolla Ansible
Follow these steps to learn how to prepare and use Kolla Ansible.
- Globals file:
- Inventory file:
Note! — The above files may not be present on each host. Inspect each host until you find the above, and perform the Kolla Ansible run from this host.
Before Making Changes
Before any changes are made to the Kolla Ansible configuration, the following
/etc/kolla/globals.yml should not be modified, otherwise they
will be overwritten:
Prepare Kolla Ansible Environment
Step 1 – Prepare environment
From the Docker container called
the local file system:
$ docker cp fm-deploy:/opt/kolla-ansible /opt/kolla-ansible
Step 2 — Prepare Python virtual environment
Create a Python virtual environment from which Kolla Ansible will be used:
$ cd /opt/kolla-ansible $ virtualenv .venv $ source .venv/bin/activate
Step 3 — Update pip
If pip is not up to date, packages may not install.
Pip can be updated using:
pip install --upgrade pip
Step 4 — Install Kolla Ansible using
requirements.txt file is used to install Kolla Ansible. The release of
OpenStack your cloud is running will determine the version of Kolla Ansible to
install. This means you need to inspect
requirements.txt and ensure the
right version of Kolla Ansible is installed.
At the time of writing this guide, the OpenStack release used in Private Cloud Core is Victoria.
To determine the release your cloud is using, as root from a hardware node,
docker ps to get a list of all Docker containers running. In that
output is shown each OpenStack service’s image, appended with the OpenStack
$ docker ps cf9e23cef540 harbor.imhadmin.net/kolla/centos-binary-mariadb-clustercheck:victoria "dumb-init --single-â€¦" 8 days ago Up 8 days mariadb_clustercheck c19964a28b4e harbor.imhadmin.net/kolla/centos-binary-mariadb-server:victoria "dumb-init -- kolla_â€¦" 8 days ago Up 8 days mariadb
In this output, the second column represents a Kolla Ansible image and there are two entries. The output has been truncated and you should see many more Docker containers running than two. At the end of the image name the version of OpenStack for which that image is built can be seen following the colon:
The above indicates this OpenStack cloud is on the Victoria release.
Next, in a text editor load
requirements.txt and uncomment the appropriate
version for Kolla Ansible.
The contents of this file appears this way:
ansible>=2.9,<2.10,!=2.9.10 # Use one of the following supported OpenStack versions: #git+https://github.com/openstack/kolla-ansible@stable/train #git+https://github.com/openstack/kolla-ansible@stable/ussuri #git+https://github.com/openstack/kolla-ansible@stable/victoria
For the purpose of this demonstration, the OpenStack release is Victoria, so
within this file needs to be uncommented, or, in other words, remove the
The file should now appear this way:
ansible>=2.9,<2.10,!=2.9.10 # Use one of the following supported OpenStack versions: #git+https://github.com/openstack/kolla-ansible@stable/train #git+https://github.com/openstack/kolla-ansible@stable/ussuri git+https://github.com/openstack/kolla-ansible@stable/victoria
requirements.txt is prepared and can be used to install
(.venv) $ pip install -r requirements.txt
Step 5 — Make needed adjustments
This step is ultimately up to you to decide which action to take. Consider reviewing Kolla Ansible’s Operating Kolla user guide for examples of actions.
For a full list of available commands use
As an example, say you want to enable TLS for your Horizon. You will make the
needed configuration changes first, then to implement the change you will use
reconfigure Kolla Ansible subcommand.
Another example of what can be using Kolla Ansible is you can redeploy certain
portions of an OpenStack cloud. In the event a control plane node needs to be
replaced, the Kolla Ansible
deploy --tags rabbitmq subcommand can be used
to redeploy RabbitMQ while preparing the cloud to receive the new member.
The remaining part of this section walks you through enabling central logging as an example.
To enable central logging, pull up
/etc/kolla/globals.yml in a text editor,
Step 6 — Perform the Kolla Ansible action
enable_central_logging set to ‘yes’ use the Kolla Ansible subcommand
reconfigure to enable central logging in your OpenStack cloud. Again, this
is an example, and your action at this stage may vary depending on what you
want to accomplish.
The base Kolla Ansible command takes this form:
kolla-ansible -i <path-to-inventory> <command>
<path-to-inventory>— This is
<command>— In this guide,
reconfigurewill be used.
Initiate the Kolla Ansible playbook:
$ kolla-ansible -i /etc/fm-deploy/kolla-ansible-inventory reconfigure
This concludes the steps needed to have a base understanding of how to use Kolla Ansible.
The following guides go into detail about specific things you can configure using Kolla Ansible, such enabling TLS for Horizon or enabling Central Logging: