Hello,
> 1) Buy a machine preconfigured with PXE boot
> 2) Stick in rack, and power on
> 3) foreman_discovery finds it, installs tiny kernel, runs puppet facts, and
> stores results in foreman
> 4) Foreman uses facts to find what is the desired os
Not yet, you currently need to manually click on Provision button and
assign things like OS yourself. Using Host Group this is just two
clicks.
We would like to automate this in long-term but the feature is not there
yet.
> 5) Foreman sets machine to PXE boot, again
> 6) Foreman reboots machine
> 7) Foreman hands final OS to machine, and it installs
> 8) Foreman sets boot to disk
Just to clarify - the BIOS/UEFI is still configured to boot from the
network, but Foreman configures TFTP to boot from local drive. Until you
want to rebuild it - then it switches it to boot into installer again.
> 9) Foreman runs puppet
Other that that - this is exactly what Foreman Discovery does.
> Repurpose existing hardware
> —
> 1) Foreman? sets machine to PXE boot on next restart
> 2) Foreman reboots machine
> 3-8) same as above
Yeah, we call this Build mode. You click on Build button and after
confirmation (this destroys the server!) you can reboot (manually or via
IPMI/hypervisor from Foreman).
> Is this how it all works? I've looked at the foreman_discovery code and I'm
> not seeing any code to enable "Repurpose existing hardware". Does Foreman
> actually do step 8? I didn't see the code for that either.
This code resides in the Foreman core, if you visit your host detail,
you will see the mentioned Build button and if you configure IPMI you
should see Start/Stop/Restart buttons as well.
What is your use case? Share with us your environment you are building.
Have a nice weekend. Good luck with the Foreman!
···
--
Later,
Lukas #lzap Zapletal