feat: Authentik login + switchable GPU prod target

Add OIDC auth for Command Center and runtime GPU endpoint selection
pointed at atc-gpu-prod (10.0.10.106), matching what is currently deployed.
This commit is contained in:
mo
2026-07-21 23:20:24 +00:00
parent f36c8906bc
commit 9008fbd512
31 changed files with 4667 additions and 139 deletions
+14 -3
View File
@@ -537,13 +537,24 @@ def _build_architecture(
1, 1, "📓",
)
gpu_ok = bool(gpu.get("ok"))
try:
from gpu_config import resolve_gpu_identity
gpu_id = resolve_gpu_identity(gpu)
except Exception:
host = gpu.get("ip") or gpu.get("host") or "10.0.10.106"
gpu_id = {"vm": "atc-gpu-prod", "ip": host}
ml = _arch_node(
"cons-ml", "ML / GenAI", "vLLM cluster", C_CON, 70, "#bc8cff", "consumers",
"ok" if gpu_ok else "warn", "atc-gpu-dev", "10.0.20.106",
"ok" if gpu_ok else "warn", gpu_id["vm"], gpu_id["ip"],
[gpu.get("active_model") or "offline"],
[{"name": gpu.get("active_model") or "vllm", "state": "running" if gpu.get("inference_active") else "down", "image": "vllm", "ports": ["8001"]}],
[{"name": gpu.get("active_model") or "vllm", "state": "running" if gpu.get("inference_active") else "down", "image": "vllm", "ports": ["8001", "9000"]}],
gpu.get("gpu_count", 0) or 0, max(gpu.get("gpu_count", 4) or 4, 1), "🤖",
{"model": gpu.get("active_model"), "util": round(sum(g.get("util_gpu", 0) for g in gpu.get("gpus", [])) / max(len(gpu.get("gpus", [])), 1), 1)},
{"model": gpu.get("active_model"), "util": round(sum(g.get("util_gpu", 0) for g in gpu.get("gpus", [])) / max(len(gpu.get("gpus", [])), 1), 1),
"ui_url": gpu_id.get("ui_url"), "vllm_url": gpu_id.get("llm_url"),
"links": [
{"label": "GPU Lab UI", "url": gpu_id.get("ui_url") or f"http://{gpu_id['ip']}:9000"},
{"label": "vLLM API", "url": gpu_id.get("llm_url") or f"http://{gpu_id['ip']}:8001/v1"},
]},
)
nodes = [