Deploying Pure Storage in OpenStack using kolla-ansible

Some time ago I wrote a post on deploying the Flash Storage FlashArray as a Cinder backend using Kolla as the deployment method.

As time has moved on, so has Kolla to the point where it now uses Ansible to deploy OpenStack with the kolla-ansible project.

In this post I’m going to explain how to customize your kolla-ansible deployment to include a Pure Storage FlashArray as a Cinder backend, including how to build a cinder-volume image with the Pure Storage prerequisites.

I am going to assume that the reader knows how to install and deploy OpenStack using kolla-ansible, but if you don’t then an official Quick Start guide is available.

If you are interested in using the Pure Storage FlashBlade using the Manila driver, then specific details for this are given towards the end of the post, but will reference the main body of this post.

Default Kolla-Ansible images

When OpenStack is deployed using kolla-ansible it uses container images that have been prebuilt by the kolla-ansible project team, which are publically available in the openstack.kolla organisation. All of these images are perfectly fine to use for a default deployment of OpenStack, but if you want to use any Cinder backend where the driver has additional pre-requisite software packages, you will need to customize the default cinder-volume image to include the pre-requisite packages, so the selected Cinder driver will start correctly.

Customize cinder-volume

Before you can customize the cinder-volume image, you will need to have access to an image repository where you can store this image and that is accessible to the host and user running the kolla-ansible deployment playbooks.

For this example I’m going to use a Pure Storage public repository in as this is readily accessible by anyone.

Customizing a base container image is very simple. All you need is a system with docker (or podman) installed. In fact I will be using podman and buildah to customize the base cinder-volume image.

Create a Dockerfile

To customize the base image just create a simple Dockerfile as below:

USER root
RUN pip3 install purestorage
USER cinder

In this example I am going to be using the OpenStack 2024.1 (Caracal) base image. You should select the version of the base image that matches the version of OpenStack you have deployed using kolla-ansible.

The customization for Pure Storage to back the cinder-volume image compatible is simply installing the purestorage SDK.

NOTE: From the 2024.2 release the purestorage SDK will be replaced by the py-pure-client SDK.

Build the custom image

To build the image I’m using buildah build, but you could using docker build.

# buildah build .
Trying to pull
Getting image source signatures
Copying blob 251953c98fa9 done
Copying config fbb629851c done
Writing manifest to image destination
Storing signatures
STEP 2/4: USER root
STEP 3/4: RUN pip3 install purestorage
Collecting purestorage
  Downloading purestorage-1.19.0.tar.gz (28 kB)
  Preparing metadata ( started
  Preparing metadata ( finished with status 'done'
Requirement already satisfied: requests in /var/lib/kolla/venv/lib/python3.10/site-packages (from purestorage) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /var/lib/kolla/venv/lib/python3.10/site-packages (from requests->purestorage) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /var/lib/kolla/venv/lib/python3.10/site-packages (from requests->purestorage) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in /var/lib/kolla/venv/lib/python3.10/site-packages (from requests->purestorage) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /var/lib/kolla/venv/lib/python3.10/site-packages (from requests->purestorage) (2024.6.2)
Building wheels for collected packages: purestorage
  Building wheel for purestorage ( started
  Building wheel for purestorage ( finished with status 'done'
  Created wheel for purestorage: filename=purestorage-1.19.0-py3-none-any.whl size=19950 sha256=562c25d22a2714129de152c0a9b21dc78be90761734707c37e79f4f9c43f170c
  Stored in directory: /root/.cache/pip/wheels/bb/03/1f/22e62a9975ef2ef466364beabf310072a6a8377caf288dc649
Successfully built purestorage
Installing collected packages: purestorage
Successfully installed purestorage-1.19.0
STEP 4/4: USER cinder
Getting image source signatures
Copying blob 0b9c994b0484 done

Copying config af162e7dd8 done
Writing manifest to image destination
Storing signatures
--> af162e7dd81

On completion of the build we now need to tag the new image and push it to your repository:

# podman tag af162e7dd81 pure-cinder-volume:2024.1-ubuntu-jammy
# podman push localhost/pure-cinder-volume:2024.1-ubuntu-jammy

Please make sure you use your image ID and whatever tag you want for your custom image.

With your custom image created you can now move on to use this image into your kolla-ansible OpenStack deployment.

If you don’t have access to your own repository, then Pure Storage have made customized cinder-volume (Ubuntu Jammy) images available for all the supported versions of kolla-ansible in a public repository. Note that this repository may not always have images based on the most current kolla-ansible cinder-volume base image, so it is recommended you do try and build your own.

Configure kolla-ansible

Now that we have our custonized image in a repository, we can let kolla-ansible know to use this image, rather than the base image it would normally use.

This part of the blog edits the kolla-ansible globals.yml file, but this may not be the official way to tell kolla-ansible of a different container to use, but I find it works for me.

Edit /etc/kolla/globals.yml and add the following line:

cinder_volume_image_full: ""

Again, change the repository and image name to the one you have create and pushed yourself.

Redeploy kolla-ansible

Before actually redeploying the OpenStac system, we need to force delete the existing cinder_volume container.

# docker stop cinder_volume
# docker rm cinder_volume

Now you can redeploy OpenStack:

# kolla-ansible -i <INVENTORY> deploy

After the Ansible playbooks have completed, you can check the correct image has been used to restart the cinder_volume container:

 # docker ps | grep cinder_volume
7a7fbaa46c11        "dumb-init --single-…"   35 minutes ago   Up 35 minutes (healthy)             cinder_volume

and what about Manila??

If you want to use the Pure Storage FlashBlade using the Pure Storage Manila driver, then you will need to customize the manila_share container.

Follow the instructions given for the cinder_volume container, but the Dockerfile should be:


USER root
RUN pip3 install purity_fb
USER manila

Again, use the correct base image for the version of OpenStack you are using.

In the /etc/kolla/global.yml file the line you need to add is:

manila_share_image_full: ""

And finally, when redeploying it is the manila_share container you will need to stop and remove, prior to the deploy command.

Enjoy deploying…

I hope this post was useful in enabling you to deploy the Pure Storage platforms, FlashArray and/or FlashBlade into your OpenStack cluster using kolla-ansible.

Leave a Reply

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