CI: cross-distro Firecracker end-to-end tests (Cirrus vs alternatives + cost) #387
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Verify the Firecracker backend installed the way a real user would, on bare-metal Linux distros beyond NixOS (Debian/Ubuntu, Fedora/RHEL, Arch, ...): provision prereqs via the distro package manager, run
backend setup --backend=firecracker, then run the e2e suite (headless launch asserting isolation, egress 200, git-gate). Complements #348 ("firecracker + KVM only, no Docker") and #386 (once images are pulled, the install flow ispull, notbuild).Hard constraint that drives everything: KVM + root
Firecracker needs
/dev/kvm, andbackend setupneeds root / CAP_NET_ADMIN (TAP pool + nftables). That rules out ordinary container-based CI runners. The compute must be a full VM or bare-metal host, run as root, with KVM (native or nested).Key realization: this is the self-hosted-runner model, and we already have it
The thing that made Cirrus attractive -- "attach specific systems with specific quirks as workers, run privileged/KVM tasks" -- is the self-hosted-runner model, which Gitea Actions supports natively. Register an
act_runneron each bare-metal distro box, give it labels (fedora40,arch,debian12), run it in host mode (jobs execute directly on the machine, not in a container). Target withruns-on: [self-hosted, fedora40]. If act_runner runs as root -> root + CAP_NET_ADMIN + /dev/kvm, exactly the firecracker requirements. No GitHub, no mirror, no external SaaS. (Corrects the earlier "Cirrus -> GitHub mirror" framing below: we don't need to reach for Cirrus to get persistent workers.)Why Cirrus specifically would require GitHub (for the record)
Cirrus CI is a hosted SaaS, not a runner we install. Its servers ingest webhooks, clone with an SCM token, and post status/checks -- all implemented for GitHub App + Bitbucket only. There's no way to point Cirrus's backend at self-hosted Gitea; using it would mean mirroring the repo to GitHub. Its open-source
cirrus-clican run.cirrus.ymllocally, but then we provide the compute anyway, so it collapses to "Gitea Actions running Cirrus YAML." Net: Cirrus is only worth the GitHub mirror if we specifically want its managed FreeBSD/macOS/ARM fleet -- not our use case.Options
act_runnerscompute_engine_instancenested-virt)Cost of the compute backend (the real driver -- order-of-magnitude, verify)
n2-standard-4+ nested virt*.metalCI orchestration itself is ~free in the Gitea-native options (we self-host); the cost is compute + hardware upkeep.
Recommendation
act_runnerper target system (delphi, plus a ~EUR 35/mo Hetzner box hosting per-distro VMs). Native, ~free, full root+KVM, gives the "specific systems" experience directly.First deliverable (CI-agnostic)
A
scripts/firecracker-e2e.shharness: install prereqs -> provision kernel+dropbear (the documented user path) ->backend setup-> headless launch -> assert isolation + egress 200 + git-gate. Same script runs under whichever CI/runner we pick; the CI YAML is then thin (justruns-on:the right labeled runner).Partially superseded by the self-hosted KVM runner, which now exercises the Firecracker backend and end-to-end isolation suite. The original cross-distro installation and
backend setupcoverage remains incomplete, but is low priority; we can reopen this issue later if we decide to complete that work.