@@ -1,15 +1,19 @@ |
| 1 | 1 | # Actions runner smoke runbook |
| 2 | 2 | |
| 3 | | -This runbook drives one queued Actions job with curl. It is for S41c |
| 4 | | -operator validation before the real `shithubd-runner` binary lands. |
| 3 | +This runbook validates the runner-facing Actions path. `shithubd-runner` |
| 4 | +now claims jobs and executes containerized `run:` steps through Docker or |
| 5 | +Podman. The curl flow below remains useful for token/replay debugging. |
| 5 | 6 | |
| 6 | 7 | Prereqs: |
| 7 | 8 | |
| 8 | 9 | - Database migrations are current through `0053_runner_jwt_used.sql`. |
| 9 | 10 | - `SHITHUB_TOTP_KEY` or `auth.totp_key_b64` is set on the web process. |
| 10 | 11 | - Object storage is configured if testing artifact upload. |
| 12 | +- Docker or Podman is installed on the runner host. |
| 11 | 13 | - A repo has a workflow under `.shithub/workflows/*.yml` with |
| 12 | 14 | `runs-on: ubuntu-latest`, and a push/dispatch has enqueued a run. |
| 15 | + S41d PR1 supports `run:` steps; checkout and artifact aliases land in |
| 16 | + the following S41d slices. |
| 13 | 17 | |
| 14 | 18 | Register a runner: |
| 15 | 19 | |
@@ -27,6 +31,44 @@ export RUNNER_TOKEN='<printed-token>' |
| 27 | 31 | export BASE='https://shithub.example' |
| 28 | 32 | ``` |
| 29 | 33 | |
| 34 | +Run the binary: |
| 35 | + |
| 36 | +```sh |
| 37 | +shithubd-runner run \ |
| 38 | + --server-url "$BASE" \ |
| 39 | + --token "$RUNNER_TOKEN" \ |
| 40 | + --labels self-hosted,linux,ubuntu-latest \ |
| 41 | + --workspace-root /var/lib/shithubd-runner/workspaces |
| 42 | +``` |
| 43 | + |
| 44 | +Equivalent config file: |
| 45 | + |
| 46 | +```toml |
| 47 | +[server] |
| 48 | +base_url = "https://shithub.example" |
| 49 | + |
| 50 | +[runner] |
| 51 | +token = "<printed-token>" |
| 52 | +labels = ["self-hosted", "linux", "ubuntu-latest"] |
| 53 | +capacity = 1 |
| 54 | +poll_interval = "5s" |
| 55 | +workspace_root = "/var/lib/shithubd-runner/workspaces" |
| 56 | +workspace_ttl = "24h" |
| 57 | + |
| 58 | +[engine] |
| 59 | +kind = "docker" |
| 60 | +default_image = "ghcr.io/shithub/runner-nix:1.0" |
| 61 | +network = "bridge" |
| 62 | +memory = "2g" |
| 63 | +cpus = "2" |
| 64 | +``` |
| 65 | + |
| 66 | +The config path defaults to `/etc/shithubd-runner/config.toml`. |
| 67 | +Environment variables use the `SHITHUB_RUNNER_` prefix, for example |
| 68 | +`SHITHUB_RUNNER_TOKEN` or `SHITHUB_RUNNER_SERVER__BASE_URL`. |
| 69 | + |
| 70 | +## Curl token smoke |
| 71 | + |
| 30 | 72 | Claim a job: |
| 31 | 73 | |
| 32 | 74 | ```sh |