This post is linked to from the OpenStack Deep Dive Project
OpenStack Cinder needs some special software installed to work with certain storage backends.
Kolla builds Docker containers for OpenStack.
This post documents the steps to customize how Kolla builds containers. In particular, these steps add the Pure Storage plugin to the Cinder-Volume service's Docker image.
This example uses the Rocky checkout to make Rocky based images. Use the stable branch matching your OpenStack version else things get weird.
apt-get install -y git python python-pip
git clone https://github.com/openstack/kolla.git
get checkout stable/rocky
cd kolla
pip install .
Use tox's genconfig envlist
to generate a commented config file:
tox -e genconfig
mkdir -p /etc/kolla
mv etc/kolla/kolla-build.conf /etc/kolla/
Then make any changes to the new config file as needed.
Here's an example of adding the Pure Storage's plugin to the cinder_volume image.
vi /etc/kolla/template-overrides.j2
{% extends parent_template %}
# Cinder Volume
{% block cinder_volume_ubuntu_setup %}
RUN pip install purestorage
{% endblock %}
kolla-build \
--tag rocky-test-20190826-01 \
--template-override /etc/kolla/template-overrides.j2 \
cinder-volume
That's it. You can now use this image with the included plugin.