Is it possible to customize Openstack in Kolla?

We have a medium size Openstack cluster deployed via Kolla-ansible. We need to make a patch to Nova to allow for a corner case on a few VMs running in this cluster.

Has anybody done this?

If so, do you have a guide on how to do it?

Ideally I would just like to patch the actual docker image for nova-compute, and not have to rebuild the entire kolla image collection (kolla-build).

Posted Nov 3, 2022, 2:25 PM UTC

36
psycocyst•

Yes you can create a Dockerfile pointing to the image you want to modify and use standard dockerfile syntax to copy a file or run a command then push it up to your registry and update the image on the hosts with kolla pull and then reconfigure with limits.

5
FancyFilingCabinet•

u/psycocyst option is a good one, particularly if the modification can or should be applied to all nova-compute instances, and the change doesn't require variables on a per-host basis.

I understand the aversion to rebuilding all the kolla images, this alternative doesn't require touching kolla at all, instead all modifications could be made within kolla-ansible. Assuming you are already comfortable with Ansible, this could be a more flexible option.

There are quite some examples to work from already but the principle is for Ansible rather than openstack or kolla-ansible.

At a very high level the steps are:

  • Write a ansible playbook that modifies the nova-compute container as needed. Adding files example Be sure to also modify the relevant policy.json

  • Add a new subgroup in your inventory file, containing the hosts with the edge cases.

  • Incorporate your playbook into kolla-ansible Example

You can even use the --limit option as within kolla-ansible so that changes are applied only the required hosts.

4
expressadminOP•

Wow, I hadn't even considered this as a possible option. I was sort of fixated on the docker images being immutable, and hadn't even considered modifying them with Ansible after the fact.

Thanks for highlighting another avenue to pursue.

3

Look up template_ovwrride for Kolla. You can build individual container images or all for a project with kolla-build. I presume since you're in a decent sized deployment you're at least mirroring your local registry to local. Just replace the nova images with your own there.

3
expressadminOP•

Yeah. We are using harbor locally for our registry. I'll look into template_override as well.

1
jvleminc•

kolla-ansible has a configuration file where you can override certain blocks of the docker file with your fixes/changes. can’t remember its name though.

2