Dear Foreman Community I’m reading into Foreman for some weeks now and I have successfully setup a Foreman Server.
I need to find a solution where I can keep the existing dhcp server’s mostly untouched.
The solution I’m looking for looks as follows:
- Let existing DHCP/TFTP/iPXE Server handle the IP leases and boot into discovery image (send information Foreman needs to Foreman Server)
- Let Foreman handle the provisioning of OS for example Ubuntu.
Now my question: Do I need to install “Foreman Proxy” on our running dhcp server’s? I would prefer a way without having to install the proxy on our running dhcp server because I can’t find good information about what impact this installation will have on the running dhcp.
Would be very thankful for every kind of input or experience anyone of you guys have/had.
Depending on the DHCP implementation the Smart Proxy can also connect to a remote API. Another tipp is installing the Smart Proxy via foreman-installer which allows to run with --noop --dont-save-answers --verbose so you can test what it would change and adjust parameters until it fits.
Thanks for your quick answer!
I changed my setup to only let our existing DHCP/PXE Server handle the IP Lease and then suggesting Foreman as tftp with “next-server”.
I have a working PXE Boot now that boots into Discovery and sends all informations needed to Foreman.
Currently I’m stuck after the Discovery Image reboots to start provisioning. It just starts the Discovery image again and again. I guess somethings still wrong with my init config file - will look into that the next days.
Concluding my question from the beginning I guess my current solutions doesn’t need a proxy on the dhcp server. It’s good enough for us when Foreman just takes over the IP we assigned with our DHCP and starts provisioning. We don’t need Foreman being able to adjust the IP’s.
Let me know if you think the way I’m going is nonsense… Thanks in advance!
This should work as long as DHCP will always assign the same IP to a server and never allow a change or if a change does not matter in the environment. What Foreman creates via the API is a reservation to ensure the address never changes.
When provisioning starts Foreman creates a PXE configuration specific for the MAC address of the system. It sound in your case this is not done, so it boots the default configuration with the discovery image again or the specific one is created but not using the correct template instead of the default one.
You were right, the specific MAC Address PXE configs are not being generated. Will look into that now. Thanks for the tip!
Just a quick idea where the problem can originate from: Is the Smart Proxy with the feature TFTP associated with the Subnet you are creating the Host in?
Yes, the TFTP / Foreman Server is associated with the Subnet. Sadly I couldn’t make a lot of time to troubleshoot my issue the past days. Also I have upcoming vacation of 3 weeks. I will look deeper into the issue and give a better overview here after my vacations.
Thanks for your interest and help till now!
I’m back from vacation and had some time to look further into the not working creation of PXE config files.
I analyzed my Foreman configuration and found the following. I’ll add 2 Screenshots
- Screenshot → Error Message I’m getting when trying to provision discovered Hosts manually. It tells me that it can’t find a init-config File for the hosts.
- Screenshot-> My configurations inside the Ubuntu OS I would like to install. I don’t get the option to define a PXELinux Template - only a Kexec one, which is empty and doesn’t show me any options to choose?
Do you have an idea how I can proceed from here on ?
Thanks in advance!!
Update: Seemed like a Bug that I didn’t get any option inside “Discovery Kexec”. I created a clone of the “Discovery Ubuntu kexec Autoinstall” and suddenly the original showed up inside the window.
Tried the provisioning again. Sadly without any progress. I can start the manual Provisioning of the discovered host now and the Host reboots, but it still just reboots into Discovery Image. I guess there is still no Init config File created for the Host
You need to associate the templates and then assign them to the operating system.
For Discoverd Hosts and Ubuntu with Autoinstall it needs at least iPXE, Provision, Userdata and Finish. I have no system to look the names up at the moment, but if I remember all have Autoinstall in their name except the finish which uses the Preseed one.
There is also a partition table with autoinstall in the name which you need to use.
There is one big thread here about Ubuntu Autoninstall, you should easily find.
Alright, I’ll try anything I find on the bigger post. Thanks for the tips