unkinben 105487c090
ci/woodpecker/push/pre-commit Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/push/validate Pipeline was successful
ci/woodpecker/pr/validate Pipeline was successful
Add image-based provisioning (liveimg) templates + catalog
Adds a fast, reproducible install path that unpacks a prebuilt AlmaLinux 9 node
rootfs onto the device (Anaconda liveimg) instead of resolving packages, with
per-host networking still templated after the unpack. Reuses the OptiPlex storage
vars so image and package installs lay disks out identically. Templates-only per
review; the rootfs build lives in the bootapi-images repo.

- kickstart/image.ks.tmpl: liveimg --url={{ .DistroVars.rootfs_tarball }};
  %post renders per-host NetworkManager keyfiles from NetBox interface data
  (the image is generic and liveimg overwrites /etc), hostname, puppet-initial
  PUPPETCA_URL env, and the provisioned callback.
- kickstart/_storage.ks.tmpl: shared storage-block/storage-pre partials
  (storage_mode / vg_grow); almalinux9.ks.tmpl now uses them (no behaviour
  change).
- catalog/almalinux9-image.yaml (VM autopart) + optiplex-7080-image.yaml
  (auto-nvme + vg_grow), rootfs_tarball -> artifactapi rootfs-images repo.

Rootfs tarball built+published by https://git.unkin.net/unkin/bootapi-images
(v* tag). Validated with bootapi validate + shellcheck; no bootapi code change.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-30 21:00:33 +10:00

bootapi-templates

Live kickstart / iPXE templates and the distro catalog for bootapi. bootapi git-syncs this repo (every ~3 minutes, like argocd) and hot-swaps its template set on change, so OS and template updates ship by merging here — no bootapi rebuild or redeploy. If this repo is unreachable, bootapi falls back to its embedded copy of these files.

Layout

kickstart/<name>.ks.tmpl     # kickstart templates (Go text/template)
ipxe/<name>.ipxe.tmpl        # iPXE scripts: boot, fallback-local, fallback-shell
catalog/<name>.yaml          # distro catalog: host -> boot images + kickstart
catalog/README.md            # catalog field reference + debian/talos path
ci/shellcheck-post.sh        # %post shellcheck helper (used by CI)

The data model available to templates and the catalog field reference live in the bootapi docs: data-model, template-authoring, and catalog/README.md here.

CI (required before merge)

  • validatebootapi validate . renders every kickstart + iPXE script for every catalog distro against a fixture host and fails on any parse/resolve error or unresolved <no value>. Plus shellcheck (error severity) of the %post blocks.
  • pre-commit — yamllint + whitespace/EOF checks.

Validate locally before pushing:

go run git.unkin.net/unkin/bootapi/cmd/bootapi@main validate .
bash ci/shellcheck-post.sh   # needs shellcheck

Adding a distro

Add catalog/<name>.yaml + kickstart/<name>.ks.tmpl (and, if the OS needs a mirror bootapi can't reach, a terraform-artifactapi remote). See catalog/README.md — including the debian/talos path.

S
Description
Live kickstart/iPXE templates + distro catalog for bootapi. Pulled by bootapi via git-sync; CI validates templates render for every distro.
Readme 77 KiB
Languages
Go Template 93.1%
Shell 6.9%