docs,config: aggiorna AGENTS.md, config.example, HOST-SETUP.md, checklist faseA e fix vari orchestrator (workstation, build, job, wait, winrm, test)

This commit is contained in:
Simone
2026-05-17 00:14:04 +02:00
parent dc8449a0d7
commit e810747557
10 changed files with 135 additions and 52 deletions
+50 -31
View File
@@ -16,8 +16,8 @@ copiabili. Stop a primo errore: ogni passo è un gate per il successivo.
Il codice nuovo va installato nel venv che act_runner usa
(`F:\CI\python\venv\`).
- [ ] Aprire PowerShell **come amministratore** sull'host CI.
- [ ] Posizionarsi nella copia git aggiornata del repo (pull del branch
- [x] Aprire PowerShell **come amministratore** sull'host CI.
- [x] Posizionarsi nella copia git aggiornata del repo (pull del branch
`feature/python-rewrite-and-linux-migration`):
```powershell
@@ -27,13 +27,13 @@ Il codice nuovo va installato nel venv che act_runner usa
git pull
```
- [ ] Installare il package in editable nel venv di produzione:
- [x] Installare il package in editable nel venv di produzione:
```powershell
& 'F:\CI\python\venv\Scripts\python.exe' -m pip install -e .
```
- [ ] Smoke check rapido che la CLI risponda:
- [x] Smoke check rapido che la CLI risponda:
```powershell
& 'F:\CI\python\venv\Scripts\python.exe' -m ci_orchestrator --help
@@ -50,19 +50,19 @@ L'act_runner gira come servizio SYSTEM e legge `runner/config.yaml`
all'avvio. La modifica di A4 (`PYTHONIOENCODING=utf-8`) ha effetto solo
dopo restart.
- [ ] Trovare il servizio:
- [x] Trovare il servizio:
```powershell
Get-Service | Where-Object { $_.Name -like '*act*runner*' }
```
- [ ] Restart (sostituisci `<NomeServizio>` con quello trovato):
- [x] Restart (sostituisci `<NomeServizio>` con quello trovato):
```powershell
Restart-Service -Name '<NomeServizio>'
```
- [ ] Verificare che sia partito:
- [x] Verificare che sia partito:
```powershell
Get-Service -Name '<NomeServizio>'
@@ -76,7 +76,7 @@ dopo restart.
PoC pendente da A1.
- [ ] Clonare manualmente un template Windows:
- [x] Clonare manualmente un template Windows:
```powershell
& 'C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe' `
@@ -86,14 +86,14 @@ PoC pendente da A1.
linked -snapshot=BaseClean -cloneName=smoke-win
```
- [ ] Avviare la VM:
- [x] Avviare la VM:
```powershell
& 'C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe' `
-T ws start 'F:\CI\BuildVMs\smoke-win\smoke-win.vmx' nogui
```
- [ ] Eseguire `wait-ready`:
- [x] Eseguire `wait-ready`:
```powershell
& 'F:\CI\python\venv\Scripts\python.exe' -m ci_orchestrator wait-ready `
@@ -103,7 +103,7 @@ PoC pendente da A1.
Atteso: exit code `0` entro 3 minuti.
- [ ] Cleanup VM di smoke:
- [x] Cleanup VM di smoke:
```powershell
& 'F:\CI\python\venv\Scripts\python.exe' -m ci_orchestrator vm remove `
@@ -116,7 +116,7 @@ PoC pendente da A1.
Stesso schema, template Linux. PoC pendente da A1.
- [ ] Clonare:
- [x] Clonare:
```powershell
& 'C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe' `
@@ -126,7 +126,7 @@ Stesso schema, template Linux. PoC pendente da A1.
linked -snapshot=BaseClean-Linux -cloneName=smoke-linux
```
- [ ] Start + wait-ready:
- [x] Start + wait-ready:
```powershell
& 'C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe' `
@@ -139,7 +139,11 @@ Stesso schema, template Linux. PoC pendente da A1.
Atteso: exit code `0`.
- [ ] Cleanup:
> **Prerequisito scoperto**: `F:\CI\config.toml` deve esistere con `ssh_key_path`
> impostato — altrimenti SSH fallisce con `No authentication methods available`.
> Creato durante questa validazione; vedi HOST-SETUP.md step 6.
- [x] Cleanup:
```powershell
& 'F:\CI\python\venv\Scripts\python.exe' -m ci_orchestrator vm remove `
@@ -152,29 +156,44 @@ Stesso schema, template Linux. PoC pendente da A1.
Valida A3+A4 insieme: clone → wait → build → collect → cleanup.
- [ ] Lanciare un job sul template Windows con uno script trivial:
- [x] Lanciare un job sul template Windows con uno script trivial:
```powershell
& 'F:\CI\python\venv\Scripts\python.exe' -m ci_orchestrator job `
--template 'F:\CI\Templates\WinBuild2025\WinBuild2025.vmx' `
--snapshot BaseClean `
--name smoke-job-win `
--template-path 'F:\CI\Templates\WinBuild2025\WinBuild2025.vmx' `
--snapshot-name BaseClean `
--job-id smoke-job-win `
--repo-url 'http://10.10.20.11:3100/Simone/your-repo.git' `
--branch main `
--build-command 'echo hello > artifact.txt' `
--artifact-source 'C:\ci\workspace\artifact.txt' `
--artifact-dest 'F:\CI\Artifacts\smoke-job-win'
--guest-artifact-source 'C:\ci\workspace\artifact.txt' `
--artifact-base-dir 'F:\CI\Artifacts\smoke-job-win'
```
Atteso: exit code `0`, file `F:\CI\Artifacts\smoke-job-win\artifact.txt` presente,
VM smoke-job-win **non** più esistente in `F:\CI\BuildVMs\` (cleanup garantito).
- [ ] Ripetere su Linux (cambiare `--template`, `--snapshot`,
`--build-command 'echo hello > artifact.txt'`,
`--artifact-source '/opt/ci/build/artifact.txt'`).
- [ ] Verificare assenza VM orfane:
- [x] Ripetere su Linux:
```powershell
& 'F:\CI\python\venv\Scripts\python.exe' -m ci_orchestrator vm cleanup --dry-run
& 'F:\CI\python\venv\Scripts\python.exe' -m ci_orchestrator job `
--template-path 'F:\CI\Templates\LinuxBuild2404\LinuxBuild2404.vmx' `
--snapshot-name BaseClean-Linux `
--guest-os linux `
--job-id smoke-job-linux `
--repo-url 'http://10.10.20.11:3100/Simone/your-repo.git' `
--branch main `
--build-command 'echo hello > artifact.txt' `
--guest-artifact-source 'artifact.txt' `
--artifact-base-dir 'F:\CI\Artifacts\smoke-job-linux'
```
Atteso: exit code `0`, `F:\CI\Artifacts\smoke-job-linux\smoke-job-linux\artifact.txt` presente.
- [x] Verificare assenza VM orfane:
```powershell
& 'F:\CI\python\venv\Scripts\python.exe' -m ci_orchestrator vm cleanup --what-if
```
Atteso: nessun candidato.
@@ -260,11 +279,11 @@ Solo dopo che i passi 37 sono tutti `[x]` PASS.
| Passo | Descrizione | Stato |
| ----- | ----------------------------------------- | ----- |
| 1 | Aggiorna venv di produzione | [ ] |
| 2 | Restart act_runner | [ ] |
| 3 | Smoke `wait-ready` Windows | [ ] |
| 4 | Smoke `wait-ready` Linux | [ ] |
| 5 | Smoke `job` end-to-end (Win + Linux) | [ ] |
| 1 | Aggiorna venv di produzione | [x] |
| 2 | Restart act_runner | [x] |
| 3 | Smoke `wait-ready` Windows | [x] |
| 4 | Smoke `wait-ready` Linux | [x] |
| 5 | Smoke `job` end-to-end (Win + Linux) | [x] |
| 6 | Workflow Gitea (lint + self-test + build) | [ ] |
| 7 | Burn-in 4 job × 10 round | [ ] |
| 8 | Benchmark wall-clock | [ ] |