Initial content for bootapi's git-synced template set: the kickstart and iPXE templates and the distro catalog (almalinux9, fedora) ported from bootapi's embedded defaults, plus CI that validates every template/catalog renders for every distro (bootapi validate) and shellchecks the %post blocks. Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2.8 KiB
Distro catalog
One YAML file per bootable OS. bootapi selects an entry for a NetBox host
(platform slug / OS family / provision_template override) and uses it to build
the iPXE kernel/initrd URLs and pick the kickstart template. Adding an OS is a
YAML + template change here — no bootapi code change.
Fields
| Field | Required | Meaning |
|---|---|---|
name |
yes | catalog key; also what a provision_template override matches |
match.platforms |
one of platforms/family | exact NetBox platform slugs |
match.family |
one of platforms/family | NetBox platform family (matches any version) |
kickstart |
yes | kickstart template name (kickstart/<name>.ks.tmpl) |
kernel_url |
yes | Go-template for the installer kernel URL |
initrd_url |
yes | Go-template for the installer initrd URL |
version_default |
no | version used when the platform slug carries none |
kernel_args |
no | extra iPXE kernel args |
vars |
no | named Go-template strings exposed to templates as .DistroVars.<key> |
kernel_url, initrd_url and vars values are rendered with:
{{.ArtifactBase}} (bootapi's BOOTAPI_ARTIFACT_BASE_URL), {{.Version}},
{{.Arch}}, {{.Hostname}}, {{.Platform}}, {{.OSFamily}}.
Shipped entries
- almalinux9 — artifactapi
almalinuxremote, treealmalinux/<ver>/BaseOS/<arch>/os/. - fedora — artifactapi
fedoraremote, treefedora/releases/<ver>/Everything/<arch>/os/.
Adding another distro (the intended path)
Add catalog/<name>.yaml + kickstart/<name>.ks.tmpl. If the OS lives on a
mirror bootapi can't already reach, add an artifactapi remote first
(terraform-artifactapi config/remote_rpm/<name>.yaml). CI (bootapi validate)
will render the new distro against a fixture host and fail the PR if anything is
unresolved.
Debian / Talos — not implemented, different artifact shapes
These need their own catalog fields/template because their PXE artifacts differ
from the RHEL-family images/pxeboot/{vmlinuz,initrd.img} layout:
- Debian: netboot installer under
dists/<release>/main/installer-<arch>/current/images/netboot/withlinux+initrd.gz, and preseed (not kickstart). Adebianentry would setkernel_url/initrd_urlto those paths and reference adebian.preseed.tmpltemplate (and bootapi would serve it from/ksunchanged — it's just text). - Talos: immutable OS booted from factory images (
vmlinuz+initramfs.xzfrom the Talos image factory / a mirrored remote), configured by a machine config, not a kickstart. Atalosentry would pointkernel_url/initrd_urlat the factory artifacts and carry the config URL viakernel_args/vars.
Both are deferred; this note records the shape so the follow-up is mechanical.