Skip to content

Provision region-pinned runners for registry benchmarks (us-east-1 + eu-central-1) and set REGISTRY_RUNNERS #231

Backlog

Description

@darcyclarke

📋 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-1 and eu-central-1, following RunsOn's docs for multiple regions.
  • Install the RunsOn GitHub App on vltpkg, scoped to vltpkg/benchmarks only.
  • Buy or activate the license.
  • Set the repository variable REGISTRY_RUNNERS (Settings → Secrets and variables → Actions → Variables):
    {
      "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"
      }
    }
    The workflow replaces {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.json artifact shows aws / us-east-1 or eu-central-1 and m8g.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.
  • Watch the first few nights for queue time, duration and failures. A failing eu job is continue-on-error and 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, schedule and workflow_dispatch, never pull_request, so fork PRs can't reach these runners. Keep it that way for any job that uses them. The runners also see the Benchmark environment secrets.
  • The North American series changes hardware. Moving na from GitHub-hosted runners to our own changes the machine under an existing series. Each night's regions.json records 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions