The Provisioning Server

The foundation of the automated ecosystem, starting with a repeatable VM build.

Phase 1: Creating the Ubuntu 24.04 Template VM

Before any automation can run, a standardized template virtual machine must be created in VMware Workstation. This template serves as the "golden image" that will be cloned to create the provisioning server itself. The process is designed to be automated via a set of Python scripts, which require this specific template configuration.

Follow these steps carefully to create the required blank template:

  1. Open VMware Workstation and select File > New Virtual Machine.
  2. Choose Typical (recommended) and click Next.
  3. Select the option I will install the operating system later. This is a critical step to ensure the VM remains a blank template.
  4. For the guest OS, choose Linux and set the version to Ubuntu 64-bit.
  5. Name the virtual machine ubuntu-template and store it in your preferred directory.
  6. Specify a disk size of at least 25 GB and select Store virtual disk as a single file for better performance.
  7. Click Customize Hardware... and configure the following:
    • Memory: Assign at least 4 GB.
    • Processors: Assign at least 2 processor cores.
    • Network Adapter: Ensure it is set to NAT or Bridged to allow internet access during the automated installation.
  8. Click Close, then Finish. Do not power on the VM.

With the template created, the vmware-automation scripts can now be used to clone and automatically install Ubuntu 24.04 onto a new VM, which will become the provisioning server.

Phase 2: Ansible-Driven Configuration

Once the base Ubuntu VM is running, the ansible-provisioning-server project takes over. It runs a suite of services that work in concert to guide a new, bare-metal machine through an automated installation of Ubuntu.

DHCP Server (dnsmasq)

This is the first point of contact for a new node. When a machine is powered on and set to PXE boot, it sends out a DHCP request. Dnsmasq is configured to listen for these requests, assign a specific IP address based on the node's MAC address (defined in roles/netboot/vars/main.yml), and tell the node where to find the TFTP server.

TFTP Server (tftpd-hpa)

The TFTP server has one simple job: to serve the iPXE bootloader (undionly.kpxe or ipxe.efi) to the node. This bootloader is more powerful than a standard PXE ROM and allows for booting from an HTTP source.

HTTP Server (Nginx & PHP)

The HTTP server is the main engine of the provisioning process, responsible for serving the iPXE boot script, the Ubuntu ISO files, and the cloud-init autoinstall configurations. It also hosts the live status page. All of this is managed by the web and iso_preparation roles.

NAT Gateway (iptables)

To allow the newly provisioned nodes to access the internet, the provisioning server is also configured to act as a NAT gateway, masquerading traffic from the internal network out to the internet. This is configured in the common role.