Skip to content

docs(range): gandalf is ready for tpl-kali's build (#421, #790) - #1333

Open
Gerrrt wants to merge 3 commits into
mainfrom
gerrrt/gandalf-tpl-kali-prep
Open

Gerrrt wants to merge 3 commits into
mainfrom
gerrrt/gandalf-tpl-kali-prep

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

What changed

gandalf is ready for tpl-kali's build (build-the-lab-templates.md §5, step 2's gandalf half). phoenix@pve now exists on gandalf, with PhoenixBuilder on /vms, /storage/range, /storage/local and vmbr0, and PVEAuditor on /nodes/gandalf. A PhoenixIsoCleanup grant on local was revoked after review, because Kali's build uploads no answer disc. The Kali 2026.2 installer is on gandalf's local, and kali_iso_file now defaults to it. The runbook records the grants and how phoenix should hold gandalf's token. The roadmap and changelog are updated.

Why

Refs #421 and #790. The roadmap names §5, the attack VM, as next. It clones tpl-kali, which Packer builds from phoenix through gandalf's own API. That API had no user, no role and no ISO.

Blast radius

gandalf only. It has no guests. The new user has no token yet, so nothing can authenticate as it. Its grants leave out local-lvm (ADR-0096 keeps range disks off the M.2) and vmbr1 (the range NIC belongs to the clone). They grant nothing under /nodes beyond audit, so the token cannot touch the host firewall. The role leaves out Saruman's Pool.*.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml. No token was made. The runbook has the operator make it at the build, so its secret goes straight to phoenix.

Verification

Ran on gandalf, as root:

  • The API certificate: issuer PVE Cluster Manager CA, SANs include 10.0.30.30, no custom pveproxy-ssl.pem. Nothing was reissued.

  • pveum acl list | grep phoenix shows the five grants above. pveum role list shows PhoenixBuilder with the jumpbox list plus VM.GuestAgent.Audit, and no PhoenixIsoCleanup. pvesh get /nodes reads gandalf.

  • The ISO was downloaded from cdimage.kali.org and passed sha256sum -c against the hash pinned in scripts/collect-iso-store-state.sh. pvesm list local --content iso lists local:iso/kali-linux-2026.2-installer-amd64.iso.

  • Not run: the build, the smoke test and the -force rebuild. Those are Build tpl-kali (VMID 902) on ifrit once it exists #790's, from phoenix.

  • scripts/check_docs.py passes. make validate exits 0 with 43 checks skipped, because this host has no docker daemon and no pipx. That includes packer validate, shellcheck and markdownlint.

  • make validate passes (it passes with 43 skipped; see above)

  • Deployed to the lab and confirmed working (gandalf's user, grants and ISO, read back)

  • Docs updated (docs/, service README, or docs/roadmap.md)

🤖 Generated with Claude Code

phoenix@pve exists on gandalf with PhoenixBuilder on /vms, range, local
and vmbr0, PhoenixIsoCleanup on local and PVEAuditor on the node. Nothing
is granted on local-lvm or vmbr1. The Kali 2026.2 installer is on local,
checked against the pinned hash, and kali_iso_file defaults to it. No
token yet: it is made at the build.

Refs #421. Refs #790.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 04:28

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 unnecessarily grants Gandalf datastore deletion and storage-configuration privileges for a Kali build that generates no answer disc.

2 open issues
What changed in this PR

Prepares gandalf for building the range’s tpl-kali template from phoenix. The template build and its verification remain outstanding under #790.

Changes:

  • Sets the Kali ISO default to the installer staged on gandalf.
  • Documents applied permissions, separate API credentials, CA trust, and the range storage override.
  • Records the preparation in the changelog and links the template build into the roadmap.
File Description
packer/​variables.pkr.hcl Updates the Kali ISO default and explanatory comment.
docs/​runbooks/​build-the-lab-templates.md Documents gandalf permissions and build setup.
docs/​roadmap.md Links the attack VM’s template-build dependency.
docs/​changelog.md Records completed host preparation and remaining verification.

Review effort: Balanced

| `PhoenixBuilder` | `/vms` | creating and templating 902 |
| `PhoenixBuilder` | `/storage/range` | the template's disks, on the range pool ([ADR-0096](../adr/0096-fit-ifrits-range-disk-as-a-sata-ssd-in-the-tinys-bay.md)) |
| `PhoenixBuilder` | `/storage/local` | the installer ISO, and the answer disc Packer uploads |
| `PhoenixIsoCleanup` | `/storage/local` | deleting that disc afterwards, as on `Saruman` |

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Revoked: PhoenixIsoCleanup is removed from phoenix@pve on gandalf's local and the role deleted there. The runbook table and the changelog entry now say why.

🤖 Addressed by Claude Code

Comment on lines +537 to +539
`https://10.0.30.30:8006/api2/json`. Source that file instead of
`phoenix.env` for this build. Rewriting `phoenix.env` would point the next
`Saruman` build at `gandalf`. Then trust `gandalf`'s CA: relay

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed: §5 step 2 now sources phoenix.env (for PKR_VAR_build_password) and then gandalf.env to override the three API variables, with the one-line command.

🤖 Addressed by Claude Code

@Gerrrt
Gerrrt enabled auto-merge (squash) November 9, 2026 04:37
Gerrrt and others added 2 commits November 8, 2026 21:28
… password (#790)

Refs #790.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kali's build uploads no answer disc, so Datastore.Allocate on gandalf's
local bought nothing. The grant and the role are removed on gandalf.

Refs #790.

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