Foreman PXE DHCP less bare metal provisioning

I’m configuring Foreman for bare-metal provisioning without PXE and DHCP.
I’m not sure what will be the proper solutions for this this could be the following as I red

  1. Foreman Boot Disk - provisioning via host image but I cant find and good reading materials or guide to this

  2. Foreman Discovery - It seems there is a lot of customization needs to be done here, no idea.

I’m new to Foreman,

Regards

Both work fine for this use case, but the workflow is slightly different.

Boot disk requires you to create a host in a subnet with static boot mode within Foreman and then download the image while discovery provides one image you can use to boot a system from, add static network config and check-in to Foreman and with kexec it keeps the address during reboot and provisioning.

Do not worry about customization, you do not need to do anything, but if required there are options. For example I needed a Fiberchannel driver once to be in the image and I had once a customer where we added special facts to the image to be used in auto-provisioning rules, but normally I use the vanilla image.

I personally would prefer discovery for being more flexible.

If I may, do you have HOWTO/Video that can be use as guide, just the url. I will try it

Can you tell me what have you found so far on the internet and what exactly is not clear?

(We are trying to improve our documentation thus I am asking, thanks).

1 Like

In our Foreman training in the provisioning chapter I have the basics also in form of an exercise. But it is all in a simple example with dhcp for bringing the image to the systems.

But do not be afraid, just install the plugins and boot the discovery image. It will guide you with an wizard to a discovered hosts. The discovered host is then shown in Foreman and works very similar to “create host” dialog.

2 Likes

Hi lzap,

Greetings!

I’m having the same requirement of provisioning bare metal automated installation (using kickstart or any) without dhcp. As mentioned in the below link, I have created a discovery image using the below facts,

./discovery-remaster /root/fdi.iso “fdi.pxip=10.x.x.x/24 fdi.pxgw=10.x.x.254 fdi.pxdns=10.x.x.68 proxy.url=https://10.x.x.x:8443 proxy.type=foreman fdi.pxfactname1=<foreman_api_admin_name> fdi.pxfactvalue1=<foreman_UI_admin_password> fdi.pxmac= fdi.pxauto=1”

Getting the below error while trying to boot the target using discovery image.

Unattended installation failed check network credentials.

In the above facts, please let me know what credentials I supposed to use while rebuilding the discovery image.

Referred the below links:
http://tate.cx/foreman-pxeless-bare-metal-virtual-machine-provisioning/

Regards,
Guru Mohan

I don’t understand.

Hi lzap,

Sorry for posting the details unclear. Let me try to give you a better clarity on my need.
I’m working on provisioning automated unattended baremetal server from a foreman installer node.

Following the below steps as per the link given below.

Fully automated workflow w/o PXE/DHCP

  • Modify the discovery ISO and set all required options including MAC and IP address
  • Make sure the fdi.pxauto option is set to 1
  • Transfer the ISO image onto an USB stick or CDROM and boot it.
  • The host is discovered without any user interaction
  • The host reloads kernel into installer either manually or via auto-provisioning

While attempting to boot the target node using the discovery image, it is throwing the error like “Unattended Installation Failed. Check Network Credentials”.

I have gone through some other links to find out what should be passed in facts while remastering the discovery image so as to get the target node be discovered by the foreman installer. Need your suggestion on this.

Other referred links: Chapter 5. Provisioning Bare Metal Hosts Red Hat Satellite 6.4 | Red Hat Customer Portal

My requirement is to provision a baremetal server (without DHCP) with the custom image I have (Centos7 ISO) and also I want to make it as an automated installation by creating all the necessary partitions and installing needed packages via ansible roles. Please guide me what method I should follow from the below list:

a. Provisioning without PXE/DHCP
b. Semi-automated workflow w/o PXE/DHCP
c. Fully automated workflow w/o PXE/DHCP

Please do let me know if you still couldn’t understand anything from my requirement mentioned above.

Regards,
Guru Mohan G

Please do not paste “errors like”. Paste them exactly the same, ideally attach a screenshot. I have never seen this error. At what stage do you get this?

Have you consider using Full Host Bootdisk instead? It is much simpler workflow:

https://docs.theforeman.org/guides/build/doc-Provisioning_Guide/index-foreman.html#Provisioning_Bare_Metal_Hosts-Creating_New_Hosts_with_PXE-less_Provisioning

Dear lzap,

As per the instructions, I have followed PXE-less discovery with unattended provisioning (fully automated) by using a fdi image booted on a usb device for making it discovered from foreman api.

Command used to remaster the fdi image:
./discovery-remaster /root/fdi.iso “fdi.pxip=10.x.x.x/24 fdi.pxgw= 10.x.x.x fdi.pxdns=10.x.x.x proxy.url=https://10.x.x.x:8443 proxy.type=foreman fdi.p xfactname1=security-token fdi.pxfactvalue1=4c204fd0-ad42-4ff5-9060-33e93600a616 fdi.pxmac=b4: b5:2f:cd:x:x”

Attached the error screenshot for your reference: Kindly have a look on it and help us on this please.

Please note that I’m using PXELinux global default and Discovery Red Hat kexec template for provisioning. Same has been added to OS and Hostgroup.

Let me know if you require any other details further to troubleshoot the same.

Regards,
Guru Mohan G

Hello, endpoint type must be set either to “foreman” if you want to connect to Foreman Server (port 443), or “proxy” if you want to connect to proxy on ports 8443 or 9090 if you use Katello. I know this is confusing, hopefully we change our ports to something more reasonable.

Hi lzap,

Thanks for your update!
I have gone through your below video to PXEless provisioning.

Installation Media: I mounted the centos7.4 iso in foreman server and copied it to a locally configured web location to access the OS files over http. I marked the same http path in Installation media also.

Templates mapped to the OS:
iPXE template
Discovery Kexec template
Provisioning template
PXELinux template

But I need a clarification on fetching the image. Is the image (in my case it is centos for installing on the target machine) can be hooked directly from the OS in which our installation media & templates are mapped together ? or do we need to edit anything from the template?

Could you please clarify?

Regards,
Guru Mohan G

Read this please:

https://docs.theforeman.org/guides/build/doc-Provisioning_Guide/index-foreman.html#implementing-pxe-less-discovery

Then ask what exactly is not clear from this document so we can improve.