vexxhost / atmosphere

Simple & easy private cloud platform featuring VMs, Kubernetes & bare-metal
88 stars 23 forks source link

Containerize Openstack CLI #964

Closed fitbeard closed 4 months ago

fitbeard commented 7 months ago

Right now openstack_cli role is the only role which relies on OS package manager/debian packages. This can be safely containerized and later used as shell alias with any distro and any Openstack release:

# cat /etc/profile.d/atmosphere.sh
alias osc='nerdctl run --rm --network host --volume $PWD:/opt --volume /tmp:/tmp --volume /etc/openstack:/etc/openstack:ro --env-file <(env | grep OS_) 10.13.55.223:5000/openstack-cli:2023.1'
alias openstack='osc openstack'
alias nova='osc nova'
alias neutron='osc neutron'
alias cinder='osc cinder'
alias glance='osc glance'

That should be the last piece for full Rocky/Alma/Fedora compatibility (with few nit's which can be fixed later).

mnaser commented 7 months ago

I like this approach a lot because it also eliminates a lot of the headaches we see with system python versions not matching.