kb/subsystems/control-plane.md — status: deprecated, superseded_by: "przepisany tor redeploy, commity da151fc/79bfe8c 2026-08-03" kb/runbooks/control-plane-deploy-recovery.md — Deployment + Recovery Rozstrzygniecie 3: dokument NIE jest odswiezany, tylko oznaczony jako nieaktualny. Ostatnia zmiana tresci 2026-05-27, czyli przed przepisaniem toru redeployu. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1.6 KiB
1.6 KiB
| okf | type | visibility | status | updated | links | |
|---|---|---|---|---|---|---|
| 0.1 | runbook | private | active | 2026-05-27 |
|
Control-plane — deployment i recovery
Deployment
From SATURN (primary control node)
# Full deploy via SSH
./scripts/deploy/deploy-control-plane.sh --ssh
# Or manually:
ssh oskar@100.95.58.48 "cd ~/homelab-codex-ws && git pull origin master && cd services/control-plane && docker compose up -d --build --force-recreate"
Direct on VPS
cd ~/homelab-codex-ws/services/control-plane
docker compose up -d --build --force-recreate
deploy-local.sh also creates the required /opt/homelab/ directory structure and sets ownership to UID 1000 (requires sudo). If directories already exist, skip to the docker compose step directly.
Verification
# On VPS
docker ps --filter "name=control-plane"
curl -s http://localhost:18180/summary | python3 -m json.tool
Recovery
World state is stale or corrupt
# On VPS — delete checkpoint to force full replay
rm /opt/homelab/state/observer_checkpoint.json
docker restart control-plane-observer
Flood of pending actions after bootstrap
Check if node-agent is running and emitting service_healthy events on each node. Without service_healthy, the supervisor sees all services as missing and queues redeployments every cycle.
# Check node-agent on each node
ssh oskar@<node> "docker ps --filter name=node-agent && docker logs node-agent --tail 20"
Rebuild from scratch
ssh oskar@100.95.58.48 "cd ~/homelab-codex-ws/services/control-plane && docker compose up -d --build --force-recreate"