chore: add docker compose for self-hosted Gitea act_runners #2
Reference in New Issue
Block a user
Delete Branch "chore/ci-runners-infra"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Set up the infrastructure-as-code recipe to bring up the three
self-hosted Gitea Actions runners required by ADR-0015. The compose
file launches three act_runner instances pinned to 0.2.13, registered
with the project's Gitea organisation, labelled self-hosted + on-prem
to match the runs-on selector in every job under .gitea/workflows/*.
Layout:
flow, security implications, future
placeholders (local/, prod/, runbooks/)
together, persisting credentials to
./data/runner-N
GITEA_RUNNER_REGISTRATION_TOKEN; .env
itself stays git-ignored (root rule)
Security posture (documented in infra/README.md): mounting
/var/run/docker.sock gives the runner root-equivalent access to the
host Docker daemon. Mitigations rely on (a) repo-scope of the runner
in Gitea, (b) running the runner host outside the production trust
boundary, (c) no extra host filesystem mounts. Future hardening
(rootless Docker, DinD sidecar) is flagged as deferred.
The compose pins the runner image (0.2.13). Bumps go through a
dedicated chore(deps) PR per the convention; image upgrades roll one
runner at a time so CI is never starved (procedure documented in the
README).
Doc indexing (docs/README.md) deliberately not touched here to avoid
a conflict with the pending docs/architecture-diagrams branch which
also modifies that file. A small follow-up PR will add an index entry
once that branch is merged.
Set up the infrastructure-as-code recipe to bring up the three self-hosted Gitea Actions runners required by ADR-0015. The compose file launches three act_runner instances pinned to 0.2.13, registered with the project's Gitea organisation, labelled self-hosted + on-prem to match the runs-on selector in every job under .gitea/workflows/*. Layout: - infra/ new top-level folder for IaC - infra/README.md explains the folder, registration flow, security implications, future placeholders (local/, prod/, runbooks/) - infra/ci-runners.compose.yml three act_runner services, networked together, persisting credentials to ./data/runner-N - infra/.env.example GITEA_INSTANCE_URL + GITEA_RUNNER_REGISTRATION_TOKEN; .env itself stays git-ignored (root rule) - infra/data/.gitignore tracks the dir, ignores runtime state Security posture (documented in infra/README.md): mounting /var/run/docker.sock gives the runner root-equivalent access to the host Docker daemon. Mitigations rely on (a) repo-scope of the runner in Gitea, (b) running the runner host outside the production trust boundary, (c) no extra host filesystem mounts. Future hardening (rootless Docker, DinD sidecar) is flagged as deferred. The compose pins the runner image (0.2.13). Bumps go through a dedicated chore(deps) PR per the convention; image upgrades roll one runner at a time so CI is never starved (procedure documented in the README). Doc indexing (docs/README.md) deliberately not touched here to avoid a conflict with the pending docs/architecture-diagrams branch which also modifies that file. A small follow-up PR will add an index entry once that branch is merged.