infra: region-pi runbook — Pi 4 as dev-platform instance host
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+52
−0
infra/dev/region-pi.md+52 −0
diff --git a/infra/dev/region-pi.md b/infra/dev/region-pi.md| new file mode 100644 |
| index 000000000..51515b3ac |
| --- /dev/null |
| +++ b/infra/dev/region-pi.md |
| @@ -0,0 +1,52 @@ |
| +# Region pi — Raspberry Pi 4 host on the dev platform |
| + |
| +Hardware: Raspberry Pi 4, 4 GB. Storage: SSD over USB3 strongly preferred; |
| +high-endurance SD acceptable for the demo (SQLite + WAL streaming is the |
| +I/O load, and SD I/O is the honest constraint on this board). |
| + |
| +OS: 64-bit Raspberry Pi OS Lite — MANDATORY. Hosts pick release artifacts |
| +by GOOS-GOARCH; this Pi resolves linux-arm64, the same artifact the |
| +Graviton fleet runs. 32-bit resolves nothing. |
| + |
| +Follow infra/remote-host.md with these dev-platform values: |
| + |
| +- Tofu: instantiate infra/modules/region-remote-host in the dev root |
| + (platform-infrastructure repo) as: |
| + module "region_pi" { |
| + source = "git::https://github.com/carlosframework/platform.git//infra/modules/region-remote-host" |
| + region_code = "pi" |
| + data_bucket_name = "carlos-dev-pi-640012953448" |
| + deployment_bucket_arn = <dev deployment bucket ARN> |
| + } |
| + Apply from the platform-infrastructure checkout (operator step — the |
| + root module is not in this repo). |
| +- /etc/carlos/credentials: the module's access key output (0600). |
| +- /etc/carlos/host.env additions beyond the standard agent env: |
| + AWS_SHARED_CREDENTIALS_FILE=/etc/carlos/credentials |
| + CARLOS_HIBERNATE_BUCKET=carlos-dev-pi-640012953448 |
| + STATUS_BOX_REGION="Pi · demo" |
| + CARLOS_TUNNEL_URL=https://<dev tunnel hostname> |
| + CARLOS_TUNNEL_TOKEN=<from the edge's CARLOS_TUNNEL_CLIENTS entry> |
| + CARLOS_TUNNEL_NAME=pi-box |
| +- Dev edge host.env additions: |
| + CARLOS_TUNNEL_HOST=<dev tunnel hostname, DNS → dev edge> |
| + CARLOS_TUNNEL_CLIENTS=pi-box=<token> |
| + (Restart the dev edge to pick these up. Mint the token with |
| + `openssl rand -hex 32`; it lives only in these two env files.) |
| +- No live fallback: no other host gets IAM on the pi bucket. A dark Pi |
| + shows UNREACHABLE in the fleet view and `carlos status -live`; instances |
| + resume when it re-dials. This is the approved demo posture. |
| + |
| +Seeding: scripts/seed-pi-demo.sh (batches of ≤10/day — console limiter). |
| +Target: ≥5 resident + ≥50 parked. |
| + |
| +## Demo acceptance (run these, tick them) |
| + |
| +- [ ] Pi appears in `carlos status -live` with metrics + tunnel=connected. |
| +- [ ] A resident instance serves through the dev edge over the channel. |
| +- [ ] A parked instance wakes on first request through the channel. |
| +- [ ] Pull Wi-Fi, restore it: next request succeeds after re-dial |
| + (seconds — the bound the e2e test asserts in-repo). |
| +- [ ] Power off: fleet shows UNREACHABLE (age, no stale numbers). |
| + Power on: serving resumes; `carlos status -live` confirms nothing |
| + migrated (instances still pi-resident). |