forgejo runners(arm64): run both arm64 runners as in-cluster dind pods
The Pi's host Docker is no longer the arm64 job-container daemon. Both forgejo-runner-arm64 and forgejo-runner-deploy-arm64 now run a privileged docker:27-dind sidecar (--mtu=1420, socket on an emptyDir shared with the runner, data-root on a PVC), the same shape as forgejo-runner-amd64. - labels preserved verbatim: shared keeps docker-arm64/arm64/docker, deploy keeps deploy-arm64 only; capacity 1 on both - runner.ini moved from hostPath to the data PVC by copy, uuid preserved (4e07c1e9... / a41aad73...); the deploy runner's register init container is inverted into a guard so a missing file cannot burn a token and create a second runner - dind limits.memory 4Gi (measured peak 3.10GiB) and 2Gi for the deploy runner so a CI run and a deploy cannot both claim the Pi's 7GiB - static hostPath PVs pinned to rpi with Retain: dynamic local-path cannot provision there (helper pod hardcoded to siriussec) - docker CLI/buildx come from the dind image instead of the host's docker-static - Pi registry additionally published on 10.10.0.1:5000 (out of band on the Pi) - RpiDindDataRootFillingUp at 70%: the real cap, since a static PV does not enforce its claim and kubelet_volume_stats_* does not exist here Design and measured proof: docs/arm64-runner-dind.md (t_627c231c).
This commit is contained in:
parent
a243af6591
commit
131b9bc7c9
6 changed files with 359 additions and 125 deletions
|
|
@ -8,7 +8,10 @@ data:
|
|||
log:
|
||||
level: info
|
||||
runner:
|
||||
file: /config/runner.ini
|
||||
# runner.ini lives on the runner's data PVC now (was a hostPath file), so
|
||||
# the registration survives the move to in-cluster dind with the same
|
||||
# uuid. Nothing in the Deployment registers a runner.
|
||||
file: /data/runner.ini
|
||||
# capacity 1: ci.yml builds every job's Rust target into ONE shared named
|
||||
# volume (onionwire-target-ci, mounted at /target). Two jobs writing that
|
||||
# volume concurrently clobber each other's freshly-linked test binaries,
|
||||
|
|
@ -18,16 +21,25 @@ data:
|
|||
# runs of the same group on this runner (446 + 447 overlapped).
|
||||
capacity: 1
|
||||
timeout: 1h
|
||||
cache: /opt/siriusdevops/runner/cache
|
||||
cache: /data/cache
|
||||
cache:
|
||||
enabled: true
|
||||
dir: /opt/siriusdevops/runner/cache
|
||||
dir: /data/cache
|
||||
container:
|
||||
privileged: true
|
||||
# No docker_host here: setting it makes the runner inject the host socket
|
||||
# bind into the job container itself, which collides with the explicit
|
||||
# -v /var/run/docker.sock in options ("Duplicate mount point").
|
||||
options: -v /usr/local/bin/docker-static:/usr/bin/docker:ro -v /opt/siriusdevops/runner/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock --memory 3g --memory-swap 3g
|
||||
# No docker_host here: setting it makes the runner inject the socket bind
|
||||
# into the job container itself, which collides with the explicit
|
||||
# -v /var/run/docker.sock in options ("Duplicate mount point"). The
|
||||
# options bind is the deliberate choice — nested `docker create/start` in
|
||||
# ci.yml, fuzz.yml and release.yml depends on it.
|
||||
#
|
||||
# The docker CLI/plugins come out of the `dind` sidecar's own filesystem
|
||||
# (docker:27-dind ships /usr/local/bin/docker, docker-buildx,
|
||||
# docker-compose), not the Pi host's docker-static. Paths resolve inside
|
||||
# the dind container, which is what the daemon bind-mounts from. This
|
||||
# keeps `docker buildx` working without installing a CLI in five
|
||||
# workflows.
|
||||
options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock --memory 3g --memory-swap 3g
|
||||
valid_volumes:
|
||||
- "**"
|
||||
# Dedicated runner for site deploys. It declares ONLY the `deploy-arm64`
|
||||
|
|
@ -36,13 +48,19 @@ data:
|
|||
# can never occupy the Pi's `docker` runner, whose capacity 1 exists to
|
||||
# serialize onionwire jobs sharing the onionwire-target-ci volume.
|
||||
#
|
||||
# It runs on the Pi because deploy-site.yml needs Pi-local resources:
|
||||
# 127.0.0.1:5000 (registry), 127.0.0.1:3900 (Garage) via `--network host`,
|
||||
# and the host docker socket to build the arm64 site image.
|
||||
# It runs on the Pi because deploy-site.yml needs Pi-local resources: the Pi
|
||||
# registry and Garage are now addressed over the WireGuard hub IP
|
||||
# (10.10.0.1:5000, 10.10.0.1:3900) instead of loopback, because 127.0.0.1
|
||||
# inside a pod is the pod. Its own `dind` sidecar builds the arm64 site image;
|
||||
# no host Docker is involved.
|
||||
deploy-arm64.toml: |
|
||||
log:
|
||||
level: info
|
||||
runner:
|
||||
# Copied onto the data PVC from /opt/siriusdevops/runner-deploy/data on
|
||||
# the Pi host before first start. The require-registration init container
|
||||
# refuses to start without it (registering would burn the single-use
|
||||
# token and create a second action_runner row).
|
||||
file: /data/runner.ini
|
||||
capacity: 1
|
||||
timeout: 30m
|
||||
|
|
@ -54,11 +72,13 @@ data:
|
|||
privileged: true
|
||||
# Same injection as arm64.toml: the job container is node:20-bullseye,
|
||||
# which has no docker CLI and no buildx, and deploy-site.yml needs both.
|
||||
# buildx is the host's cli-plugins binary and binfmt/QEMU is registered on
|
||||
# the Pi host, so amd64 cross-builds work here exactly as on the arm64
|
||||
# runner. --memory caps the job container only (sibling `docker run`
|
||||
# containers a workflow spawns are outside the runner's control).
|
||||
options: -v /usr/local/bin/docker-static:/usr/bin/docker:ro -v /opt/siriusdevops/runner/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock --memory 3g --memory-swap 3g
|
||||
# Both come from the dind sidecar's own filesystem. binfmt/QEMU is
|
||||
# registered kernel-globally on the Pi (the POC pod's
|
||||
# /proc/sys/fs/binfmt_misc was empty yet an amd64 build ran as x86_64),
|
||||
# so the `--platform linux/amd64` cross build works inside the pod.
|
||||
# --memory caps the job container only (sibling `docker run` containers a
|
||||
# workflow spawns are outside the runner's control).
|
||||
options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock --memory 3g --memory-swap 3g
|
||||
valid_volumes:
|
||||
- "**"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue