How to configure for bare metal provisions and deploy

So I have a need for a product to be able to provision some bare metal servers with an OS. Just get it on the server and then I have ansible playbooks to configure. I’m evaluating this and another product.

While I was able to get it installed I have no clue on how to set it up for bare metal provisioning. I tried to follow some tutorial and videos I saw online but they all were very old and it appears that there is no longer a provisioning setup section. The manual is all over the place to me and I have no clue what I need to setup and how to do it. Is the foreman installer setting up a smart proxy? Do i need special install options to be able to use it with bare metal.

I would think that this very basic usage case would be explained somewhere. All I want to do is provision these bare metal servers I don’t need Foreman to do anything after that as we will not be managing just preparing the machines.

So does anyone have a more recent guide or tutorial on how to setup and actually do bare metal provisioning. I have a need for both UNIX and windows boxes and rarely anymore than 10 in one batch.

If anyone could point me in the right direction it would be appreciated been struggling for two days and still cant do anything basic with it.

There are many ways to do a bare metal provisioning with foreman.

If the bare metal hosts are in the same subnet as foreman itself and DHCP, TFTP can be used, then I would prefer the foreman_discovery plugin (see [1]). In other cases, have a look at foreman_bootdisk (see [2]).

[1] Foreman :: Plugin Manuals
[2] https://github.com/theforeman/foreman_bootdisk

Hello,

this is sad, our documentation is a bit out of date, videos are also quite old. We are actually working on improving this, you can help too once you get it working just send us documentation updates via github.

This plugin is a bit outdated, I will work on getting it back on track, however you don’t actually need it to setup provisioning. It is just a guide and in the end it will show you installer command to execute.

Foreman is great for UNIX provisioning, it supports Windows provisioning however this is not actively tested (it does not block releases) and documentation of Windows provisioning is even worse than UNIX systems - expect hidden dragons there.

I assume you want to do a POC environment, in that case I suggest to follow simple PXE setup. This is very hidden in our documentation, Installation scenarios section, scroll down a bit:

https://theforeman.org/manuals/1.21/index.html#3.2.3InstallationScenarios

I have to say this is confusing, it barely scratches the surface. In short, you need to provide correct options to our installer which will set you PXE, DHCP and DNS services which you need for provisioning.

I can also suggest reading and watching Satellite 6 resources, it covers Red Hat Enteprise Linux provisioning with Foreman actually quite well. You can think of Satellite 6 being Foreman + Katello/Discovery/Bootdisk/RemoteExecution/OpenSCAP and few more plugins all in red color with professional documentation, consultancy options, support and courses.

Namely Configuring Network Services chapter in Provisioning GUide will give you excellent overview of all options and how to set things up. Just keep in mind that Satellite = Foreman, Capsule = a server with Smart Proxy. Smart proxy also runs on Foreman itself which is referred as “Embedded Capsule”.

Foreman is an open-source project, there are products like Satellite based on Foreman and you need to pay for these.

What is the other one? I mean, Foreman is probably better however we have a steep learning curve. Our docs is the major issue I think. :wink:

Thanks for the responses. I will take a deeper look at the docs you linked to but I’m sure I read through most of it. Its more like here is how to install and deep dive on what it is capable of more than a config or setup guide. I wish there was a simple video of how to actually do bare metal install. I have to see it working before I can get a clear understanding of the work flow.

I’m trying to keep this on something open source as I don’t have a need for paid software. I’m not managing these servers at all I just need to get them provisioned so I can run an ansible playbook on them for setup and never have to touch them again.

The other product I’m going to be evaluating is MAAS. So far its been easy to install and I found a setup guide that’s rarely simple. However I think I would prefer to use Foreman if I can figure out how to get it working. I’ll try your suggestions and report back.

FYI all solutions based on Foreman are open source software, we are GNU GPL which actually requires this. You pay for support etc. However I get your point, you want to build this yourself. Sure, expect some time to be spent on understanding Foreman.

Last time I evaluated MaaS we beat the project in almost every aspect except easy installation, better BMC integration, nice network discovery feature and maybe nicer (simpler) UI. These are MaaS stronger points I think. It’s probably more complicated, but this was my impression.

Can you get back to me after you read Provisioning Guide from Satellite. Just replace Satellite 6 with Foreman, Capsule with Smart Proxy host and satellite-installer with foreman-installer. Collect all questions you might have and report back, this would give us a good overview of improvements needed for this guide. I am thinking basing the upstream manual on this guide. Thanks.

Doing that now. I want to setup the discovery service. I get to this line

yum install foreman-discovery-image rubygem-smart_proxy_discovery

my results:
yum install foreman-discovery-image rubygem-smart_proxy_discovery
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

Good catch, this is actually documented here:

https://theforeman.org/plugins/foreman_discovery/14.0/index.html#2.Installation

Upstream we do not provide RPM for technical reasons (no much space on our builders FDI is big).

So after some struggle I have it installed and have the discovery agent installed. I boot a server and it gets an ip from dhcp but then I got

TFTP prefix:
Unable to locate configuration file

/var/lib/tftpboot/pxelinux.cfg/ is blank and controls no files.

What step did I miss. Feels like I’m getting close to getting this working

So I figured out how to get past the configuration file issue. After that the machine boots to a menu with several options. I selected the option for foreman discovery image and then it starts to boot. Eventually the foreman discovery fails.

One how can I get rid of the menu on boot so it just boots the discovery image on default so I can have dynamic hosts added?

Also where can I look to troubleshoot discovery failing?

There is a global setting (Administer - Setting) for that called I think “Default PXELinux item”. I assume you use PXELinux, this is the template which generates the default menu. It should be obvious from it, read some PXELinux documentation on further possibilities:

In the PXELinux Didscovery Snippet template you must edit foreman.url if it does not represent what you want to register to. Typically you can have routing or DNS error.

Just as an update I was able to get it all working after a few days. However the guide is way off on certain things. I also ran into a bunch of other issues with certs and the puppet agents not sending facts or updating the status, but managed to get them all resolved. I’ve documented what I did so when I have time, I’ll build it again from scratch to make sure I have it down. While I have it working though I want to see if I can get a windows deployment going but again documentation is lacking.

1 Like

Thanks, get back to us with the changes required in our docs and I will fix them.