It's been quite a while since my last post as I had a lot of stuff to do at my workplace and besides that I studied for VMware VCP-DCV 2023 certification. The learning paid off and I received certification. :)
But finally I found some time to enhance my deployment of OpenStack with Kolla-Ansible via Terraform and released a new version of my Terraform script on Github. Some of the new features are:
- Antelope 2023.1 supported
- Automagically download latest Rocky Linux 9.x Vagrantbox to be used as a template - Runs on Windows 10 and MacOS (Should also run under Linux?)
- NFS server deployed on seed node
- fixed deployment scripts for Magnum and Octavia
- VM Hardware version is set to 17 (ESXi 7.x) by default now - You can change this if you are using an older version ESXi in your terraform.tfvars file
- By defaul a local docker registry will be deployed to hold Kolla-Ansible and Magnum docker images
- By default Grafana and OpenSearch will be enabled
- By default kolla-ansible will be installed and an OpenStack cluster will be deployed automatically
- Added various important info to "terraform output"
Even on my old hardware (Intel Xeon from 2013), I manage to deploy a multinode cluster with 3 control and 2 compute nodes in a litte bit less than 1 hour. A single node (all-in-one) deployment is much faster but you are very limited if you want to test failover functionality.
The new version of the script now also supports OpenStack Antelope (2023.1). You no longer have to manually download and upload a VM template. The script will now automatically download the latest Rocky Linux 9.x Vagrantbox, upload it to ESXi, install cloud-init to it, so that it can be used as a template for the OpenStack nodes. You can control this in your terraform.tfvars file:
vmtemplate = {
vmtemplatepath = "vmtemplates"
vmtemplate = "Rocky-9-Vagrant-VMware.latest.x86_64.box"
vmtemplatefull = "vmtemplates/Rocky-9-Vagrant-VMware.latest.x86_64.box"
vmtemplatename = "template-rocky9"
vmtemplatedlurl = "https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-Vagrant-VMware.latest.x86_64.box"
nestedvirt = "TRUE"
# Change this to 13 when using ESXi 6.x
# See https://kb.vmware.com/s/article/1003746 for more information
virthwvers = "17"
vmtemplatenetwork = "VM Network"
}
Don't worry, you don't need Vagrant or any additional plugin for this to work. As it turns out, Vagrantboxes are just compressed files that you can extract using tar. This step needed to be done manually in the older version and I always had the feeling that it was a big show stopper since the manual intervention was quite time-consuming and error prone. Since I sometimes work from my MacBook and then from my Windows machine, I had to find a way to make the Terraform script work from both. Yes, I know Terraform itself has no problem with that, but for downloading the Vagrantbox, extracting it, I had to use a local provisioner and of course the commands on Windows and MacOS are different. In the end I managed to get it working. It should also be possible to run it from Linux, but. I have not tested this yet. Furthermore I added the deployment of an NFS server. In my home lab I do have a NFS server that I used for my deployments but I thougt it would be nice to have this also included in the deployment itself to make it simpler for users. Of course you can still use your own NFS server by pointing to it in your terraform.tfvars file. Additionally I fixed the scripts to install services like Magnum (Kubernetes), Octavia (Loadbalancer) and started to work on Manilla (FileShares). Manilla is not working yet, but it shouldn't be too much of a big deal to get it working. Octavia is now working and this opens up a lot of new possibilities in conjunction with Magnum. You can now deploy Multimaster clusters and Octavia will automatically deploy a loadbalancer in case you configure your pods to use a loadbalancer. IMHO this is very cool. Yes, Magnum is still kind of failing to deploy a cluster now and then but there is new hope in the form of a new Magnum driver using Cluster API. If you are interested, I highly recommend to check out the OpenInfra video from the 2023 summit in Vancouver. I tried to test it using DevStack but gave up after failing to deploy DevStack several times.
It is very likely that I will write a separate blog post for Octavia and Magnum soon. So stay tuned.