BostonCube
  • Home
  • Blog
  • Tech Life
    • Joomla
    • Nextcloud
    • Nextcloud for Activity Planning
    • Nextcloud Deployment Automation
    • Bacula Pi
    • An Ubuntu 24.04 Deployment Automation
    • IPv6 Deployment
    • postcot
    • Mikrotik
  • About
  • Approach
  • Create the Ubuntu Template VM
  • Finalise and export template
  • Building the Deployer
  • Deployment - Bash scripts
  • Deployment - Ansible Playbooks
  • Adding support for Static IP addresses
  • Samba 4 Domain Controller - part 1
  • Samba 4 Domain Controller - part 2
  • Samba 4 Domain Controller - part 3

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.


Approach

Details
Written by: Richard
Published: 14 September 2024

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. 

  • Ubuntu
  • ESXi

Create the Ubuntu Template VM

Details
Written by: Richard
Published: 01 October 2024

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.

  • Ubuntu
  • ESXi

Finalise and export template

Details
Written by: Richard
Published: 23 October 2024

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.

  • Ubuntu
  • ESXi

Building the Deployer

Details
Written by: Richard
Published: 06 November 2024

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.

  • Ansible
  • ESXi

Deployment - Bash scripts

Details
Written by: Richard
Published: 21 November 2024

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.

  • Bash

Deployment - Ansible Playbooks

Details
Written by: Richard
Published: 25 November 2024

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.

  • Ubuntu
  • Ansible
  • ESXi

Adding support for Static IP addresses

Details
Written by: Richard
Published: 08 February 2025

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.

  • Ubuntu
  • Ansible

Samba 4 Domain Controller - part 1

Details
Written by: Richard
Published: 09 February 2025

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.

  • Ubuntu
  • Bash
  • Samba

Samba 4 Domain Controller - part 2

Details
Written by: Richard
Published: 16 February 2025

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.

  • Ubuntu
  • Ansible
  • Samba

Samba 4 Domain Controller - part 3

Details
Written by: Richard
Published: 02 March 2025

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.

  • Ubuntu
  • Samba
Copyright © 2026 BostonCube. All Rights Reserved.
Joomla! is Free Software released under the GNU General Public License.