homelab-codex-ws/jobs/deploy-runner/env.example
oskar da151fc8d3 fix(control-plane): redeploy wykonywalny — dispatch do host-side deploy-runnera
Executor odpalal scripts/deploy/deploy-node.sh <node> <service> wewnatrz
swojego kontenera: skrypt ignoruje oba argumenty i wymaga repo w
${HOME}/homelab-codex-ws (w kontenerze HOME=/home/homelab) -> exit 1 w 18.
linii. Za tym brak git, brak klienta docker w obrazie, a gdyby przeszedl —
deploy calego zestawu uslug hosta executora zamiast wezla z akcji. Kazdy
redeploy padal (recon D14/D15; 18 pending / 0 completed).

Redeploy idzie teraz ta sama sciezka pull co container_restart — VPS nigdy
nie inicjuje polaczenia do wezla:
  executor -> actions/deploy/<node>/<id>.json
  -> deploy-runner (systemd na hoscie) rsync-pull, walidacja, deploy
  -> action_result event -> executor rozlicza completed/failed

- scripts/deploy/deploy-service.sh: deploy jednej uslugi, wspoldzielony z
  deploy-node.sh, wiec inwokacja compose (a przez to nazwa projektu) jest
  identyczna jak przy deployu recznym
- jobs/deploy-runner/: host-level, nie kontener — compose rozwiazuje
  wzgledne bindy i nazwe projektu tak jak przy deployu czlowieka;
  niezalezny od node-agenta, wiec potrafi zredeployowac takze jego
- walidacja: tylko typ redeploy, node musi sie zgadzac, usluga musi byc w
  hosts/<node>/services.yaml, zadna tresc z payloadu nie trafia do shella
- --force-recreate bez --build i bez --remove-orphans: redeploy to
  rekoncyliacja, nie wysylka kodu
- executor: REDEPLOY_TIMEOUT_SECS=900, /repo zjechany do :ro (nieuzywany)

248 testow zielonych; deploy-node.sh przecwiczony na atrapie dockera —
argv compose bez zmian. Instalacja unitow na wezlach i E2E: backlog.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 18:26:30 +02:00

30 lines
1.3 KiB
Plaintext

# deploy-runner runtime config — copy to /opt/homelab/config/deploy-runner/env
# on each node and fill in. Read by homelab-deploy-runner.service
# (EnvironmentFile), so: KEY=value, no quotes, no shell expansion.
# Canonical topology node name — MUST match hosts/<node>/ and the `node` field
# in dispatched actions. Not the OS hostname.
NODE_NAME=piha
# Repo checkout on this node (the runner never pulls it; deploys what is there).
REPO_PATH=/home/oskar/homelab-codex-ws
RUNTIME_PATH=/opt/homelab
# VPS Tailscale IP — where the control plane writes dispatched actions and
# expects result events. LEAVE EMPTY ON THE VPS ITSELF: there the executor
# writes into the same /opt/homelab mount and no rsync hop is needed.
VPS_EVENTS_HOST=100.95.58.48
VPS_EVENTS_USER=oskar
VPS_EVENTS_PATH=/opt/homelab/events
VPS_DEPLOY_PATH=/opt/homelab/actions/deploy
# Per-action wall-clock ceiling. Must stay below the executor's
# REDEPLOY_TIMEOUT_SECS (default 900) so a stuck deploy is reported by the node
# rather than silently timed out by the control plane.
DEPLOY_TIMEOUT_SECS=600
# Optional: explicit ssh key for the rsync channel. Omit when the service user's
# default key (~/.ssh/id_*) already reaches the VPS — same key node-agent uses.
# SSH_KEY=/home/oskar/.ssh/id_ed25519