Compare commits

...

4 Commits

Author SHA1 Message Date
benvin 5df1894803 Merge pull request 'Add inst.ks.sendmac to the iPXE boot script' (#6) from benvin/ipxe-sendmac into main
ci/woodpecker/push/pre-commit Pipeline was successful
ci/woodpecker/push/validate Pipeline was successful
Reviewed-on: #6
2026-08-08 18:16:14 +10:00
unkinben ee81dd9e51 Add inst.ks.sendmac to the iPXE boot script
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
Cobbler's per-MAC gPXE script passed inst.ks.sendmac, making anaconda send its
interface MACs as X-RHN-Provisioning-MAC-N headers when fetching the kickstart.
The bootapi iPXE script omitted it, so it was not a full drop-in for Cobbler's
gpxe output.

- Emit inst.ks.sendmac immediately before inst.ks= in the boot iPXE template,
  matching Cobbler ordering.

Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-06 22:19:32 +10:00
benvin bbbb4a4bbc Merge pull request 'Add optiplex-3070 catalog entry' (#4) from benvin/cobbler-host-sync into main
ci/woodpecker/push/pre-commit Pipeline was successful
ci/woodpecker/push/validate Pipeline was successful
Reviewed-on: #4
2026-08-05 19:36:39 +10:00
unkinben 06488b8d18 Add optiplex-3070 catalog entry
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
Six new prodnxsr0014-0019 Dell OptiPlex 3070 hosts were registered on the
legacy cobbler server (profile almalinux9-dell_3070) but the fleet had no
matching bootapi catalog entry, so they would fall to the generic almalinux9
autopart-on-sda path.

- Add catalog/optiplex-3070.yaml: auto-nvme, UEFI-aware, fixed ~31G LVM
- Document the entry in catalog/README.md shipped list and per-model table

Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-04 00:24:21 +10:00
3 changed files with 34 additions and 8 deletions
+7 -6
View File
@@ -29,11 +29,11 @@ YAML + template change here — **no bootapi code change**.
`almalinux/<ver>/BaseOS/<arch>/os/`. Generic / VM default (autopart on `sda`). `almalinux/<ver>/BaseOS/<arch>/os/`. Generic / VM default (autopart on `sda`).
- **fedora** — artifactapi `fedora` remote, tree - **fedora** — artifactapi `fedora` remote, tree
`fedora/releases/<ver>/Everything/<arch>/os/`. `fedora/releases/<ver>/Everything/<arch>/os/`.
- **optiplex-3050 / optiplex-3060 / optiplex-7080** — AlmaLinux 9 on the Dell - **optiplex-3050 / optiplex-3060 / optiplex-3070 / optiplex-7080** — AlmaLinux 9
OptiPlex fleet. Same install tree and `almalinux9` kickstart template, but on the Dell OptiPlex fleet. Same install tree and `almalinux9` kickstart
each passes a `storage_mode` (and, for the 7080, `vg_grow`) var so the one template, but each passes a `storage_mode` (and, for the 7080, `vg_grow`) var
template lays disks out per model. Ported from the Cobbler profiles so the one template lays disks out per model. Ported from the Cobbler profiles
`almalinux9-dell_3050 / _3060 / _7080`. See "Per-model variants" below. `almalinux9-dell_3050 / _3060 / _3070 / _7080`. See "Per-model variants" below.
## Per-model variants (Dell OptiPlex) ## Per-model variants (Dell OptiPlex)
@@ -45,6 +45,7 @@ model-specific `storage_mode` var:
|-------|----------------|----------------|----------|--------| |-------|----------------|----------------|----------|--------|
| `optiplex-3050` | `fixed-nvme` | static `nvme0n1` | legacy BIOS/MBR | fixed ~31G | | `optiplex-3050` | `fixed-nvme` | static `nvme0n1` | legacy BIOS/MBR | fixed ~31G |
| `optiplex-3060` | `auto-nvme` | `%pre` picks first NVMe <512G | UEFI-aware (EFI part if booted UEFI) | fixed ~31G | | `optiplex-3060` | `auto-nvme` | `%pre` picks first NVMe <512G | UEFI-aware (EFI part if booted UEFI) | fixed ~31G |
| `optiplex-3070` | `auto-nvme` | `%pre` picks first NVMe <512G | UEFI-aware | fixed ~31G |
| `optiplex-7080` | `auto-nvme` + `vg_grow: "true"` | `%pre` picks first NVMe <512G | UEFI-aware | grows to fill disk | | `optiplex-7080` | `auto-nvme` + `vg_grow: "true"` | `%pre` picks first NVMe <512G | UEFI-aware | grows to fill disk |
The kickstart (`kickstart/almalinux9.ks.tmpl`) reads `.DistroVars.storage_mode` The kickstart (`kickstart/almalinux9.ks.tmpl`) reads `.DistroVars.storage_mode`
@@ -54,7 +55,7 @@ autopart-on-`sda` path.
**Model selection (NetBox-driven, no code change):** the entry `name` is the **Model selection (NetBox-driven, no code change):** the entry `name` is the
OptiPlex **device_type slug**. Set the device's `provision_template` custom OptiPlex **device_type slug**. Set the device's `provision_template` custom
field to that slug (`optiplex-3050` / `-3060` / `-7080`) and bootapi's catalog field to that slug (`optiplex-3050` / `-3060` / `-3070` / `-7080`) and bootapi's catalog
`Select` picks the matching entry (override precedence beats platform/family). `Select` picks the matching entry (override precedence beats platform/family).
The `match.platforms` slug on each entry is the device_type slug too — not a The `match.platforms` slug on each entry is the device_type slug too — not a
real NetBox platform slug — so these entries are *only* reachable via the real NetBox platform slug — so these entries are *only* reachable via the
+23
View File
@@ -0,0 +1,23 @@
# Distro catalog entry: AlmaLinux 9 on the Dell OptiPlex 3070.
#
# Ported for the six prodnxsr0014-0019 bare-metal hosts registered on the legacy
# Cobbler server under profile almalinux9-dell_3070. Mirrors optiplex-3060: a
# %pre script auto-selects the internal NVMe (first under 512G), is UEFI-aware,
# sets bootloader --boot-drive, and uses a fixed ~31G LVM (no grow). The Cobbler
# almalinux9_dell3070 kickstart template currently fails to render on cobbler,
# so the closest working per-model profile (3060, same UEFI/auto-NVMe layout,
# fixed LVM) was used as the source of truth. Select it by setting the device's
# `provision_template` custom field to "optiplex-3070" (the device_type slug).
name: optiplex-3070
match:
platforms: [optiplex-3070]
kickstart: almalinux9
version_default: "9"
kernel_url: "{{.ArtifactBase}}/almalinux/{{.Version}}/BaseOS/{{.Arch}}/os/images/pxeboot/vmlinuz"
initrd_url: "{{.ArtifactBase}}/almalinux/{{.Version}}/BaseOS/{{.Arch}}/os/images/pxeboot/initrd.img"
kernel_args:
- inst.text
- net.ifnames=0
vars:
mirror: "{{.ArtifactBase}}/almalinux/{{.Version}}"
storage_mode: auto-nvme
+4 -2
View File
@@ -6,12 +6,14 @@ it. Mirrors how Cobbler generated a per-MAC gPXE script carrying inst.ks=.
KernelURL/InitrdURL/RepoURL come from the selected catalog entry (artifactapi KernelURL/InitrdURL/RepoURL come from the selected catalog entry (artifactapi
remote); KernelArgs are the catalog's extra args. KickstartURL uses remote); KernelArgs are the catalog's extra args. KickstartURL uses
BOOTAPI_BASE_URL (http://). BOOTAPI_BASE_URL (http://). inst.ks.sendmac makes anaconda send its interface
MACs as X-RHN-Provisioning-MAC-N headers when fetching the kickstart (Cobbler
parity; lets /ks resolve a host by MAC as well as by name).
*/ -}} */ -}}
#!ipxe #!ipxe
echo bootapi: provisioning {{ .FQDN }} ({{ .Platform }}) echo bootapi: provisioning {{ .FQDN }} ({{ .Platform }})
{{ if and .KernelURL .InitrdURL -}} {{ if and .KernelURL .InitrdURL -}}
kernel {{ .KernelURL }} initrd=initrd.img{{ if .RepoURL }} inst.repo={{ .RepoURL }}{{ end }} inst.ks={{ .KickstartURL }} ip=dhcp{{ range .KernelArgs }} {{ . }}{{ end }} kernel {{ .KernelURL }} initrd=initrd.img{{ if .RepoURL }} inst.repo={{ .RepoURL }}{{ end }} inst.ks.sendmac inst.ks={{ .KickstartURL }} ip=dhcp{{ range .KernelArgs }} {{ . }}{{ end }}
initrd {{ .InitrdURL }} initrd {{ .InitrdURL }}
boot boot
{{- else -}} {{- else -}}