Skip to content

Add Cobbler to manage bare metal provisioning

David Visscher requested to merge feature/cobbler into main

Overview

This MR adds Cobbler as a bare metal provisioning service to the Cloud4 stack. Cobbler will handle DHCP, PXE boot, and OS installation services for physical machines in the environment.

How it now works:

  • Machines use the cobbler server as their DHCP server, which points them to the TFTP server also running there
  • Machines TFTP/ PXE boot from the cobbler server
  • They get served a boot menu, which lets them select which os they want. By default, local boot is selected and nothing happens.
  • If another OS is selected, that OS is installed on the machine
  • This way, reinstalling a machine is a simple matter of rebooting it and choosing the OS you want to reinstall with. Easy!

image

Key Changes

  1. Added Cobbler configuration states:
  • Basic installation and package dependencies
  • DHCP template configuration
  • Settings configuration
  • Service management
  1. Added default pillar configuration for Cobbler in the defaults.sls
cobbler:
    # Default encrypted password for PXE-booted systems (default: "walrus")
    default_password_crypted: "$1$.8dqlFqf$fr2ZhqpeVukc.lKq71PZX."
    
    # DHCP configuration
    dhcp:
        subnet: "10.10.0.0"
        netmask: "255.255.255.0"
        domain_name_servers: "1.1.1.1"
        range_dynamic: ["10.10.0.200", "10.10.0.250"]
        routers: "10.10.0.1"
        default_lease_time: 21600  # 6 hours
        max_lease_time: 43200      # 12 hours

Defaults:

(can now be overridden via the pillar, and in fact, should be)

DHCP Configuration

  • Configured to use subnet 10.10.0.0/24
  • Dynamic range: 10.10.0.200 - 10.10.0.250
  • Using 1.1.1.1 as DNS server
  • Default lease time: 6 hours
  • Maximum lease time: 12 hours

Testing Done

  • Verified Cobbler service starts correctly
  • Confirmed DHCP service is operational
  • Tested PXE boot configuration
  • Validated kickstart template functionality

Next Steps

  1. Add better kickstart/seed templates for different OS configurations
  2. Add documentation for common operations
  3. Debian 12 does not work yet, as they do not - by default - provide the requirements for pxeboot in their os images

Related Issues

Closes HC-903

Edited by David Visscher

Merge request reports