bbd376f057
B1: Linux Mint + VMware Workstation + setup-host-linux.sh (Python 3.12 note)
B2: rsync template transfer, VMX registration, smoke tests; keyrings.alt choice
B3: SSH key perms, BuildVMGuest + GiteaPAT via PlaintextKeyring (D-Bus-free)
B4: act-runner.service, config.yaml labels/envs fix, smoke job PASS
B5: rewritten — Python-only timers (no pwsh), 7z compression, --service-name
act-runner fix, prerequisite dirs, root service for backup
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
66 lines
3.1 KiB
Markdown
66 lines
3.1 KiB
Markdown
# B4 — Closeout
|
|
|
|
Passo B4 di `plans/PhaseB-user-checklist.md`: act_runner Linux
|
|
registrato verso Gitea e gestito da systemd.
|
|
|
|
## Stato
|
|
|
|
✅ **COMPLETATO** — `act-runner.service` attivo, runner registrato,
|
|
`config.yaml` corretto, smoke job PASS.
|
|
|
|
## Cosa è stato fatto
|
|
|
|
- [x] Binario act_runner Linux v1.0.4 scaricato in `/opt/ci/act_runner/`
|
|
con permessi `ci-runner`.
|
|
- [x] Runner registrato verso `https://gitea.emulab.it` con nome
|
|
`ci-linux` e label `windows-build:host`, `linux-build:host`.
|
|
- [x] `/etc/systemd/system/act-runner.service` creato con:
|
|
- `User=ci-runner`, `WorkingDirectory=/var/lib/ci/runner`
|
|
- Variabili d'ambiente CI (`CI_ROOT`, `CI_TEMPLATES`, `CI_BUILD_VMS`,
|
|
`CI_ARTIFACTS`, `CI_KEYS`, `PYTHONIOENCODING`)
|
|
- `ExecStart=/opt/ci/act_runner/act_runner daemon --config /var/lib/ci/runner/config.yaml`
|
|
- `Restart=on-failure`, `RestartSec=10`
|
|
- [x] `/etc/ci/environment` creato con le stesse variabili CI (usato dai
|
|
timer systemd di B5).
|
|
- [x] `config.yaml` generato con `generate-config` e poi patchato via
|
|
`sed` per:
|
|
- Rimuovere i label `ubuntu-*:docker://` generati di default e
|
|
impostare `windows-build:host` + `linux-build:host`
|
|
- Sostituire le variabili placeholder `A_TEST_ENV_NAME_*` con:
|
|
- `CI_PYTHON_LAUNCHER: /opt/ci/venv/bin/python`
|
|
- `GITEA_CI_TEMPLATE_PATH: /var/lib/ci/templates/WinBuild2025/WinBuild2025.vmx`
|
|
- `GITEA_CI_LINUX_TEMPLATE_PATH: /var/lib/ci/templates/LinuxBuild2404/LinuxBuild2404.vmx`
|
|
- [x] `act-runner.service` abilitato e avviato; log confermano connessione
|
|
Gitea senza errori Docker.
|
|
- [x] Smoke job `self-test.yml` triggerato manualmente → PASS dal runner
|
|
Linux.
|
|
|
|
## Deviazioni / gotcha
|
|
|
|
- **Nome servizio `act-runner` (non `act_runner`)**: il binario Linux
|
|
si registra come `act-runner.service` (trattino), mentre su Windows
|
|
il servizio si chiama `act_runner` (underscore). Questa differenza ha
|
|
causato un bug nel comando `monitor runner`, che usava `act_runner` come
|
|
default — corretto aggiungendo `--service-name act-runner` nell'`ExecStart`
|
|
di `ci-watch-runner-health.service`.
|
|
- **`generate-config` scrive label Docker**: `act_runner generate-config`
|
|
produce label `ubuntu-latest:docker://...` che fanno cercare Docker (non
|
|
installato). È necessario patchare il file con `sed` dopo la generazione.
|
|
Le istruzioni sono nel Passo 4 del checklist B.
|
|
- **`GITEA_CI_TEMPLATE_PATH` nel service unit prima dello smoke test**:
|
|
se le variabili template non sono presenti in `config.yaml` o nel service
|
|
unit, il job fallisce con `"Got unexpected extra argument"` (i path non
|
|
vengono passati al CLI Python). Prerequisito obbligatorio prima di
|
|
trigggerare lo smoke job.
|
|
- **`config.yaml` separato da `.runner`**: il file `.runner` contiene il
|
|
token di registrazione (non toccare). `config.yaml` contiene solo la
|
|
configurazione operativa del runner.
|
|
|
|
## Riferimenti commit
|
|
|
|
- `536fd68` — feat: update runner configuration steps and add config.yaml
|
|
generation instructions
|
|
- `a6aa926` — fix: improve Python interpreter resolution for OS compatibility
|
|
- `b2803c3` — fix: correct order of arguments for template path in local
|
|
CI build action
|