Files
JakeHillion e595c866a4
commit-validation / validate-single-commit (pull_request) Successful in 9s
buildbot/nix-eval Build done. (521 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
gitea-actions-vm: deliver runner credentials via cloud-init user-data
The per-VM runner credentials (.runner and config.yaml) were shipped as
loose files on a custom cidata disk: locally an ISO attached to QEMU,
and on GCP the same ISO wrapped in a tar.gz, uploaded to GCS, turned
into a per-VM custom image, and attached as a second hyperdisk padded
to its 4 GiB minimum — with matching per-VM image and GCS object
cleanup on teardown and in the orphan sweep.

The credentials now travel as ordinary #cloud-config user-data using
write_files, which places them in /var/lib/gitea-runner before the
runner unit starts. Locally the user-data rides the existing NoCloud
ISO; on GCP it is passed as instance metadata
(--metadata-from-file=user-data=...) and picked up by the native GCE
datasource, so the second disk and the per-VM GCS/image pipeline are
gone entirely. The in-VM runner.service no longer mounts the cidata
device, and the cloud image name is now keyed on the qcow2 content
hash passed in from Nix rather than parsed out of the GCE tarball
path.

Of the per-VM resource safety nets, only the instance-delete on a
failed `instances create` still has anything to clean, so launch_one
keeps that and drops the image/GCS handling. sweep_orphans stays as-is
(modulo its comment): new VMs no longer create per-VM cidata images or
GCS tarballs, but resources leaked before this switch still need
reaping.

Test plan:
- CI
- Built boron's toplevel locally (covers the rebuilt VM image, the
  launcher shellcheck, and the reconcile script's flake8 pass)
- After deploy: verify a local actions-vm runner picks up a job, and
  that a burst VM launches on GCP with user-data metadata and a single
  boot disk
2026-06-13 00:58:08 +01:00
..