r/openstack • u/_k4mpfk3ks_ • Apr 11 '25
Kolla and Version Control (+ CI/CD)
Hi all,
I understand that a deployment host in kolla-ansible basically contains:
- the kolla python packages
- the /etc/kolla directory with config and secrets
- the inventory file
It will certainly not be the first or second step, but at some point I'd like to put kolla into a GiT repo in order to at least version control the configuration (and inventory). After that, a potential next step could be to handle lifecycle tasks via a pipeline.
Does anyone already have something like this running? Is this even a use case for kolla-ansible alone or rather something to do together with kayobe and is this even worth it?
From the documentation alone I did not really find an answer.
3
u/przemekkuczynski Apr 11 '25
You can keep secrets in vault https://docs.openstack.org/kolla-ansible/latest/user/operating-kolla.html
You can have own registry with modified images https://docs.openstack.org/kolla-ansible/latest/user/multinode.html
You can put code in own git and it will be copied to share/kolla directory
You can't move /etc/kolla to git without modifying whole kolla-ansible logic.
2
u/ednnz Apr 14 '25 edited Apr 14 '25
We store everything kolla-ansible related in git, it's pretty easy to do so.
You can specify a config directory to kolla when running with
secrets are stored in vault and pulled either by people contributing or in ci before running (cf. kolla-ansible documentation).
you can then have pipelines with inputs to trigger certain reconfiguration.
We're still figuring out the CI part, but storing in git is really not that hard.
Hope this helps !
edit: some stuff is pretty sensitive and has to be stored in git (certificates, ceph keyrings, etc..), we use sops + ansible vault to encrypt it and make it easy to store
with a global
.sops.yamlfile likeWe have a ansible.secret.json file that we encrypt using sops (see above tree and sops file)
and use a script as ansible-vault password file
.vault_password
This way both people and CI can use it pretty easily with little overhead. You can also do with an ansible-vault password in vault and a script that pulls it.
1
u/ybrodey Apr 11 '25
I personally store all kolla files in a self hosted gitlab instance behind my VPN and run ansible via gitlab runners. Is it the most dogmatic solution in regard to security? Nope. Do I care? Nope.
1
u/[deleted] Apr 11 '25
We use a "cloud-config" folder, that is stored in git. We use a toolbox like container that is pulled and we use that for a git workflow to managing our clouds. Kolla-ansible allows you to have a costume config directory, I think it's the --configdir flag, the globals.yml sits inside there. Same with passwords.yaml
something like the below, so if you can work on a git workflow that works with the a "cloud-config" directory, then you are on your way.
cp kolla-ansible/etc/kolla/passwords.yml ~/test-cloud/cloud-config/passwords.ymlkolla-genpwd -p ~/test-cloud/cloud-config/passwords.ymlkolla-ansible -i inventory --configdir ~/test-cloud/cloud-config/