infrastructure/deploy/HARDWARE-TEST.md

77 lines
4.6 KiB
Markdown

# Temporary hardware-test publication (2026-11-05)
User-directed topology: yabloko builds and validates; terra retains source
repositories, evidence, ISO artifacts, OSTree repositories and the portal.
Transfers between these hosts are direct. The experimental distribution is named
`hardware-test`; it is not testing/stable acceptance or a working OS update client.
Toolbx first-use network testing remains explicitly deferred.
Retention supersedes the previous three-ISO proposal: one current ISO per variant
on the portal, at most three commits per variant in each of the layer/image repos.
The current prototype's GNOME layer is monolithic; publishing it does not imply
independent Layer v1 composition support. The precise long-term cycle is pending
hardware testing. Private diagnostic evidence is separate from public retention.
## Publisher
D-078 now requires a separate terra-only OpenPGP key for commits and summaries.
Pass `--gpg-home PRIVATE_GNUPGHOME --gpg-key FINGERPRINT` to the publisher.
Current fingerprint: `CF0FED7A412E57010527CD68BFAA5E80EEEACCA2`.
The public key is embedded by `system/src/updates.rs`; the private key is never
transferred to yabloko. Root-only, unattended signing uses the protected terra
key directory. General key rotation/revocation and replay policy remain open.
`python3 pipeline/publish-hardware.py PUBLIC_ROOT CANDIDATES.json` runs on terra
with OSTree tooling, or in the pinned tools container with the same absolute input
and output paths mounted. Candidate JSON is an array with exactly `core` and
`gnome` records. Each record contains `variant`, `version`, `repo`, `iso`, `sha256`,
`image_commit`, `layer_commit`, `acceptance` (a private JSON file).
Acceptance must contain the same identities, `scope: hardware-test`,
`accepted: true`, and nonempty `checks: [{path, sha256}]`. This is an explicit
operator acceptance of the recorded hardware-test scope, not an automatic assertion
that all architecture release gates passed. Keep the acceptance/evidence private.
The publisher verifies identities/evidence, imports objects into isolated copies,
updates history and refs, prunes to three versions, runs fsck and writes summaries.
It copies only the two current ISOs, verifies hashes, syncs and atomically swaps
`PUBLIC_ROOT/current`. Failures before the swap preserve the previous publication.
Refs are `hardware-test/core`, `hardware-test/gnome`, and `history/VARIANT/VERSION`.
Old public generations are removed after the switch. In-progress downloads spanning
a publication may need a retry; clients must verify the published ISO SHA-256.
Deploy the updated Caddyfile only after the first successful publication creates
`current`. The web container mounts the public parent directory, not the symlink
target. Source/keys/private staging remain outside its mount.
`tests/publish-hardware.py` uses real disposable OSTree repos to check four
publications, three-version object GC, two-ISO retention and unchanged publication
after rejection of a corrupt ISO. Passed on yabloko in the pinned tools image.
Scheduled execution remains disabled until the dual-variant build/validation path
is exercised. The requested start time is 00:00 UTC / 03:00 MSK.
## Unattended update rollout
`pipeline/finish-update-rollout.py` is a one-shot terra coordinator for the current
lab binding. It waits for earlier builds, stops the retained GNOME VM, builds both
final images on yabloko, runs Core ISO acceptance, imports candidate artifacts to
terra and makes only the signed GNOME candidate objects available before testing.
Public channel refs/catalog are unchanged during candidate validation.
`test-lab/probes/update_rollout_guest.py` then exercises that exact signed candidate
on the retained GNOME installation: full nano reapplication, reboot, integrity,
account/home/Flatpak persistence, stale-plan rejection, native Wayland login and
explicit rollback. This is not a fresh native GIS installation test for the new ISO.
The candidate plan is an explicit pre-publication test input; public channel
discovery remains unchanged until acceptance passes.
Only successful evidence unlocks signed publication of both variants, followed by
HTTPS identity/link checks. Failure before publication retains existing ISO/ref
selection; logs and state are archived under terra's
`/opt/archipelago/data/private/update-rollout/`. A post-publication HTTP failure is
recorded with `published: true`, not misreported as an unpublished transaction.
Current standalone execution is `archipelago-finish-update-rollout.service` on
terra, with a 12-hour limit and durable `worker.log`. It survives workstation/SSH
disconnects. This does not enable a recurring cron job.