Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GitHub ── workflow_job ──► API Gateway ──► webhook λ ──►
|---|---|
| **Isolation** | One ephemeral instance per job, registered with a single-use JIT config. No runner is reused. |
| **Cost** | About $0.0008 per runner-minute (2 vCPU / 8 GiB spot, EBS and IPv4 included) against $0.006 on GitHub-hosted. Idle cost is about $4 a month. A monthly AWS budget alarm is part of the fleet. |
| **Burst** | 100 runners by default, on AMD `m7a`/`m8a` (two physical cores each) across five availability zones, spot with on-demand fallback when a pool is empty. |
| **Burst** | 100 runners by default, on AMD `m7a`/`m8a` (two physical cores each), with `m7i-flex`, `m7i` and `m6a` for depth, across five availability zones, spot with on-demand fallback when a pool is empty. |
| **Start time** | A prebuilt image (`image/`) with the runner, Docker and Node baked in. No user data, no downloads at boot. |
| **Missed webhooks** | GitHub never retries a failed delivery. A sweeper re-requests failed `workflow_job` deliveries for jobs that are still queued. |
| **Blast radius** | Every role carries a permissions boundary; the deploy role can only touch resources under the fleet's prefix. The GitHub App key lives in SSM and never passes through Terraform state or CI. |
Expand Down
29 changes: 18 additions & 11 deletions infra/fleet/terraform/local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,27 @@ locals {
# budgeted burst. Lanes above the cap wait in the queue, they are not dropped.
runners_maximum_count = 100

# 2 vCPU / 8 GiB x86_64, the GitHub-hosted ubuntu-latest (private repo) shape,
# as two PHYSICAL cores. AMD's 7th and 8th generations run one thread per
# core; every Intel type and m5a/m6a give "2 vCPU" as one core and its
# hyperthread. On 958 runs of 116 orun-cloud jobs (2026-10-08 to 10-14) the
# same job took, against m7a: 1.08x on m7i/m7i-flex, 1.16x on m6a, 1.21x on
# m6i, 1.27x on m5 and 1.61x on m5a, and price-capacity-optimized put a third
# of all jobs on m5/m5a. Spot cost per job is the same or lower on m7a
# (sourceplane/orun-cloud#1908). Two types across 5 AZs; a pool with no spot
# capacity fails over to on-demand. Add m7i-flex.large back only if spot
# capacity runs short. No T-family: CI exhausts burst credits and unlimited
# mode bills a surcharge.
# 2 vCPU / 8 GiB x86_64, the GitHub-hosted ubuntu-latest (private repo) shape.
# AMD's 7th and 8th generations give two PHYSICAL cores; every Intel type and
# m5a/m6a give "2 vCPU" as one core and its hyperthread. On 958 runs of 116
# orun-cloud jobs (2026-10-08 to 10-14) the same job took, against m7a: 1.08x
# on m7i/m7i-flex, 1.16x on m6a, 1.21x on m6i, 1.27x on m5 and 1.61x on m5a,
# and price-capacity-optimized put a third of all jobs on m5/m5a
# (sourceplane/orun-cloud#1908). So the slow three stay out.
#
# The fastest types alone are too shallow a pool. On m7a/m8a only, a
# 128-job verify got m7a in two AZs (118 in us-east-1b, no m8a at all), and
# 32 jobs waited over 2 minutes for a runner, against 5 on the wider pool
# (sourceplane/nimbus-runners#30). The Intel 7th generation and m6a give
# price-capacity-optimized room at most 1.16x the time.
#
# No T-family: CI exhausts burst credits and unlimited mode bills a surcharge.
instance_types = [
"m7a.large",
"m8a.large",
"m7i-flex.large",
"m7i.large",
"m6a.large",
]

root_volume_gb = 40
Expand Down
8 changes: 6 additions & 2 deletions infra/fleet/terraform/runners.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,15 @@ module "runners" {
enable_job_queued_check = true
# A safety net, not the burst path. Not shorter than a runner's boot (about
# 70 s from launch to job start): a job is still queued while its runner
# boots, and an earlier re-check would launch it a second runner.
# boots, and an earlier re-check would launch it a second runner. Three
# re-checks, backing off 2x (about +120 s, +240 s, +480 s): one left a job
# with no runner for 15 minutes when its single re-check also launched
# nothing (#30). Each re-check first asks GitHub whether the job is still
# queued, so a job that found a runner costs one API call.
job_retry = {
enable = true
delay_in_seconds = 120
max_attempts = 1
max_attempts = 3
}

# Burst: ~120 lanes land within seconds on a full verify.
Expand Down
4 changes: 2 additions & 2 deletions work/epics/nimbus-runners-baseline/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ A GitHub App owned by the adopter sends `workflow_job` events to an API Gateway
| Concern | Decision | Why |
|---|---|---|
| Runner lifecycle | Ephemeral, JIT-registered, one job per instance (`enable_ephemeral_runners`, `enable_jit_config`) | Jobs carry deploy credentials, so nothing survives between jobs. Nothing is paid between bursts. |
| Capacity | Spot, `price-capacity-optimized`, seven 2 vCPU / 8 GiB x86 types across five AZs. On-demand only on `InsufficientInstanceCapacity` | Deep pools for a 100-instance burst at about 40% of the on-demand price. |
| Instance families | `m7a`, `m8a` `.large` (until 2026-10-15: `m7i-flex`, `m6a`, `m5a`, `m6i`, `m5`, `m7i`, `m7a`); no T-family | Matches the private-repo `ubuntu-latest` shape with two physical cores: the same orun-cloud job ran 1.08–1.61× longer on the other types (sourceplane/orun-cloud#1908). T3 runs out of CPU credits or bills unlimited-mode surcharges under CI load. |
| Capacity | Spot, `price-capacity-optimized`, five 2 vCPU / 8 GiB x86 types across five AZs. On-demand only on `InsufficientInstanceCapacity` | Deep pools for a 100-instance burst at about 40% of the on-demand price. |
| Instance families | `m7a`, `m8a`, `m7i-flex`, `m7i`, `m6a` `.large` (until 2026-10-15 also `m5a`, `m6i`, `m5`); no T-family | Matches the private-repo `ubuntu-latest` shape. The same orun-cloud job ran 1.21–1.61× longer on `m6i`, `m5` and `m5a` than on `m7a`, and 1.08–1.16× on the types kept for pool depth (sourceplane/orun-cloud#1908). The fastest two alone were too shallow for a 128-job burst (#30). T3 runs out of CPU credits or bills unlimited-mode surcharges under CI load. |
| Cap | `runners_maximum_count = 100` (input `maxRunners`); scale-up concurrency 5; batch 20 | Absorbs a full orun-cloud verify. Lanes above the cap queue; they are not dropped. |
| Cancelled jobs | `delay_webhook_event = 10`, `enable_job_queued_check = true` | Superseded PR runs are cancelled by the consumer's concurrency group and never boot. |
| Labels | `[self-hosted, linux, x64, nimbus]` (input `runnerLabels`) | One label selects the fleet. Stage 2 adds per-job `ghr-*` labels without changing this set. |
Expand Down
Loading