feat: rework runner config to INI format with full field support

Replace pipe-delimited runners.conf with INI-style sections supporting
host resolution, container images, repo-scoped tokens, resource limits,
capacity, and SSH key passthrough. All defaults pulled from .env.

- Add INI parsing helpers (ini_list_sections, ini_get, ini_set) to common.sh
- Add SSH key support (UNRAID_SSH_KEY, FEDORA_SSH_KEY) to ssh_exec/scp_to
- Add .env vars: RUNNER_DEFAULT_IMAGE, RUNNER_DEFAULT_CAPACITY,
  RUNNER_DEFAULT_DATA_PATH, LOCAL_RUNNER_DATA_PATH, LOCAL_REGISTRY
- Rewrite manage_runner.sh with host/image/token resolution and resource limits
- Rewrite configure_runners.sh wizard for INI format with all 9 fields
- Update phase3 scripts to use ini_list_sections instead of pipe parsing
- Add runners.conf INI validation to preflight.sh (check 5b)
- Update templates to use resolved labels, capacity, and deploy resources

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
S
2026-02-28 23:14:46 -05:00
parent fcd966f97d
commit f4a6b04d14
12 changed files with 1000 additions and 329 deletions

View File

@@ -14,6 +14,7 @@ UNRAID_SSH_PORT=22 # SSH port (default 22)
UNRAID_GITEA_PORT=3000 # Port Gitea web UI will listen on
UNRAID_GITEA_SSH_PORT=2222 # Port for git-over-SSH (host 22 is taken by SSH server)
UNRAID_GITEA_DATA_PATH= # Absolute path on NVMe for Gitea data (e.g. /mnt/nvme/gitea)
UNRAID_SSH_KEY= # Path to SSH private key (optional, uses ssh-agent default if empty)
# -----------------------------------------------------------------------------
@@ -25,6 +26,7 @@ FEDORA_SSH_PORT=22 # SSH port (default 22)
FEDORA_GITEA_PORT=3000 # Port Gitea web UI will listen on
FEDORA_GITEA_SSH_PORT=2222 # Port for git-over-SSH (host 22 is taken by SSH server)
FEDORA_GITEA_DATA_PATH= # Absolute path on NVMe for Gitea data (e.g. /mnt/nvme/gitea)
FEDORA_SSH_KEY= # Path to SSH private key (optional, uses ssh-agent default if empty)
# -----------------------------------------------------------------------------
@@ -62,9 +64,14 @@ GITEA_BACKUP_ADMIN_TOKEN= # API token for backup instance — do not fil
# -----------------------------------------------------------------------------
# RUNNERS
# Runner definitions live in runners.conf (see runners.conf.example)
# Runner definitions live in runners.conf (INI format, see runners.conf.example)
# Use manage_runner.sh to add/remove runners at any time
# -----------------------------------------------------------------------------
RUNNER_DEFAULT_IMAGE=catthehacker/ubuntu:act-latest # Default container image for docker runners
RUNNER_DEFAULT_CAPACITY=1 # Default max concurrent jobs per runner (positive integer)
RUNNER_DEFAULT_DATA_PATH=/mnt/nvme/gitea-runner # Default data path for remote (docker) runners
LOCAL_RUNNER_DATA_PATH=~/gitea-runner # Data path for native macOS runner
LOCAL_REGISTRY= # Local registry prefix (e.g. registry.local:5000), empty = Docker Hub
# AUTO-POPULATED by phase1 scripts — do not fill manually:
GITEA_RUNNER_REGISTRATION_TOKEN= # Retrieved from Gitea admin panel via API