Skip to content

feat(lab): dotfiles OS-layer VMs, phase 1: Debian, Fedora and Windows (#920) - #1083

Merged
Gerrrt merged 20 commits into
mainfrom
gerrrt/dotfiles-os-layer-vms-643b16
Oct 9, 2026
Merged

Gerrrt merged 20 commits into
mainfrom
gerrrt/dotfiles-os-layer-vms-643b16

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Phase 1 of #920 (does not close it). ADR-0090 records the whole design. This PR builds Debian, Fedora and Windows.

What

Templates

  • packer/debian.pkr.hcl, 903 tpl-debian-13: trixie netinst with a preseed served over Packer's HTTP server on 8800, the same way Kali's is. Secure Boot stays on.
  • packer/fedora.pkr.hcl, 904 tpl-fedora-server: Server 44 netinst with a kickstart on an OEMDRV disc, which Anaconda reads with no boot argument.
  • Both templates include curl and git, which the bootstrap preflight needs.

Installers

  • Debian 13.7.0 and Fedora Server 44-1.7 are added to collect-iso-store-state.sh's EXPECTED list.
  • Both hashes come from the publishers' checksum files, and their GPG signatures were verified on 2026-10-07.

Guests (tofu/guests.tf), in a new dotfiles pool and tagged dotfiles;on-demand:

  • dot-debian (191)
  • dot-fedora (192)
  • dot-windows (198), an unactivated clone of 911

Module: tofu/modules/guest now accepts 903 and 904 and knows their disk floors.

Docs

  • New runbook test-the-dotfiles-layers.md: Kea reservations, apply, a clean snapshot taken stopped, the rollback, bootstrap and core doctor loop for each layer, and a standard tester user on Windows because scoop refuses an elevated shell.
  • Updated to match: build-the-lab-templates.md and provision-lab-guests.md §2 (the /pool/dotfiles grant).
  • Updated with the new hosts and decisions: network.md, architecture.md, the README counts, the changelog and roadmap entries, and a NOTE banner on ADR-0074.

Also fixed: packer/README.md claimed 911 was unbuilt and 912 needed a rebuild. Their descriptions show both were rebuilt on 2026-10-07, after #1031.

Verified

  • packer fmt -check and packer validate -syntax-only (1.16.1) pass.
  • tofu fmt -check and tofu validate (1.13.1) pass.
  • check_docs.py, yamllint --strict and collect-iso-store-state.sh --self-test pass.

Built and run on Saruman (2026-10-08)

ISOs

  • Both are on smaug-iso and read state="match".

Templates

  • 903 and 904 were each built twice with -force, and every build passed packer-smoke.sh.
  • Fixes the builds needed, all on this branch:
    • Fedora kickstart: no cloud-init unit name; cloud-init-network named explicitly. The second is commit 8e1eaeb, from another session.
    • Debian: boot_wait raised to 20s.

Guests

  • 191, 192 and 198 are applied with -target. The four pending lab-domain tag updates on 150–153 were left alone: they only catch the state up with tags root set by hand.
  • Each guest is on its Kea reservation and has a clean snapshot, taken while stopped.
  • The guests' cloud-init user is now tester. Debian has a system group named operator and Fedora a system user, so the module's default operator can't be created on either.

First dotfiles runs (details in the runbook's as-run table)

  • Debian: clean.
  • Fedora: bootstrap exits 0, but 14 tools are missing. yazi's cargo build fills the per-user quota on the tmpfs /tmp (a dotfiles-Fedora issue).
  • Windows: not testable over SSH. winget, MSIX installs, winget configure and scoop's junctions all fail in a network logon. The runbook now says to run it from the console.

Still open

  • A Windows run from the console.

Phases 2–4 (openSUSE and Arch; Alpine and Gentoo from their images; NixOS) follow in separate PRs.

🤖 Generated with Claude Code

Gerrrt and others added 5 commits October 7, 2026 22:06
…#920)

ADR-0090 decides one on-demand guest per dotfiles OS layer on Saruman,
templates 903-909 and guests 191-198 at .91-.98, built from an installer
where one exists and from the publisher's image where not, and run from a
`clean` snapshot taken stopped.

Phase 1 writes tpl-debian-13 (903, preseed over HTTP as Kali's) and
tpl-fedora-server (904, kickstart on an OEMDRV disc), lists both ISOs from
their publishers' signed hashes, and declares dot-debian, dot-fedora and
dot-windows (an unactivated clone of 911) in a `dotfiles` pool. The new
runbook test-the-dotfiles-layers.md is the rollback, bootstrap and read loop.

Also corrects packer/README.md: 911 and 912 were both rebuilt on 2026-10-07
after the SetupComplete.cmd fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…yer-vms-643b16

# Conflicts:
#	docs/changelog.md
…#920)

Anaconda 44 stopped the first build at 'Error enabling service
cloud-init: 1'. cloud-init 24.3 renamed its units, so there is no
cloud-init.service, and Fedora's presets enable the real ones anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…resets leave it out (#920)

2f97981 dropped `cloud-init` from the services line (no such unit since
cloud-init 24.3) and relied on Fedora's presets for the real units. f44's
90-default.preset enables cloud-config, cloud-final, cloud-init-main and
cloud-init-local, but not cloud-init-network, which is
WantedBy=cloud-init.target only. cloud-init-main (`--all-stages`) waits
for each stage's unit to signal it, so without it the network stage —
network config and SSH keys from the Proxmox cloud-init drive — may never
run on a clone. The unit exists in f44's cloud-init 26.x, so naming it
cannot hit the "Error enabling service" stop.

Not yet proved on a build: `systemctl is-enabled cloud-init-network`
and `cloud-init status --long` on a clone are the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt

Gerrrt commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

I pushed 8e1eaeb on top of 2f97981. It adds cloud-init-network to the kickstart's services line.

Why: 2f97981 relies on Fedora's presets to enable cloud-init's units. f44's 90-default.preset enables cloud-config, cloud-final, cloud-init-main and cloud-init-local, but not cloud-init-network. That unit is WantedBy=cloud-init.target only, so nothing else starts it. cloud-init-main (--all-stages) waits for each stage's unit to signal it, so without cloud-init-network the network stage may never run on a clone. That stage applies the Proxmox drive's network config and SSH keys. The unit exists in f44's cloud-init 26.x, so naming it can't hit the "Error enabling service" stop.

Not yet proved on a build. On the built template or a clone:

systemctl is-enabled cloud-init-network.service
cloud-init status --long

The first should say enabled, and the second should show every stage done.

🤖 Generated with Claude Code

Gerrrt added 2 commits October 8, 2026 06:45
…yer-vms-643b16

# Conflicts:
#	docs/changelog.md
…yer-vms-643b16

# Conflicts:
#	docs/changelog.md
@Gerrrt

Gerrrt commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

Garrett would like this merged once a build proves it.

Where it stands:

  • CI passed on 5e68b14 (all eight checks).
  • Auto-merge couldn't be set: the PR is still a draft.
  • It now conflicts with main, which has moved since the 13:45 merge.

For the owning session:

  1. Run a Fedora build with 8e1eaeb (cloud-init-network in the kickstart).
  2. On a clone, check systemctl is-enabled cloud-init-network.service says enabled, and cloud-init status --long shows every stage done.
  3. Merge main in, mark the PR ready for review, and turn on auto-merge (squash).

🤖 Generated with Claude Code

Gerrrt and others added 6 commits October 8, 2026 07:11
The first build's 10s boot_wait, copied from Kali, typed `c` before the
installer menu was drawn, and the menu has no timeout. Typing the same
lines from the console booted the installer, which fetched the preseed
from phoenix:8800 and ran unattended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…yer-vms-643b16

# Conflicts:
#	docs/changelog.md
…yer-vms-643b16

# Conflicts:
#	docs/changelog.md
…ew entries stop conflicting with it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…or (#920)

The first apply's Linux guests came up with no login: Debian ships a
system group `operator` (gid 37), so cloud-init's useradd exited 9, and
Fedora ships a system user of that name. The guests now pass `tester`,
the Windows guest's bootstrap user too; every other guest keeps
`operator`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… key; first as-run rows (#920)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gerrrt and others added 6 commits October 8, 2026 09:15
…e console, not over SSH (#920)

Debian passes clean. Fedora exits 0 with 14 tools missing: yazi's cargo
build fills the per-user quota on Fedora's tmpfs /tmp and the downloads
after it fail. Windows cannot be tested over SSH at all: winget, MSIX,
winget configure and scoop's junctions each fail in a network logon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… say what the builds and first runs found (#920)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dora#208 (#920)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…llowPrelease fix, and a way past OOBE (#920)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…yer-vms-643b16

# Conflicts:
#	docs/architecture.md
#	docs/network.md
@Gerrrt
Gerrrt marked this pull request as ready for review October 9, 2026 02:24
Copilot AI balanced review requested due to automatic review settings October 9, 2026 02:24
@Gerrrt
Gerrrt enabled auto-merge (squash) October 9, 2026 02:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The runbook races asynchronous rollback, may apply unrelated OpenTofu changes, and leaves required network diagrams stale.

8 open findings
What changed in this PR

Implements phase 1 of #920 by adding reproducible Debian and Fedora templates plus on-demand Debian, Fedora, and Windows dotfiles test guests.

Changes:

  • Adds Packer templates and verified installer pins.
  • Provisions three OpenTofu guests in a dedicated pool.
  • Documents architecture, inventory, decisions, and testing procedures.
File Description
README.md Updates documentation counts.
tofu/​README.md Documents dotfiles guests and pool.
tofu/​guests.tf Defines the three test guests.
tofu/​modules/​guest/​variables.tf Supports new templates and disk floors.
scripts/​collect-iso-store-state.sh Pins Debian and Fedora ISOs.
packer/​variables.pkr.hcl Adds installer variables.
packer/​README.md Documents template inventory.
packer/​debian.pkr.hcl Builds the Debian template.
packer/​debian/​preseed.cfg.pkrtpl Automates Debian installation.
packer/​fedora.pkr.hcl Builds the Fedora template.
packer/​fedora/​ks.cfg.pkrtpl Automates Fedora installation.
docs/​runbooks/​test-the-dotfiles-layers.md Adds the testing workflow.
docs/​runbooks/​provision-lab-guests.md Documents the pool ACL.
docs/​runbooks/​build-the-lab-templates.md Adds template build instructions.
docs/​roadmap.md Adds phased rollout planning.
docs/​network.md Adds guest inventory and addresses.
docs/​changelog.md Records phase-one results.
docs/​architecture.md Adds the guests to architecture inventory.
docs/​adr/​0090-test-the-dotfiles-os-layers-on-on-demand-saruman-guests.md Records the design decision.
docs/​adr/​0074-build-the-lab-templates-with-packer-from-phoenix.md Notes the expanded template strategy.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/network.md Resolved
Comment thread docs/roadmap.md Resolved
@Gerrrt
Gerrrt disabled auto-merge October 9, 2026 02:30
… task waits, targeted replace (#920)

- The network diagram gets dot-debian, dot-fedora and dot-windows in VLAN 30's
  Saruman box; network.png re-rendered at 1.5x (cairosvg; nothing outside the
  edited area changed).
- The runbook waits on each Proxmox task's UPID and checks it ended OK before
  the next call, so a start never meets a guest still locked by a rollback.
- A rebuild's -replace is paired with -target, so it cannot apply anything
  else pending in the state.
- The Windows commands fix configuration.dsc.yaml before winget configure,
  not after; dotgibson/dotfiles-Windows#285 linked.
- ADR-0074's note separates NixOS's image builder from Alpine's and Gentoo's
  publisher images; the roadmap keeps order, not dates or status; two
  sentences in build-the-lab-templates.md made plain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt enabled auto-merge (squash) October 9, 2026 02:34
@Gerrrt
Gerrrt merged commit 26ebdec into main Oct 9, 2026
8 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/dotfiles-os-layer-vms-643b16 branch October 9, 2026 02:42
Gerrrt added a commit that referenced this pull request Oct 9, 2026
…er boots an on-demand guest (#1101)

The provider's `started` defaults to true and the module never set it, so
every plan that met a stopped on-demand guest proposed started false -> true,
and an untargeted apply would have booted it. Found reconciling #1083 after
merge: dot-debian and dot-fedora (stopped) showed it; carbuncle and siren
would have too had they been off. A guest is still started on creation.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants