Deploying Ubuntu 22.04 LTS

Having read through the Foreman documentation and posts here I’m still somewhat confused and hugely out of my depth. I understand there are multiple ways to get things done, but I need to find a way to get at least one successful deployment done rather than getting stuff in endless options. Choice is great, but to those only just getting started with PXE it’s daunting to figure out which choices to make.

Anyway, Katello has been working great and I have several integrations working. Foreman is v3.9 and the target compute is VMware, and I’ll deal with Proxmox later.

The OS I need to deploy right now is Ubuntu server 22.04. I’ve got the following steps done:

  • Provisioning Setup
    • Architecture: x86_64
    • Installation media: Created for Ubuntu 22.04
    • Operating Systems: Ubuntu Server 22.04
      • Partition Table: Preseed default autoinstall
      • Installation Media: Ubuntu 22.04 Boot disk as per the Foreman v3.9 documentation
      • Templates: Host initial configuration template - I only have the “Linux host_init_config default”. I guess I can add/modify templates for this after I’ve successfully deployed a basic OS.

Where does one configure a Provisioning template? I read that Preseed default PXEGrub2 Autoinstall is the one to use for Ubuntu 22.04, but I’ve not worked out yet where to configure this, I expected this to be part of the Provisioning setup.

I created a Host Group, but I’m unsure if I’m using the right settings as I see things like PXE loader which has many options and I have no idea which one to select.

  • Host Groups
    • Name: Ubuntu 22.04
    • Host Group
      • Content view: Ubuntu 22.04
    • Network (ignored for now, I’m thinking I’ll use domain and realm in child host groups)
    • Operating System
      • Architecture: x86_64
      • OS: Ubuntu Server 22.04
      • Media Selection: All Media
      • Media: Ubuntu 22.04 Boot-disk
      • Partition Table: Preseed default autoinstall (doesn’t this duplicate the Provisioning setup? It was the only option…)
      • PXE loader: Not sure what to pick (other than not iPXE?).
    • Parameters: ?
    • Puppet ENC: ?

I get the following error if I try to create a host: “No PXELinux templates were found for this host”.

I have the Preseed default PXEGrub2 Autoinstall template associated with the selected OS. But I’m unable to select anything resembling PXEGrub2 from the PXE loader drop-down. I’m probably missing something really obvious or simple…

Some screenshots if it helps anyone. Apologies for the long post:

Hosts >> Provisioning Setup items:

As for Templates:

  • The Partition Table “Preseed default autoinstall” is a Foreman default which has been assigned to all sites and Orgs.
  • Provisioning Templates: “Preseed default PXEGrub2 Autoinstall”

    Assigned to all locations and Orgs.

Trying to create a host:

And the error message when trying to submit the host creation:

Hi,

you already got a lot of the essential parts.
You need:

  • Operating System:
    for this I usually use:
    – name: Ubuntu
    – Major: 22.04
    – Minor:
    – Description like you want it to appear
    – Release Name: jammy
    so that looks already ok from your screenshots
  • Installation medium: just looking at the URL, it could work depending what content is there (should be the iso and the extracted iso)
  • Templates:
    here it depends which loader you want to have but you can find the templates with “autoinstall” in the name, the minimum is a loader (i suggest pxe grub2 as you already had it)
    – Loader: PXEGrub2-template: Preseed default PXEGrub2 Autoinstall
    – Userdata: Preseed default Autoinstall
    Autoinstall is based on cloud-init (basically using cloudinit plus some extra things for partitioning etc.), this is why the provisioning template is not found under provisioning templates but under UserData, as this structure is also used for other cloud-init workflows.
    – Finish-Template: Preseed default finish
    this is basically the post-install part, so everything you want to configure after the cloud-init/autoinstall-part (like remote execution, puppetconfig etc.)

In your host creation screenshots you also selected “PXELinux BIOS” as PXELoader in the Operating System tab - you should change that to Grub 2 BIOS/UEFI (depending what you use) - otherwise you have to configure a PXELinux template (the one with autoinstall in the name) for your operating system.

With that you should hopefully come to the next steps

1 Like

You can take a look at https://docs.orcharhino.com

Hi! I’m not sure if you’re still searching for this but I came across this blog post by foreman. Maybe you’ve seen it as well:
https://theforeman.org/2024/02/provisioning-ubuntu-autoinstall.html

1 Like

Thank you, I think I had briefly spotted the article but then lost it when I had the time to look at this again.