From 4d6e43e9f7c7764ee5182c0f3996249cd0ce9cf1 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Nov 2026 18:56:55 -0500 Subject: [PATCH] Proposed runner on a dedicated host: playbook, role bump, runbook ci-runner.yaml deploys the Gitea Actions runner on inspiron-3670 with the gitea role's new actions_host.yaml (private Docker daemon for jobs, same capacity, timeouts, job images and cleanup as the cluster runner). Not applied; waiting on a decision in the issue. Refs #45 Co-Authored-By: Claude Opus 5.5 --- ci-runner.yaml | 12 ++++++++++++ docs/ci-cd/runner.md | 26 ++++++++++++++++++++++++++ roles/ericomeehan.gitea | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 ci-runner.yaml diff --git a/ci-runner.yaml b/ci-runner.yaml new file mode 100644 index 0000000..3297877 --- /dev/null +++ b/ci-runner.yaml @@ -0,0 +1,12 @@ +--- +# Gitea Actions runner on a dedicated host outside the cluster (I3, +# DevOps/software-infrastructure#45). The runner's settings live in the +# ericomeehan.gitea role (defaults/main.yml, tasks/actions_host.yaml). +- name: Gitea Actions runner host + hosts: inspiron-3670 + become: true + tasks: + - name: runner on its own Docker daemon + ansible.builtin.import_role: + name: ericomeehan.gitea + tasks_from: actions_host.yaml diff --git a/docs/ci-cd/runner.md b/docs/ci-cd/runner.md index 42ded4a..af5b269 100644 --- a/docs/ci-cd/runner.md +++ b/docs/ci-cd/runner.md @@ -191,6 +191,32 @@ hand. 6. Confirm a single runner shows **Idle** in the admin page and a test workflow succeeds. +## Proposed: runner on a dedicated host + +Not deployed. Proposed in DevOps/software-infrastructure#45 as the answer to +I3 and S3: run the runner on `inspiron-3670` instead of in the cluster. + +- **Layout.** Docker Compose project `gitea-runner` in `/opt/gitea-runner`: + `dind` (a private Docker daemon that holds every job container, with data in + `/var/lib/gitea-runner/docker`), `runner`, and `prune` (the same cleanup + script as in the cluster). Jobs never see the host's own Docker daemon or + its other containers. +- **Settings.** Capacity, timeouts, job images and cleanup are the same + variables as the in-cluster runner. Host-only ones are `gitea_actions_host_*` + in the role's `defaults/main.yml`: 4 CPUs and 16 GB for jobs, and a CPU + weight below the host's other containers. +- **Apply.** `ansible-playbook ci-runner.yaml`. The first run fetches a + registration token from the cluster, registers, and deletes the token file. + Rerunning recreates only containers whose settings changed; that cancels a + running job. +- **Logs.** On the host: `docker compose -f /opt/gitea-runner/compose.yaml logs + runner` (or `dind`, `prune`). +- **Roll back.** `docker compose -f /opt/gitea-runner/compose.yaml down` on the + host. The in-cluster runner keeps serving jobs until it is removed + separately. +- **Note for jobs.** `nproc` inside a job reports all of the host's CPUs, not + the 4-CPU cap, so builds that size `-j` from it oversubscribe. + ## Related - Roadmap: label `cicd` on DevOps/software-infrastructure, milestones diff --git a/roles/ericomeehan.gitea b/roles/ericomeehan.gitea index 4d7b0b9..9f768ed 160000 --- a/roles/ericomeehan.gitea +++ b/roles/ericomeehan.gitea @@ -1 +1 @@ -Subproject commit 4d7b0b9e01ddeec27b363fa49c5a84051f429185 +Subproject commit 9f768ed621459a36e80260ba3df2afb456919e57