Add Cobbler to manage bare metal provisioning
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!
Key Changes
- Added Cobbler configuration states:
- Basic installation and package dependencies
- DHCP template configuration
- Settings configuration
- Service management
- 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
- Add better kickstart/seed templates for different OS configurations
- Add documentation for common operations
- 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