> I will like to know how the physical server/hosts to be provisioned will
> automatically boot and install? If i turn on the server…how does foreman
> communicate with this host and it performs the installation? I would have
> seen this is the video had not destroyed the hwole thing by using some
> extra stuff not shown in the video guide.
Hello,
we definitely need some content/video on that topic. Let me briefly
explain to you how this (bare metal provisioning) works.
When you create a host entry, you give it name, MAC address, domain,
subnet. Foreman does pre-reserve IP address in the subnet you selected
and also creates DNS entry for name.domain. Also, it deploys menu for
the particular MAC address on the TFTP server. This is what we call
"build mode".
Once you turn on your host you need to setup it to boot from network
over PXE protocol (google that how that works). In short, the host
acquires IP address (DHCP already knows the MAC and returns assigned
preallocated IP). The DHCP server also returns address of the TFTP
server (usually the same box). The host gets boot menu (something like
Grub, it's called PXELinux) for the particular MAC address (each server
can have a different menu, there is always one default menu). In that
menu, the default item for build mode is - you guessed it - Start
installation.
After that, Linux kernel and init ram disk are loaded from the TFTP
server (which was copied by Foreman/Smart Proxy there), installation
blueprint (kickstart/preseed/etc) which was generated from your template
is downloaded and there is enough information to continue with headless
installation of the OS.
At the end of the installation there is a small scriplet that notifies
Foreman (using curl/wget) that the host was built. Foreman puts the host
in "normal operation" mode and changes TFTP configuration, so the host
receives default menu, which is usually "Boot from local disk". Host
restarts (again from the network), it gets this menu and after 20
seconds (default value) it boots from local disk.
Then puppet usually takes over, but this is another story.
If you want to reprovision the host again, you can just click on Build
icon to put it back to the build mode and restart the server. It will be
reprovisioned right away with the same parameters (or you can change
them).
···
--
Later,
Lukas “lzap” Zapletal
irc: lzap #theforeman