Foreman Image based provisioning to bare-metal

Does Forman 1.x or 2.0.0 have the ability to do bare-metal provisioning from an Image?

For example, with Canonical MaaS, I use packer and a RHEL iso to build a golden RHEL 7.7 image that includes cloud-init. I then upload that image into MaaS and I can provision that image to bare-metal servers or VMs.

Does Forman 1.x or 2.0.0 have the ability to do bare-metal provisioning from an Image?

I did a project a while ago that used iPXE to iSCSI boot images from Ceph (or random ISOs):

Would it be possible to use iSCSI in your environment? If so, you might be able to write an iPXE template in Foreman like this one to sanboot your machines in an automated fashion. It might require some code changes to stop Foreman from trying to run unnecessary provisioning steps. I remember having to do that in the project above.

This recommendation might be a long shot but it’s the closest thing I can think of to image-based baremetal provisioning in Foreman, perhaps other folks have more convenient ideas.

iSCSI boot images is too restrictive for what I am trying to accomplish… I would like to be able to deploy an image that has been approved the security team. Not build each OS from a template.

I would think this is a simple question… does Foreman support image provisioning as a main feature?

If so, where in the docs, or plug-ins, or git repos is it documented?

I know people worked on this during configmanagementcamp last year or the year before, not sure if it left prototype state. As it was based on Discovery I hope @lzap knows more.

Yes, you can do that with Red Hat systems as Anaconda supports installing OS from an image. Search for “liveimg” kickstart command.

You can also use discovery to discover a host, then run a script on it and fetch an image and write it to disk. I did proof of concept using UDPCAST (this tool enables to multicast images onto several hosts), there’s also a patch but I have never finished it:

We are now shifting towars discovery using SSH (Remote Execution), that is our goal for the next year or so. Once we implement that, it will be easy to actually schedule jobs via Remote Execution on discovered hosts triggering this fetch-and-write scripts. But until then, you need to SSH manually.