Skip to content

M10 step 2: the bake split and a ready GCE image - #18

Merged
SSFSKIM merged 6 commits into
mainfrom
m10-bake
Oct 16, 2026
Merged

SSFSKIM merged 6 commits into
mainfrom
m10-bake

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Spec: docs/doperpowers/specs/2026-10-15-ci-kit-design.md, §3a Image, M10 order of work item 2. The launcher (step 3) is not part of this PR.

What it adds

  • The provider-neutral split. pool/bake/prepare.sh holds Node, the kit's deps, the runner image and cache warming, and both builders source it. warm.mjs now takes an installation token through CI_KIT_GH_TOKEN and never reads the App key. The token is narrowed to MAWS contents:read (WARM_SCOPE). The Hetzner builder mints it from its baked App through pool/bake/app-token.mjs; apart from that, it does what it did before.
  • The GCE bake (gce/bake/).
    • The builder is credential-free: on-demand e2-standard-4, falling back to n2d-standard-4. Its startup script reports ci-kit/bake=ok|failed:<step> as a guest attribute and powers off.
    • The orchestrator waits up to 30 min. Only on ok does it image the builder into family ci-kit-runner, unready.
    • It then smoke-boots the image on the cpus-2 machine. The image is marked ci-kit-ready=true only on a pass.
    • Builders and smoke VMs are deleted in every case. A failed bake deletes its own image. Retention keeps the two newest ready images.
  • The VM job unit (gce/vm/), which the smoke check runs through.
    • It blocks the container's TCP and UDP to the metadata server, except port 53.
    • It runs one job container with the Hetzner container's environment. The smoke check runs in that same container.
    • It powers the VM off however it ends.
  • The rest.
    • lib/gce.mjs: Compute Engine and Secret Manager.
    • pool/config/gce.json, with repos: [].
    • gce/deploy.sh: base, bake job, weekly schedule. Secrets are a human-only step.
    • docs/pool.md: a GCE section.
    • Spec: both App key fingerprints, and Secret Manager writes listed as human-only.

Live: ci-kit-runner-20261016-100502-b4fc88e2 is READY and labelled ci-kit-ready=true, baked from the Mac at b4fc88e. Afterwards, no instances or disks are left in ssfskim-ci-kit.

Tests: npm test gives 366/366. The new tests are test/gce/{bake,client,vm}.test.mjs plus additions to test/pool/{bake,github-app}.test.mjs.

🤖 Generated with Claude Code

…credential-free GCE builder, the bake job with smoke boot and retention, the VM job unit, lib/gce.mjs
…key per backend with fingerprints, Secret Manager writes are human-only
…ailed image insert is deleted by the cleanup
…name collision is never ours); run ids unique per invocation; VMs on the kit's no-ingress network ci-kit (deploy.sh network), never default; spec: retiring Hetzner revokes the Hetzner key
… operation) carry accepted=true; only a request refused before acceptance skips the bake's ownership-checked image cleanup
@SSFSKIM
SSFSKIM merged commit 40e5584 into main Oct 16, 2026
3 checks passed
SSFSKIM added a commit that referenced this pull request Oct 16, 2026
…erim cost corrected (~€180–200/mo), A7/A10 dispositions (DL)
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.

1 participant