Bare-metal deployment with Foreman

I want to use foreman to deploy my machines using official repositories. I find very little information on the way to do it.
I am on an AD domain with a Windows DHCP / DNS. I want to integrate the deployment and provisioning of CentOS and Debian machines with Foreman. Can you help me and teach me? I helped myself to this post and the link given but as I understand it, this plugins is no longer maintained.
Thank you :wink:

PS: I use Foreman and plugins v1.23 on one debian stretch.

Hello and welcome to the community. First of all, get Foreman installed. There are two possible scenarios - with and without Katello plugin. In your case I suggest to install without Katello. Head over to our documentation how to do that.

Now, there are many workflows you can achieve with Foreman, but itโ€™s best in network booting installers. In that case you need to enable TFTP and DHCP services in the installer. You can run it multiple times itโ€™s puppet-based:

foreman-installer \
  --foreman-proxy-tftp=true \
  --foreman-proxy-dhcp=true \
  --foreman-proxy-dhcp-interface=eth0 \
  --foreman-proxy-dhcp-gateway= \
  --foreman-proxy-dhcp-range="" \

Similarly you can enable DNS service to manage domains. By default the installer will install ISC DHCP and BIND. Foreman supports managing Microsoft DHCP and DNS, in that case you need to deploy smart-proxy on Windows manually as our instsaller is Linux-based only - look for dns_dnscmd and dhcp_native_ms in our docs. Unfortunately, docs is sparse on this topic.

Documentation about provisioning is lacking in our official docs, we are currently building new docs and here is a work in progress version which should help you:

Hope it helps, get us a feedback about this guide if something is not clear. @mcorr

1 Like

Thank you for your answer. I read the document but I canโ€™t install the smart-proxy for my DHCP on Windows 2012.
Do you have information above because all that I find on the forums is outdated and I can not adapt.
I just want to keep my DHCP Windows and provision / deploy vms with foreman using DHCP already in production.
Thank you.

Our Windows DHCP/DNS support is community based, there is not much in our docs about it. If you figure it out, write a tutorial and post it to the forums.

In short:

  1. Install git, ruby, smart-proxy from git (use stable branch)
  2. Create YAML configuration files, make sure to configure dhcp and dns MS providers
  3. Register the proxy to Foreman running on Linux