Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
55c03f0
Implement #1: proxmox-clone + qemu builders, generic image
michielvha Jul 2, 2026
dd92fec
Keep apt-native packages in cloud-init, not trimmed to PDS
michielvha Jul 2, 2026
5891869
chore: adopt the shared vh-adlc workflow
michielvha Nov 4, 2026
deae257
feat: build generic Ubuntu images with off-node Proxmox bootstrap
michielvha Nov 4, 2026
0b33ecf
Merge origin/main and preserve the PDS package boundary
michielvha Nov 4, 2026
edcdb0a
docs: record committed reviews and clarify image validation
michielvha Nov 4, 2026
1dcd2c5
docs: clarify build access and repeatability checks
michielvha Nov 4, 2026
4bf428f
docs: record final committed image-build reviews
michielvha Nov 4, 2026
7b818c9
docs: define PDS image baseline and task guides
michielvha Nov 4, 2026
fa4b1b5
docs: clarify unattended baseline and fresh-user proof
michielvha Nov 4, 2026
eb38755
docs: make baseline policy checks observable
michielvha Nov 4, 2026
1255637
docs: record reviewed baseline specification
michielvha Nov 4, 2026
1d8dc3b
docs: define opinionated defaults and custom recipes
michielvha Nov 4, 2026
59928bc
docs: scope tooling assertions to the default recipe
michielvha Nov 4, 2026
08f056d
docs: align custom recipe proof with selected behavior
michielvha Nov 4, 2026
7cd1f57
docs: record approved recipe contract
michielvha Nov 4, 2026
bacb233
docs: accept opinionated customizable image scope
michielvha Nov 4, 2026
0d937b2
docs: plan package and recipe implementation tasks
michielvha Nov 4, 2026
8778a46
chore: resume approved image implementation
michielvha Nov 4, 2026
70b0efc
docs: record PDS baseline and MOTD task evidence
michielvha Nov 5, 2026
1509cf6
docs: record tested PDS SSH and update helpers
michielvha Nov 5, 2026
9d45434
docs: record PDS shared tooling validation
michielvha Nov 5, 2026
ccb34d5
test: define package provenance and selectable recipe contracts
michielvha Nov 5, 2026
d26d4cd
feat: apply selectable PDS recipes to both Ubuntu outputs
michielvha Nov 5, 2026
d762cc3
test: reject image identity residue and recipe policy leaks
michielvha Nov 5, 2026
f6b3dad
ci: verify Ubuntu recipes and expose pinned build dependencies
michielvha Nov 5, 2026
1bb7215
fix: install native trust prerequisites before PDS bootstrap
michielvha Nov 5, 2026
8677eb4
docs: explain image recipes package provenance and deployment users
michielvha Nov 5, 2026
e05ed58
fix: retain verifiable SSH journal evidence through identity cleanup
michielvha Nov 5, 2026
0baf086
docs: record independent PDS integration review
michielvha Nov 5, 2026
b4762ef
fix: fail incomplete user checks and discard build-home residue
michielvha Nov 5, 2026
523b44d
test: run shell probes in an interactive login shell
michielvha Nov 5, 2026
e5cf7b3
fix: verify the registered kubectl alias completion
michielvha Nov 5, 2026
f57097b
docs: retain independent review of the repaired integration
michielvha Nov 5, 2026
66e8929
docs: preserve review records without formatting wrappers
michielvha Nov 5, 2026
3cf647a
perf: reuse one read-only appliance for artifact checks
michielvha Nov 5, 2026
8b56679
docs: record candidate integration checks and remaining live proof
michielvha Nov 5, 2026
d9282b4
docs: retain final independent source review and its execution limits
michielvha Nov 5, 2026
eca48c2
docs: record the complete candidate matrix and ownership audit
michielvha Nov 5, 2026
0437db7
ci: authenticate public Packer plugin metadata requests
michielvha Nov 5, 2026
fcd9b0c
docs: record plugin CI recovery and clarify build prerequisites
michielvha Nov 5, 2026
cbaef75
docs: retain final source review and successful hosted checks
michielvha Nov 5, 2026
6690d5c
docs: plan signed PDS release verification for PR4
michielvha Nov 5, 2026
bb8f815
fix: pin image builds to published PDS 0.20.0
michielvha Nov 5, 2026
c3c1421
fix: commit transient machine IDs before sealing images
michielvha Nov 5, 2026
1b392de
docs: record signed-release image and clone validation
michielvha Nov 5, 2026
51872a3
docs: align image guides with published PDS validation
michielvha Nov 5, 2026
fbd3c1f
docs: retain Opus review of published-release integration
michielvha Nov 5, 2026
b4ef34c
docs: plan repairs from the signed-release review
michielvha Nov 5, 2026
f78ac9a
fix: require SSH observation and clean cloud-init artifacts
michielvha Nov 5, 2026
4f88fa2
docs: make live image validation reproducible and qualify recovery li…
michielvha Nov 5, 2026
a55568b
docs: record repaired image matrix and reboot validation
michielvha Nov 5, 2026
3779c3d
docs: retain independent executed checks and evidence review
michielvha Nov 5, 2026
6018798
docs: plan final validation and evidence corrections
michielvha Nov 5, 2026
eca9c59
fix: reject unreadable recipes and retain audit observations
michielvha Nov 5, 2026
1b2bdf7
docs: retain final Opus implementation review
michielvha Nov 5, 2026
f2ffe59
docs: distinguish observed raw and normalized storage hashes
michielvha Nov 5, 2026
8387397
docs: record PR4 delivery and hosted checks
michielvha Nov 5, 2026
9f4db43
docs: record owner confirmation of retired guest 104
michielvha Nov 5, 2026
b4cb175
docs: record controlled image acceptance review
michielvha Nov 5, 2026
5c80b36
docs: correct recipe reference and record controlled validation
michielvha Nov 5, 2026
b6975ef
docs: clarify final acceptance review state
michielvha Nov 5, 2026
86f740b
docs: retain final source review with precise reboot evidence
michielvha Nov 5, 2026
58595e1
docs: record clean independent acceptance with corrected evidence
michielvha Nov 5, 2026
fe48946
docs: complete independently verified Ubuntu image feature
michielvha Nov 5, 2026
2d0c610
docs(packer): restore manual image workflows and summarize delivery
michielvha Nov 6, 2026
24c12d3
docs(packer): record Opus review and remove historical framing
michielvha Nov 6, 2026
ecfce76
docs(specs): record clean Opus documentation follow-up
michielvha Nov 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Read [AGENTS.md](../AGENTS.md). It is the canonical instruction entry point.
24 changes: 24 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Ubuntu checks
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: hashicorp/setup-packer@1aa358be5cf73883762b302a3a03abd66e75b232 # v3.1.0
with:
version: 1.16.2
- name: Install check dependencies
run: sudo apt-get update && sudo apt-get install -y shellcheck jq qemu-utils python3 zsh
- run: make init
env:
PACKER_GITHUB_API_TOKEN: ${{ github.token }}
- run: make check
37 changes: 37 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Repository instructions

Read the personal conventions at
https://github.com/vhco-pro/docs/blob/0e52f51f01b84eda75a976763c42d8ec0a07b544/AGENTS.md
and follow the task routes there before implementation.

For all code, read conventions/coding.md at that revision. For feature work, read
conventions/feature-documents.md and conventions/delivery.md. For documentation,
read conventions/documentation.md and guides/humanize-prose.md. Load only the
relevant pages. If a required source is unavailable, report it and stop.
When onboarding or bootstrapping, read the matching guides/ page.
Preserve local instructions; report a conflict instead of silently overriding either source.

Feature documents: docs/specs/

## Local commands and constraints

- `make init` installs the Packer plugins declared by the Ubuntu template.
- `make check` runs formatting, Packer validation, ShellCheck and local regression tests.
It needs Packer, ShellCheck, Python 3, Zsh, jq and qemu-img. Packer validation fetches public
checksum metadata but does not require Proxmox credentials.
- Feature documents use the pinned vh-adlc format. Use the shared lifecycle and
independent reviewer from the vh-adlc plugin; do not maintain a second local agent workflow.
- Keep PDS standalone. Builders selects shared PDS functions when that package integration
is implemented. Keep image provisioning separate from Proxmox bootstrap and image sealing.
- Run `seal-image.sh --image-build` only inside a fresh disposable build guest. It removes
access keys and resets machine identity. It is not an existing-machine setup command.
- Real Proxmox integration tests need task authorization, unused test IDs and recorded
ownership. Never delete, stop or reconfigure pre-existing guests as test cleanup.
The normal local checks must not perform remote VM mutations.
- Prepare base images off-node. The node import uses native Proxmox commands over SSH;
do not install Packer or libguestfs on the hypervisor. Keep replacement-machine recovery
in `docs/ubuntu/recovery.md` aligned with the tested scripts.
- Preserve unrelated work, staged changes and existing worktrees. No reset, stash or cleanup
to make a review target clean. A dirty-tree diagnostic review is not release acceptance.
- Commits, pushes, PR writes, merges and releases need explicit owner approval. Permission to
commit or update a PR does not authorize merging, releasing or publishing the homelab guides.
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
PACKER ?= packer

RECIPE ?= default

.PHONY: init check check-config check-shell check-tests check-image check-instance
init:
cd packer/ubuntu && $(PACKER) init .

check: check-config check-shell check-tests
@echo 'SKIP: real image builds, artifact inspection and fresh-instance checks require explicit disposable resources.'

check-config:
$(PACKER) fmt -check -recursive packer/ubuntu
cd packer/ubuntu && PKR_VAR_proxmox_api_token=validation-only-placeholder $(PACKER) validate .
check-shell:
shellcheck -S warning packer/ubuntu/scripts/*.sh packer/ubuntu/tests/*.sh packer/ubuntu/recipes/*.sh
zsh -dfn packer/ubuntu/scripts/check-user-shell.zsh

check-tests:
PACKER="$(PACKER)" python3 -B -m unittest discover -s packer/ubuntu/tests -v

check-image:
bash packer/ubuntu/scripts/check-image.sh "$(IMAGE)" "$(RECIPE)" "$(PDS_VERSION)" "$(PDS_SOURCE)"

check-instance:
bash packer/ubuntu/scripts/check-instance.sh "$(RECIPE)"
83 changes: 83 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Develop and verify builders

Read [the repository instructions](../AGENTS.md) before changing code. Feature scope and review
records live in [the feature documents](specs/README.md). PDS remains a standalone function library;
builders owns the selected [Ubuntu recipe](ubuntu/provisioning.md).

## Local checks

From the repository root, run `make init` once and `make check` with Packer, ShellCheck, Python 3, Zsh, jq and
`qemu-img` installed. Checks validate both builders and exercise refusal of occupied IDs and real
raw conversion using disposable files. They also check first-boot result handling, explicit config
inputs and refusal of accidental sealing. Packer validation fetches upstream checksum metadata and
needs network access. These checks also exercise package identity/trust refusals, default/custom
recipe selection, selected-call failures, SSH service observation and negative artifact fixtures.
They do not contact Proxmox or replace live image/clone tests. The read-only PR workflow runs the
same `make check` target and reports the real-build checks as skipped. The real recipe-readability
regression needs an unprivileged caller: root can read its mode-000 fixture, so a root container
explicitly skips that case. Run it separately as the build user with Packer available:

```bash
PACKER=packer python3 -B -m unittest discover -s packer/ubuntu/tests -p test_image_steps.py -k unreadable -v
```

After a real build, inspect its unbooted disk with libguestfs installed:

```bash
make check-image IMAGE=/path/to/image.qcow2 RECIPE=default PDS_VERSION=0.20.0 PDS_SOURCE=signed-repository
```

Use the exact `pds_version` supplied to the build, `PDS_SOURCE=candidate` for an explicit candidate,
and `RECIPE=custom` for the committed custom example. The expected route must match the image's
provenance. This reads the disk without modifying it and checks identity/access cleanup, both build homes against an
explicit allowlist, package provenance and the selected policy's presence or absence.
It does not establish successful boot or authentication behavior. The original shipped image
must be inspected before creating writable instance disks from it.

Inside each owned fresh instance, logged in as the supplied Zsh user with its own key and sudo policy,
copy `check-instance.sh` and `check-user-shell.zsh` from `packer/ubuntu/scripts/` into the same
directory and run `bash check-instance.sh default` (or `custom`). It verifies both shell
startups and the selected tools/policy. First Zi startup needs network access. Retain full build and
service evidence, including actual plugin revisions; the bounded validation also requires distinct
machine IDs/host keys, real cron execution and positive/negative SSH authentication probes.

PDS has its own package check: `bash tests/check-package.sh` in the dependency checkout. That
builds a candidate with verified nFPM and runs real helper/service checks in disposable Ubuntu.
Neither local candidate tests nor a passing PR check proves installation from the signed repository.
Validate that route against the published package and inspect the resulting image's provenance.

The destructive sealing integration test needs a fresh disposable Ubuntu container with cloud-init
and OpenSSH server installed. It applies the real build seed, checks that password SSH was enabled,
runs the sealer, and verifies that build access and identity were removed. It refuses to run outside
Docker. From the repository root:

```bash
docker run --rm -v "$PWD:/work:ro" ubuntu:24.04 bash -c \
'apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y cloud-init openssh-server && bash /work/packer/ubuntu/tests/test_sealing.sh'
```

On Linux, repeat the sealing test with a public test ID bind-mounted read-only to reproduce an
uncommitted transient ID. Prepare the same disposable image with cloud-init and OpenSSH first,
then run the test with networking disabled. Use a tmpfs fixture such as `/dev/shm`:

```bash
fixture=$(mktemp /dev/shm/builders-machine-id.XXXXXX)
printf '0123456789abcdef0123456789abcdef\n' > "$fixture"
docker run --rm --network none --cap-add SYS_ADMIN \
-v "$PWD:/work:ro" -v "$fixture:/etc/machine-id:ro" \
YOUR_PREPARED_UBUNTU_TEST_IMAGE bash /work/packer/ubuntu/tests/test_sealing.sh
rm -- "$fixture"
```

`SYS_ADMIN` permits the systemd command to unmount that fixture inside the container. Mount only
the public fixture and repository as shown; no host devices or host machine ID are needed.

## Live checks

Local checks do not establish that an image boots or that a Proxmox clone has a new identity.
Use disposable artifacts and recorded unused VM IDs for live tests; preserve existing guests. Follow
the [bounded live-validation procedure](ubuntu/live-validation.md) for resource baselines, both
deployment paths, exact update/authentication probes, reboot persistence and ownership-limited cleanup.
The [PDS integration validation](validation/0001-2026-11-05.md) records candidate attempts, the
published-release build and eight-instance matrix, and the independent review boundary. The
[earlier bootstrap/CPU validation](validation/0001-2026-11-04.md) records the preceding iteration.
52 changes: 52 additions & 0 deletions docs/legacy/armbian-qemu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Legacy Armbian QEMU recipes

These ARM commands were kept from the original Packer README. They are manual recipes for separately
prepared Armbian images. They are outside the validated Ubuntu amd64 image matrix.

## Boot an ARM64 raw image

```bash
sudo qemu-system-aarch64 -m 2048 -cpu cortex-a72 \
-M virt \
-drive file=/path/to/armbian-image.img,format=raw \
-serial mon:stdio \
-netdev user,id=user.0 \
-device virtio-net,netdev=user.0,romfile=
```

This retains the historical command. The image must provide a boot chain compatible with QEMU's
`virt` machine; CPU architecture alone is not enough. It is not a tested boot command for the current
Ubuntu output. A separately prepared UEFI or kernel boot flow may be needed for a different image.

## Extract a board image's U-Boot

The historical image used a partition offset of 16777216 bytes. Confirm the partition layout with
`fdisk -l` before selecting an offset for another image:

```bash
sudo mkdir -p /mnt/armbian
sudo mount -o loop,ro,offset=16777216 /path/to/armbian-image.img /mnt/armbian
sudo cp /mnt/armbian/boot/u-boot.bin ./
sudo umount /mnt/armbian
```

The old example invoked that extracted firmware as follows:

```bash
qemu-system-aarch64 \
-machine virt -cpu cortex-a72 -m 2048 \
-serial stdio \
-bios ./u-boot.bin \
-drive if=none,file=/path/to/armbian-image.qcow2,id=mydisk \
-device ich9-ahci,id=ahci \
-device ide-hd,drive=mydisk,bus=ahci.0
```

The firmware, storage controller and image need to agree. This historical combination has not been
revalidated here. Keep the original disk unchanged and use a copy while investigating it.

## References

- [Original Armbian QEMU discussion](https://forum.armbian.com/topic/38258-running-self-build-image-on-qemu-arm64/)
- [Original ARM64 examples](https://gist.github.com/wuhanstudio/e9b37b07312a52ceb5973aacf580c453)
- [QEMU ARM virt machine](https://www.qemu.org/docs/master/system/arm/virt.html)
Loading
Loading