platform: OpenTofu/Ansible für Proxmox, CI, Makefile, Doku-Abgleich

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 00:54:23 +02:00
co-authored by Claude Opus 5.5
parent cb5a413169
commit f22eaa8449
27 changed files with 623 additions and 6 deletions
+26
View File
@@ -153,3 +153,29 @@ def test_llm_and_embedding_clients():
chat.chat("overflow", [])
with pytest.raises(EndpointError):
chat.chat("down", [])
def test_proxmox_site_consistent_with_registry_and_prometheus():
site = yaml.safe_load((REPO_ROOT / "sites/knaster/proxmox.yaml").read_text())
reg = yaml.safe_load((REPO_ROOT / "sites/knaster/registry.yaml").read_text())
vms = site["vms"]
for vm in vms.values():
assert vm["gpu"] in site["pci_mappings"]
assert site["pci_mappings"][vm["gpu"]]["node"] == vm["node"] # Mapping liegt auf dem Host der VM
assert vm["driver_generation"] in {"legacy", "modern"}
gpus = [vm["gpu"] for vm in vms.values()]
assert len(gpus) == len(set(gpus)) # keine GPU doppelt durchgereicht
by_vmid = {str(vm["vmid"]): (name, vm) for name, vm in vms.items()}
for slot, spec in reg["slots"].items():
ops = spec.get("ops")
if not ops:
continue
name, vm = by_vmid[ops["vmid"]]
assert vm["node"] == ops["pve_node"], slot
assert ops["docker_host"].startswith(name.split("-")[0]), slot
vmids = [str(v["vmid"]) for v in vms.values()] + [str(c["vmid"]) for c in site["containers"].values()]
assert len(vmids) == len(set(vmids))
# vLLM nur auf modernen Karten
for vm in vms.values():
if vm["role"] == "gpu-vllm":
assert vm["driver_generation"] == "modern"