From 0a9e795b8f109163c4077939bfb8ac9f5a8db467 Mon Sep 17 00:00:00 2001 From: hermes Date: Thu, 8 Oct 2026 22:04:58 +0200 Subject: [PATCH] feat(hermes_infra/gitea): add second act_runner on rudolf-T (#53) Closes #52. Adds exactly one second act_runner on `rudolf-T`. The existing runner is constrained away from `rudolf-T`, so when that node is unavailable only the existing runner remains available. Both runners share the normal build label. Validation: `docker stack config -c poc/gitea/stack-compose.yml` passes; the stack contains exactly two runner services. Co-authored-by: rudolf Co-authored-by: hermes Co-authored-by: admin Reviewed-on: https://gitea.rudolf.keenetic.link/admin/ansible/pulls/53 Co-authored-by: hermes --- poc/gitea/stack-compose.yml | 58 +++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/poc/gitea/stack-compose.yml b/poc/gitea/stack-compose.yml index 6f60dd9..643325a 100644 --- a/poc/gitea/stack-compose.yml +++ b/poc/gitea/stack-compose.yml @@ -1,4 +1,3 @@ - # Gitea Actions stack. Uses a dedicated act_runner cache-server so that # job-container networks can reach the cache backend via Swarm service DNS # (gitea_cache_server:37051) instead of the unreachable IP the built-in @@ -14,9 +13,13 @@ services: - gitea - nginx_ingress volumes: - - data:/data + - /root/volumes/gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + deploy: + placement: + constraints: + - node.hostname == odroid ports: - "3002:3000" - "222:22" @@ -47,6 +50,41 @@ services: secrets: - gitea_cache_secret deploy: + placement: + constraints: + - node.hostname == odroid + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + + runner_rudolf_t: + image: docker.io/gitea/act_runner:nightly + entrypoint: ["/usr/local/bin/runner-run.sh"] + environment: + CONFIG_FILE: /cfg/config.yaml + GITEA_INSTANCE_URL: "https://gitea.rudolf.keenetic.link" + GITEA_RUNNER_REGISTRATION_TOKEN: "ZIB6L21imA3XJkq65Cq1h43NzB5U1zhAJK9ybfCz" + GITEA_RUNNER_NAME: "runner2" + GITEA_RUNNER_LABELS: "runner_label1" + ACT_RUNNER_EXTERNAL_SECRET_FILE: /run/secrets/gitea_cache_secret + networks: + - gitea + configs: + - source: runner_config + target: /cfg/config.yaml + mode: 0444 + - source: runner_run + target: /usr/local/bin/runner-run.sh + mode: 0755 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + secrets: + - gitea_cache_secret + deploy: + placement: + constraints: + - node.hostname == rudolf-T restart_policy: condition: on-failure delay: 5s @@ -82,6 +120,8 @@ networks: external: true gitea: driver: overlay + driver_opts: + com.docker.network.driver.mtu: "1200" configs: runner_config: @@ -99,11 +139,11 @@ secrets: external: true volumes: - data: - driver: local - driver_opts: - type: nfs - o: addr=192.168.1.96 - device: :/root/volumes/gitea - # device: :/media/DATA/runtime/gitea + # data: + # driver: local + # driver_opts: + # type: nfs + # o: addr=192.168.1.96 + # device: :/root/volumes/gitea + # # device: :/media/DATA/runtime/gitea cache_data: \ No newline at end of file