Add per-model OptiPlex kickstart variants from live Cobbler #2

Merged
benvin merged 1 commits from benvin/optiplex-models into main 2026-07-29 21:36:05 +10:00
Owner

Why

The seed almalinux9 kickstart (PR #1) reconstructed the Cobbler contract from
memory and had to guess at storage: it installed to sda with autopart
and set keyboard us. The live Cobbler server (cobbler.main.unkin.net)
actually provisions the OptiPlex fleet from three model-specific profiles
almalinux9-dell_3050, _3060, _7080 — that all install to NVMe with an
explicit LVM layout and differ from each other in real, hardware-driven ways.
Capturing those per-model differences is the point of this change.

Fleet today (from Cobbler get_systems): 3050 ×7, 3060 ×1, 7080 ×5
(the prodnxsr00xx hosts).

Per-model difference matrix (from the rendered Cobbler kickstarts)

Model Disk selection Firmware Bootloader LVM PV
3050 static nvme0n1 legacy BIOS/MBR (no EFI) --location=mbr fixed ~31G
3060 %pre picks first NVMe <512G, wipes old rootvg UEFI-aware (EFI part only if booted UEFI) --location=mbr --boot-drive=$OSDISK fixed ~31G
7080 %pre picks first NVMe <512G, wipes old rootvg UEFI-aware --location=mbr --boot-drive=$OSDISK grows to fill disk

3060 and 7080 differ only by the PV --grow. All three share the same
explicit layout: /boot (xfs 1G), PV → rootvg/ 10G, swap 2G, /home
~9G, /var/log 10G.

How

One shared template, per-model data — no code change in bootapi:

  • kickstart/almalinux9.ks.tmpl storage is now driven by
    .DistroVars.storage_mode: fixed-nvme (3050), auto-nvme (3060/7080, with
    the %pre NVMe picker + rootvg wipe + EFI detection), and .DistroVars.vg_grow
    adds --grow (7080). Any entry without those vars (plain almalinux9,
    fedora) keeps the generic autopart-on-sda path unchanged.
  • catalog/optiplex-3050|3060|7080.yaml — one entry per model, selecting the
    shared almalinux9 kickstart. Selected via a device's provision_template
    custom field set to the OptiPlex device_type slug (optiplex-3050 etc);
    the entry match.platforms is that same slug so it is only ever reached via
    the override and never hijacks a plain almalinux9 host.

Corrections vs the reconstructed seed template (each cited to Cobbler)

  • Storage sda+autopart → NVMe + explicit LVM — real hosts are NVMe with
    a fixed layout (almalinux9_dell3050/3060/7080); this was the seed's biggest
    guess.
  • keyboard usau — all Cobbler dell profiles use --xlayouts='au'.
  • Added %addon com_redhat_kdump + kexec-tools (and bind-utils) — present
    in every Cobbler dell profile; the seed already appended crashkernel=auto at
    the bootloader but never enabled kdump, so this completes it.

Not replicated (deliberate, called out): Cobbler's 3050 profile serves its repos
over plain http while 3060/7080 use https --noverifyssl, and 3050 uses a
duplicated timezone --isUtc line vs --utc elsewhere. These are Cobbler-era
drift, not a model requirement — bootapi drives the install tree from the single
catalog mirror var, so they normalize away.

Fixtures / CI

bootapi validate builds one fixture host per catalog entry, so the three
new entries add fixture coverage for 3050, 3060 and 7080 automatically. All CI
green locally: bootapi validate . OK, ci/shellcheck-post.sh no errors,
pre-commit run --all-files all passed. Rendered output for each model was
eyeballed against the Cobbler originals.

Open decisions

  • Retire candidates: Cobbler also holds almalinux8-dell_3050,
    debian12.5-dell_3050/_3060 and unbound legacy templates (almalinux9_dell,
    almalinux9_dell_uefi) with no systems assigned. Only AlmaLinux 9 across
    3050/3060/7080 is live, so only those are ported here.
  • Puppet delivery: Cobbler installs openvox-agent + a puppet-initial
    package from the internal repos; this template keeps bootapi's deliberate
    design of installing puppet-agent from yum.puppet.com in %post and the
    provisioned callback (per template-authoring.md). Left as-is; flag if you want
    the openvox path instead.

Dependency

Based on benvin/bootapi-templates-initial (seed PR #1), which is not yet
merged. Targeting that branch; retarget to main once #1 lands.

https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv

## Why The seed `almalinux9` kickstart (PR #1) reconstructed the Cobbler contract from memory and had to guess at storage: it installed to **`sda` with `autopart`** and set keyboard **`us`**. The live Cobbler server (`cobbler.main.unkin.net`) actually provisions the OptiPlex fleet from **three model-specific profiles** — `almalinux9-dell_3050`, `_3060`, `_7080` — that all install to **NVMe** with an explicit LVM layout and differ from each other in real, hardware-driven ways. Capturing those per-model differences is the point of this change. Fleet today (from Cobbler `get_systems`): **3050** ×7, **3060** ×1, **7080** ×5 (the `prodnxsr00xx` hosts). ## Per-model difference matrix (from the rendered Cobbler kickstarts) | Model | Disk selection | Firmware | Bootloader | LVM PV | |-------|----------------|----------|------------|--------| | **3050** | static `nvme0n1` | legacy BIOS/MBR (no EFI) | `--location=mbr` | fixed ~31G | | **3060** | `%pre` picks first NVMe <512G, wipes old rootvg | UEFI-aware (EFI part only if booted UEFI) | `--location=mbr --boot-drive=$OSDISK` | fixed ~31G | | **7080** | `%pre` picks first NVMe <512G, wipes old rootvg | UEFI-aware | `--location=mbr --boot-drive=$OSDISK` | **grows to fill disk** | 3060 and 7080 differ *only* by the PV `--grow`. All three share the same explicit layout: `/boot` (xfs 1G), PV → `rootvg` → `/` 10G, `swap` 2G, `/home` ~9G, `/var/log` 10G. ## How One shared template, per-model data — no code change in bootapi: - **`kickstart/almalinux9.ks.tmpl`** storage is now driven by `.DistroVars.storage_mode`: `fixed-nvme` (3050), `auto-nvme` (3060/7080, with the `%pre` NVMe picker + rootvg wipe + EFI detection), and `.DistroVars.vg_grow` adds `--grow` (7080). Any entry without those vars (plain `almalinux9`, `fedora`) keeps the generic autopart-on-`sda` path unchanged. - **`catalog/optiplex-3050|3060|7080.yaml`** — one entry per model, selecting the shared `almalinux9` kickstart. Selected via a device's `provision_template` custom field set to the OptiPlex **device_type slug** (`optiplex-3050` etc); the entry `match.platforms` is that same slug so it is only ever reached via the override and never hijacks a plain `almalinux9` host. ## Corrections vs the reconstructed seed template (each cited to Cobbler) - **Storage `sda`+`autopart` → NVMe + explicit LVM** — real hosts are NVMe with a fixed layout (`almalinux9_dell3050/3060/7080`); this was the seed's biggest guess. - **`keyboard us` → `au`** — all Cobbler dell profiles use `--xlayouts='au'`. - **Added `%addon com_redhat_kdump` + `kexec-tools`** (and `bind-utils`) — present in every Cobbler dell profile; the seed already appended `crashkernel=auto` at the bootloader but never enabled kdump, so this completes it. Not replicated (deliberate, called out): Cobbler's 3050 profile serves its repos over plain `http` while 3060/7080 use `https --noverifyssl`, and 3050 uses a duplicated `timezone --isUtc` line vs `--utc` elsewhere. These are Cobbler-era drift, not a model requirement — bootapi drives the install tree from the single catalog `mirror` var, so they normalize away. ## Fixtures / CI `bootapi validate` builds one fixture host **per catalog entry**, so the three new entries add fixture coverage for 3050, 3060 and 7080 automatically. All CI green locally: `bootapi validate .` OK, `ci/shellcheck-post.sh` no errors, `pre-commit run --all-files` all passed. Rendered output for each model was eyeballed against the Cobbler originals. ## Open decisions - **Retire candidates:** Cobbler also holds `almalinux8-dell_3050`, `debian12.5-dell_3050/_3060` and unbound legacy templates (`almalinux9_dell`, `almalinux9_dell_uefi`) with **no systems assigned**. Only AlmaLinux 9 across 3050/3060/7080 is live, so only those are ported here. - **Puppet delivery:** Cobbler installs `openvox-agent` + a `puppet-initial` package from the internal repos; this template keeps bootapi's deliberate design of installing `puppet-agent` from `yum.puppet.com` in `%post` and the provisioned callback (per template-authoring.md). Left as-is; flag if you want the openvox path instead. ## Dependency Based on **`benvin/bootapi-templates-initial`** (seed PR #1), which is not yet merged. Targeting that branch; retarget to `main` once #1 lands. https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
benvin changed target branch from benvin/bootapi-templates-initial to main 2026-07-29 21:33:29 +10:00
benvin added 1 commit 2026-07-29 21:33:29 +10:00
Add per-model OptiPlex kickstart variants from live Cobbler
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
80dbcdd108
The seed almalinux9 kickstart reconstructed the Cobbler contract from memory
and guessed storage: it installed to sda with autopart and keyboard us. The
real Cobbler server (cobbler.main.unkin.net) provisions the OptiPlex fleet from
three model-specific profiles (almalinux9-dell_3050 / _3060 / _7080) that all
install to NVMe with an explicit LVM layout and differ in disk selection, EFI
handling and whether the VG grows. This folds that real content in, keeping one
shared template driven by per-model catalog data.

Changes:
- Make almalinux9.ks.tmpl storage model-aware via .DistroVars.storage_mode:
  fixed-nvme (static nvme0n1, BIOS/MBR), auto-nvme (%pre picks the internal
  NVMe, UEFI-aware, --boot-drive), with vg_grow to grow the PV; generic/VM
  hosts keep the autopart-on-sda path.
- Port the explicit LVM layout (/boot, root, swap, /home, /var/log) and the
  %pre NVMe picker + rootvg wipe from the real Cobbler dell templates.
- Add catalog entries optiplex-3050 (fixed-nvme), optiplex-3060 (auto-nvme) and
  optiplex-7080 (auto-nvme + vg_grow), selected by a device's provision_template
  custom field set to the OptiPlex device_type slug.
- Correct keyboard us -> au and add the kdump addon + kexec-tools/bind-utils to
  match the Cobbler profiles.
- Document the per-model variants and selection in catalog/README.md.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
benvin merged commit 0e211893db into main 2026-07-29 21:36:05 +10:00
benvin deleted branch benvin/optiplex-models 2026-07-29 21:36:05 +10:00
Sign in to join this conversation.