Skip to content

L7 — Infra & Deployment

Production GCP topology. The whole estate runs on Cloud Run (since the 2026-07 migration off GKE): scale-to-zero v2 Services behind a single global external-managed HTTPS load balancer with one IP, plus min-0 v2 Jobs for one-shot work. There is no cluster, no node pool, no NAT, and no Kubernetes manifests — services egress directly and authenticate to GCP with per-service runtime service accounts.

CI/CD · GitHub Actions

Google Workflows

GCP managed services

Cloud Run v2 Jobs (min-0 · one execution = one unit of work)

Cloud Run v2 Services (scale-to-zero HTTP)

GCP edge — one global LB, one IP

static frontends

executions.create

executions.create

HTTP /internal/*

HTTP /internal/*

HTTP /internal/*

launch execution

launch execution

docker push

applies

logs

logs

new revision

new revision

applies

Internet

(humans · agents · clients)

Global external-managed HTTPS LB

+ managed TLS certs

routes every domain: api.* · mcp.* · frontends

Cloud Armor

WAF + per-IP rate limits

attached at API backends

+ deny on /internal/* paths

Cloud CDN + GCS buckets

coordination.game · shillbot.org · swarm.tips

(static frontends)

game-api

[Rust + axum]

REST + WS · autoscaled

mcp-server

[Rust + rmcp]

session affinity for MCP sessions

shillbot-api

[Rust + axum]

shillbot-verifier

[Rust + axum]

shillbot-attester

[Rust]

holds attestation signing key

shillbot-lean-runner

[Rust]

no-permission SA · egress-denied VPC

shorts-api

[Rust]

x402 / Stripe

x-post-guard

[Rust]

internal-only validator

grok-agent

1 execution per game

shillbot-worker

1 execution per task run

short-video-generator

1 execution per render

Firestore

shared by game + shillbot

Secret Manager

direct reads at startup

no K8s-style secret mounts

Artifact Registry

Docker images

Cloud Logging

structured + log-based metrics

Per-service runtime SAs

(keyless auth · least privilege)

game-ai-fallback · game-session-timeout

game-match-timeout · shillbot-verification

shillbot-attestation-pipeline · shillbot-video

(YAMLs in infra/workflows/, Terraform-deployed)

push to main

per-service workflow

WIF auth → docker build

(test stage: fmt · clippy · test)

→ push to Artifact Registry

gcloud run deploy /

gcloud run jobs deploy

terraform

plan on PR · apply on merge

(ignores image drift)

  • Services vs Jobs: anything serving HTTP is a scale-to-zero Service; anything whose natural unit is “one game / one task / one render” is a min-0 Job — zero idle cost, launched by a workflow or a service.
  • One trust boundary at the edge: every public domain resolves to the same LB IP; Cloud Armor policies attach per-backend. /internal/* handler routes are reachable only through internal load-balancer ingress — external requests are denied at the platform layer, not by shared credentials.
  • Secrets are read directly from Secret Manager at startup by each service using its own least-privilege runtime SA. The lean-runner runs with a no-permission SA inside an egress-denied VPC — it executes untrusted code and holds nothing worth stealing.
  • CI is the only path to production: per-service GitHub Actions workflows authenticate via Workload Identity Federation, run the test gate inside the Docker build, and deploy with gcloud run deploy. Terraform owns everything else in infra/ and deliberately ignores image drift so applies never revert CI deploys.