tweak the forgejo runners and replace unmanaged runners with managed ones

This commit is contained in:
Finn 2024-03-25 16:28:36 -07:00
parent ab93bb3c2c
commit 3634979ce8
4 changed files with 21 additions and 2 deletions

View file

@ -71,8 +71,24 @@ forgejo_runners:
hosts:
forgejo-runner-0:
home_network: true
forgejo_host: git.janky.solutions
forgejo_org: system
forgejo-runner-1:
home_network: true
forgejo_host: git.janky.solutions
forgejo_org: system
forgejo-runner-2:
home_network: true
forgejo_host: codeberg.org
forgejo_org: EntanglementGarden
forgejo-runner-3:
home_network: true
forgejo_host: codeberg.org
forgejo_org: EntanglementGarden
forgejo-runner-4:
home_network: true
forgejo_host: codeberg.org
forgejo_org: thefinn93
seedboxes:
hosts:

View file

@ -45,7 +45,7 @@
- restart forgejo-runner
- name: register the runner
command: podman run --rm --user root -tiv /etc/forgejo-runner:/etc/forgejo-runner:ro -v /var/forgejo-runner:/data code.forgejo.org/forgejo/runner:3.3.0 forgejo-runner register --instance https://git.janky.solutions --name "{{ inventory_hostname }}" --token "{{ lookup('ansible.builtin.ini', 'registration_token section=forgejo_runner file=secrets/git.janky.solutions.ini') }}" --no-interactive
command: podman run --rm --user root -tiv /etc/forgejo-runner:/etc/forgejo-runner:ro -v /var/forgejo-runner:/data code.forgejo.org/forgejo/runner:3.3.0 forgejo-runner register --instance https://{{ forgejo_host }} --name "{{ inventory_hostname }}" --token "{{ lookup('ansible.builtin.ini', forgejo_org + ' section=' + forgejo_host + ' file=secrets/forgejo-runners.ini') }}" --no-interactive
args:
creates: /var/forgejo-runner/.runner

View file

@ -18,6 +18,7 @@ ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/forgejo-runner.service.pid \
--replace \
--env DOCKER_HOST=unix:///run/podman/podman.sock \
--env CONTAINER_HOST=unix:///run/podman/podman.sock \
--name forgejo-runner \
-v /run/podman/podman.sock:/run/podman/podman.sock \
-v /etc/forgejo-runner:/etc/forgejo-runner:ro \

View file

@ -28,7 +28,9 @@ runner:
# If it's empty when registering, it will ask for inputting labels.
# If it's empty when execute `deamon`, will use labels in `.runner` file.
labels: [
"ubuntu-latest:docker://node:16-bullseye",
"docker:docker://node:20-bookworm",
"node20:docker://node:20-bookworm",
"ubuntu-latest:docker://node:20-bookworm",
"ubuntu-22.04:docker://node:16-bullseye"
]