Phase A1: bootstrap Python ci_orchestrator package
- pyproject.toml (hatchling) with ruff/mypy/pytest dev deps - src/ci_orchestrator/: config, credentials, backends (Protocol + WorkstationVmrunBackend), transport (WinRM via pypsrp, SSH via paramiko) - CLI entry point with PoC 'wait-ready' subcommand (Windows + Linux guests) - tests/python/: 35 unit tests, 83% coverage, all backends/transport mocked - gitea/workflows/lint.yml: new 'python' job (ruff + mypy --strict + pytest --cov-fail-under=70) - config.example.toml + README setup section + .gitignore Python entries Neutral VmBackend Protocol prepared for Phase C ESXi extension. See plans/implementation-plan-A-B.md step A1.
This commit is contained in:
@@ -146,6 +146,40 @@ Variante **Windows Server 2022**: `*WinBuild2022.ps1` + VMX `F:\CI\Templates\Win
|
||||
|
||||
---
|
||||
|
||||
## Python orchestrator (Phase A — in progress)
|
||||
|
||||
A new Python 3.11+ rewrite of the orchestrator lives under `src/ci_orchestrator/`.
|
||||
Phase A (see [implementation-plan-A-B](plans/implementation-plan-A-B.md)) is on
|
||||
branch `feature/python-rewrite-phase-a`.
|
||||
|
||||
Quick setup on the Windows host:
|
||||
|
||||
```powershell
|
||||
# Create venv (one-time)
|
||||
python -m venv F:\CI\python\venv
|
||||
F:\CI\python\venv\Scripts\python.exe -m pip install --upgrade pip
|
||||
F:\CI\python\venv\Scripts\python.exe -m pip install -e ".[dev]"
|
||||
|
||||
# Sanity checks
|
||||
F:\CI\python\venv\Scripts\python.exe -m ci_orchestrator --help
|
||||
F:\CI\python\venv\Scripts\python.exe -m pytest tests\python -q
|
||||
F:\CI\python\venv\Scripts\python.exe -m ruff check src tests\python
|
||||
F:\CI\python\venv\Scripts\python.exe -m mypy --strict src
|
||||
```
|
||||
|
||||
Configuration: copy `config.example.toml` to `F:\CI\config.toml` (or set
|
||||
`$env:CI_CONFIG`). Environment variables (`CI_ROOT`, `CI_TEMPLATES`, …) override
|
||||
the file.
|
||||
|
||||
In Phase A1 only the `wait-ready` PoC is wired:
|
||||
|
||||
```powershell
|
||||
F:\CI\python\venv\Scripts\python.exe -m ci_orchestrator wait-ready `
|
||||
--vmx F:\CI\BuildVMs\smoke\smoke.vmx --guest-os windows --timeout 300
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Setup rapido
|
||||
|
||||
### 1a. Template VM Windows
|
||||
|
||||
Reference in New Issue
Block a user