forked from org1/infra
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 <rudolfss13@gmail.com> Co-authored-by: hermes <rudolfss13@gmail.com> Co-authored-by: admin <rudolfss13@gmail.com> Reviewed-on: admin/ansible#53 Co-authored-by: hermes <rudolfss13+hermes@gmail.com>
This commit is contained in:
@@ -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:
|
||||
Reference in New Issue
Block a user