Repository navigation
Description
📋 Description
Provision region-pinned self-hosted runners for the registry benchmarks, one region in North America and one in Europe. Then set the REGISTRY_RUNNERS repository variable that the workflow reads.
Until this is done, the registry regions code in the linked PR runs na only, on ubuntu-24.04-arm as today, and skips eu with a warning.
📂 Category
Build/CI Improvements
🎯 Motivation
We can't pin GitHub's standard hosted runners to a region, and they may now run on AWS or Azure. GitHub's larger runners with Azure private networking can be pinned, but only to US regions for arm64. To measure registries from Europe, and to know where the North American runs come from, we need runners we place ourselves. See the parent issue.
Recommendation: RunsOn in our AWS account
RunsOn runs ephemeral EC2 runners in our own AWS account, using Ubuntu images compatible with GitHub's runner images. Today's suite/scripts/setup.sh, which uses apt, should work unchanged. Jobs choose a region with a label. Why this option:
- Keeps arm64. We'd use Graviton
m8g, 4 vCPU / 16 GB, which matches today's runner shape. - Uses the AWS account we already have. The CodeArtifact registry and the OIDC role in the workflow are already there.
- Gives the same machine in both regions, on-demand (not spot), so the region is the only variable.
- Cost: a license (Starter is €300/yr, under 50k jobs/month) plus EC2 at cost. A night is about 24 short registry jobs: 6 fixtures × 2 variations × 2 regions.
Steps
- Deploy the RunsOn stack in
us-east-1andeu-central-1, following RunsOn's docs for multiple regions. - Install the RunsOn GitHub App on
vltpkg, scoped tovltpkg/benchmarksonly. - Buy or activate the license.
- Set the repository variable
REGISTRY_RUNNERS(Settings → Secrets and variables → Actions → Variables):The workflow replaces{ "na": { "runs-on": "runs-on={run_id}/cpu=4/ram=16/family=m8g/image=ubuntu24-full-arm64/spot=false/region=us-east-1", "label": "AWS us-east-1 (N. Virginia), 4 vCPU Graviton" }, "eu": { "runs-on": "runs-on={run_id}/cpu=4/ram=16/family=m8g/image=ubuntu24-full-arm64/spot=false/region=eu-central-1", "label": "AWS eu-central-1 (Frankfurt), 4 vCPU Graviton" } }{run_id}with the run id. Check the label keys against RunsOn's job labels docs before saving. - Dispatch a partial test run:
variations=["registry-clean"],fixtures=["next"]. A partial run doesn't deploy. Then check:- both
Run Registry Benchmarks (na)and(eu)were picked up quickly; - each job's
runner.jsonartifact showsaws/us-east-1oreu-central-1andm8g.xlarge. If instance metadata is blocked from jobs, only the requested label and the Cloudflare colo appear, so allow IMDSv2; - the CodeArtifact token step works from both regions;
- every registry installs, and job time fits under the 120-minute timeout.
- both
- Watch the first few nights for queue time, duration and failures. A failing
eujob iscontinue-on-errorand won't block the night, but a job waiting in the queue for a runner that never comes stalls the whole run, so check that the stacks stay healthy.
Things to know
- Security. This is a public repo, and self-hosted runners must never run untrusted code. The benchmark workflow only triggers on
push,scheduleandworkflow_dispatch, neverpull_request, so fork PRs can't reach these runners. Keep it that way for any job that uses them. The runners also see theBenchmarkenvironment secrets. - The North American series changes hardware. Moving
nafrom GitHub-hosted runners to our own changes the machine under an existing series. Each night'sregions.jsonrecords which runner was used, and the registry pages show it. Note the switch date in the methodology when it happens.
Alternatives
| Option | Region pinning | arm64 in EU | Effort / cost |
|---|---|---|---|
| RunsOn (recommended) | Any AWS region | ✅ | License + EC2 |
| GitHub larger runners + Azure private networking | Azure region of the VNET | ❌ (x64 only outside the US) | Azure subscription, a VNET and NAT per region, larger-runner minutes. Runner group per region: {"eu": {"runs-on": {"group": "registry-eu"}}} |
machulav/ec2-github-runner |
Any AWS region | ✅ | Free, but needs an AMI, a PAT and start/stop jobs around every benchmark job |
| AWS CodeBuild-hosted runners | Any CodeBuild region | ✅ | Container images aren't Ubuntu, so setup.sh would need work |
Whichever we choose, only the REGISTRY_RUNNERS value changes; the workflow doesn't.
Generated by Claude Code
Activity