An Ubuntu 24.04 Deployment Automation
With the release of Ubuntu 24.04 LTS it is time to start upgrading the VMs in the Geeklab. Based on my experience with building a Nextcloud deployment automation it seems obvious I should take that one step further and standardise the deployment of VMs and configuration of Ubuntu ready to relocate the applications to their new homes.
As before this is based on Ansible and my VMware ESXi GeekLab and extends the automation to include deploying the VM as well as configuring Ubuntu and deploying applications.
I've mosty used this to quickly deploy vanilla Ubuntu VMs for general Geekery. It was used as the base for a Samba 3 Domain Controller automation as I needed to deploy a few of them and wanted them to be consistently build and I've included that variation in this series. It's also reused by all the other automations for the initial VM deployment and configuration too.
- Details
- Written by: Richard
This is not an all-new automation, instead it builds on what I've used before but this time adding in support for deploying preconfigured VMs using VMware's OVF tool an evolution of the bash scripts I use to control the process so they're more modular and can be resused by different deployments.
- Details
- Written by: Richard
I've already been using an OVF template for recent Nextcloud builds so this is really just an evolution of that with the main difference being I'm using Ubuntu 24.04 LTS instead of Ubuntu 20.04 LTS, and of course the Nextcloud-specific stuff is not included in the base template.
In this step we create a virtual machine that will become our OVF Template and install Ubuntu server 24.04 LTS in it.
- Details
- Written by: Richard
Having created our virtual machine and installed Ubuntu Server 24.04 LTS we now need to complete the configuration and install the remaining tools and utilities I want in every VM and then export it as an OVF template ready to be used.
- Details
- Written by: Richard
Adding the capability to automatically deploy OVF templates means some changes are needed to my Deployer to support the the new tooling, which turned into a fairly major overhaul and I ended up rebuilding on a new Mint 22 virtual machine as well.
This also needed updates to the Ansible inventory which in turn led to a reorganisation there too.
- Details
- Written by: Richard
Each deployment is controlled by bash scripts as a simple command-line based interface to getting stuff done. The first step of setting up a new deployment is to create the scripts and config files which will call the Ansible playbooks with the appropriate parameters.
- Details
- Written by: Richard
Two additional playbooks are needed to handle the OVF template deployment and applying the correct hostname and the original playbooks have been reorganised. The playbooks have also been simplified as some of the steps they performed have been baked into the template.
With these playbooks our Deployer is ready for use.
- Details
- Written by: Richard
My existing Ansible playbooks for deploying new VMs on my GeekLab have kept clear of network configuration as that was either managed by DHCP or left as a manual task. I've now finaly taken the time to figure out a way to do this through Ansible-based automation more easily.
- Details
- Written by: Richard
Even though the Windows Server in my original GeekLab no longer exists I've retained the Active Directory domain for the LDAP user store, running on Samba 4 instead. These servers now need upgrading so I figured it should be possible to use an Ansible playbook to not only deploy the new hosts using Ubuntu 24.04 but also install and configure Samba 4 as an additional DC ready to do a takeover.
- Details
- Written by: Richard
With the Samba 4 DC Deployer prepared and able to deploy a new Ubuntu 24.04 LTS virtual machine with a static IPv4 address we can now look to installing and configuring Samba itself, plus DNSsmasq to provide DHCP services with updates into Samba DNS and RSync to replicate the NETLOGON and SYSVOL shared from a nominated primary server.
- Details
- Written by: Richard
With the playbooks and roles prepared we're now ready to deploy our new Samba DCs and then move the FSMO role across and retire the old ones. A little bit of preparation on one of the existing DCs will also make for a smoother transition.