Cross-Stack Deployment Ordering
Stacks must be deployed in dependency order. Deploying out of order causes service discovery failures and missing prerequisites.
Dependency Graph
attic (storage + cache platform)
└── gitlab-runners (needs cache URLs)
└── arc-runners (needs cache URLs)
└── runner-dashboard (needs runner APIs)
Deploy Order
1. Attic Stack (Storage Layer)
just tofu-deploy attic
Provides: PostgreSQL, MinIO, Attic API, Bazel cache, GC worker.
Other stacks depend on: ATTIC_SERVER, BAZEL_REMOTE_CACHE endpoints.
Verify before proceeding:
just cache-health
2. Runner Stacks (Compute Layer)
Deploy in any order (independent of each other):
just tofu-deploy gitlab-runners
just tofu-deploy arc-runners # via GH Actions workflow
Provides: CI/CD runner pods registered with GitLab and GitHub. Dashboard depends on: runner pods being queryable via K8s API.
Verify before proceeding:
just runners-status
3. Runner Dashboard (Monitoring Layer)
just tofu-deploy runner-dashboard
Provides: Web UI for runner fleet monitoring.
Rollback Order
Reverse the deploy order:
just tofu-destroy runner-dashboardjust tofu-destroy gitlab-runners/ destroy ARC via GH Actionsjust tofu-destroy attic
CI/CD Enforcement
GitLab CI enforces ordering via pipeline stages:
deploy:atticruns indeploystagedeploy:runnersruns indeploystage withneeds: [deploy:attic]deploy:dashboardruns indeploystage withneeds: [deploy:runners]