Automated provisioning (#2) - The Foreman, part 2 - Defining and creating a subnet, DHCP proxy
In this post I'll be creating a subnet and attempting to setup a DHCP server / "DHCP Proxy" for Foreman to use. It'll exist on the same server as the Foreman host.
In Foreman, I navigated to Infrastructure -> Subnets, then clicked Create Subnet.
I chose network options that matched my subnet settings, then an IP range from 10.1.200.1 through to 10.1.203.254. I set Boot Mode to Static so that Foreman-deployed machines will boot using DHCP for their first boot and installation, then configure themselves with static addresses later. As Foreman does not yet integrate with ISC Kea, my chosen DHCP server, I can't automatically create static DHCP leases for deployed machines, so permanent DHCP on deployed machines would lead to some confusion. I have some ideas on how to "solve" this, but they'll have to wait.
Now that a subnet is created... we can't actually do much with Foreman just yet. We need a DHCP proxy to allow us to PXE boot machines. We also need to modify our primary DHCP server to delay its offers slightly, to allow time for Foreman to jump in with its own DHCP offer for machines it is deploying.
Next, we (re)configure Foreman (hints were taken from this thread).
And in Foreman, open the configuration for the subnet we created before (Infrastructure -> Subnets) and select our newly-created proxies.
Save it, and we're done!
Theoretically we're ready to deploy machines with Foreman as soon as we define some operating systems.