Skip to content

OS Configuration

OS configuration in DRP refers to the post-install phase where the provisioned operating system is customized for its intended role. This includes setting hostnames and network interfaces, installing packages, configuring services, applying security hardening, and injecting credentials. DRP handles OS configuration through a combination of bootenv templates (which generate installer configuration files like kickstart and preseed), post-install tasks run by the DRP runner agent, and integration with cloud-init for first-boot customization.

Template-Driven Configuration

DRP bootenvs use Go templates to generate OS installer configuration files. Templates have access to all machine parameters and can conditionally include configuration based on machine state. This makes every aspect of the OS install — partition layout, package selection, locale, timezone, user accounts, network configuration — parameter-driven and auditable.

For example, a kickstart template might reference machine parameters to configure package repositories:

Text Only
# In a kickstart template
{{range .Param "package-repositories" -}}
repo --name="{{.Tag}}" --baseurl="{{.URL}}" {{if .GPGKey}}--gpgkey="{{.GPGKey}}"{{end}}
{{end}}

Operators customize OS configuration by setting parameters on the global profile (for defaults), on machine-specific profiles (for hardware-tier settings), or directly on the machine object (for per-machine overrides).

Post-Install Task Configuration

After the OS installer completes and the machine reboots into its new OS, the DRP runner agent executes any remaining tasks in the active workflow. These post-install tasks can perform configuration that is not possible during the OS install phase:

  • Joining the machine to a directory service (Active Directory, LDAP)
  • Installing and configuring monitoring agents
  • Applying kernel tuning parameters via sysctl
  • Configuring storage (LVM volume groups, mount points)
  • Running initial configuration management (Ansible, Puppet, Chef)

Tasks receive all machine parameters as template variables and can write results back to machine parameters via drpcli machines set.

Cloud-Init Integration

DRP integrates with cloud-init for machines where cloud-init is the preferred first-boot configuration mechanism. The cloud-init content pack provides tasks and templates that generate cloud-init user-data payloads from DRP parameters. This is particularly useful for:

  • Environments that mix cloud VMs (which expect cloud-init) and bare metal (which use kickstart/preseed)
  • Image-deploy workflows where the pre-built image has cloud-init installed
  • Ensuring consistency between DRP-provisioned machines and cloud-native deployments

The DRP cloud-init integration writes machine-specific user-data (SSH keys, hostname, network configuration) to a DRP-hosted endpoint that cloud-init fetches at first boot via the DRP NoCloud datasource.

Network Configuration

Network configuration is a key part of OS configuration. DRP manages network configuration through the configure-network task (task-library) and the network/* parameter family. After OS install, the network configuration task applies the desired interface configuration (static IPs, bonding, VLAN tagging) to the machine's network stack using the network parameters set during discovery and classification. The network-lldp stage can collect network topology information (switch port, VLAN) from LLDP neighbor data to inform network configuration decisions.