feat(deploy): (d) end-to-end .deb install on 89.163.205.6 grün

Box (Debian 13 Trixie, amd64): apt install ./edgeguard-{api,ui,meta}.deb
zieht postgresql-17, haproxy 3.0, certbot, openssl, etc. nach.
postinst flow läuft sauber: migrate check → initdb → migrate up
(8 migrations) → render-config → install HAProxy drop-in → restart
haproxy → enable api+scheduler. Self-register in ha_nodes nach
Setup-Wizard funktioniert.

End-to-end smoke gegen 89.163.205.6:
* :80  → 301 Moved Permanently → https://
* :443 → TLS termination (self-signed _default.pem aus postinst)
        → JSON envelope vom api_backend (HTTP/2 + HSTS)
* /    → React index.html aus /usr/share/edgeguard/ui/

Änderungen:
* control: keydb-server von Depends nach Recommends — single-node v1
  installiert ohne KeyDB. Phase-3.1 multi-node bringt es zurück nach
  Depends sobald ein eigenes APT-Repo das Paket bereitstellt.
* postinst: render-config (--no-reload) + HAProxy-Drop-in installen +
  systemctl restart haproxy als zusätzliche Schritte.
* postrm: drop-in auf remove + purge entfernen, daemon-reload, ggf.
  haproxy auf distro-default zurückreloaden.
* deploy/systemd/haproxy-edgeguard.conf: Drop-in lenkt HAProxy-Unit
  auf /etc/edgeguard/haproxy/haproxy.cfg statt /etc/haproxy/haproxy.cfg.
  After=edgeguard-api.service vermeidet 503-Race in den ersten 5s.
* scripts/apt-repo/build-package.sh: shippt Drop-in unter
  /etc/edgeguard/systemd/haproxy-edgeguard.conf in der edgeguard-api.deb.
* haproxy.cfg.tpl: http-request redirect vor use_backend → keine
  HAProxy-Warning beim Parsen mehr.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Debian
2026-05-09 14:02:14 +02:00
parent c7e5b28cf7
commit f0589e5628
6 changed files with 66 additions and 7 deletions

View File

@@ -0,0 +1,14 @@
# systemd drop-in: point distro HAProxy at the EdgeGuard-generated
# config without touching /etc/haproxy/haproxy.cfg (which is a
# conffile of the haproxy package). Installed by edgeguard-api's
# postinst into /etc/systemd/system/haproxy.service.d/edgeguard.conf.
[Unit]
# api_backend points at edgeguard-api on 127.0.0.1:9443 — wait for
# it to be up before starting, otherwise HAProxy 503s for ~5s while
# its L4 health-check polls.
After=edgeguard-api.service
Wants=edgeguard-api.service
[Service]
ExecStart=
ExecStart=/usr/sbin/haproxy -Ws -f /etc/edgeguard/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock