Skip to content

Latest commit

 

History

History
127 lines (97 loc) · 4.83 KB

PRODUCTION.md

File metadata and controls

127 lines (97 loc) · 4.83 KB

Production runbook (SMB / edge)

Use this checklist before calling Leba production-ready for a site.

Baseline (0.15+)

Item Check
Mako ≥ 0.5.1 (verified on 0.5.2); see MAKO.md
Build make build → release binary on c by default (native compiles but still crashes at runtime on 0.5.2); mimalloc when available
Version leba version ≥ 0.15.0
Doctor leba doctor /etc/leba/leba.conf → 0 errors
Auth Hashed admin users; no demo passwords
Session state_key or LEBA_SESSION_SECRET set
Admin plane Not on public VIP; private NIC / firewall
TLS Valid PEMs on both HA nodes; or native Let's Encrypt (acme_email, acme_webroot on :80, leba-acme-renew.timer)
Unit + e2e gate make test-full green (units, concurrent, adversarial, assets)
Soak make test-soak green in CI or pre-flight (make test-ci runs both)
Concurrent make test-concurrent green (GET/KA/POST/OPTIONS waves)
Peers (if used) make test-ha-peers green; multi-hour VIP soak still site-specific
Perf baseline Optional: make bench-nginx → record in docs/SCORECARD.md
Metrics Scrape /metrics (auth required when configured)
Browser apps If SPA uses credentialed CORS, set LEBA_CORS_ORIGIN to the exact UI origin

Note: Prefer process supervisor (systemd Restart=) and practice reload on the backup node before VIP move. Re-run make test-soak on your Mako toolchain before cutover.

Install paths

Method Notes
Linux package layout deploy/linux/ systemd unit + env
Docker Image from GHCR; see compose under deploy/docker/ and deploy/ha/
Binary GitHub Releases: checksums + optional SBOM

Let's Encrypt (day-0)

# 1. Real email in /etc/leba/leba.conf (or LEBA_ACME_EMAIL)
# 2. Port 80 public and routed to acme_webroot
# 3. Optional: test staging first
curl -su admin:… -X POST \
  'http://127.0.0.1:18404/admin/certificates/issue?domain=app.example.com&frontend=web&staging=1&attach=1'
# 4. Production issue (or Proxy Hosts -> Request SSL)
curl -su admin:… -X POST \
  'http://127.0.0.1:18404/admin/proxy-host?frontend=web&domain=app.example.com&backend=app&server=s1&addr=10.0.20.11:8080&ssl=1&force_ssl=1'
# 5. Daily renew
systemctl enable --now leba-acme-renew.timer

Day-2 operations

# Config health before apply
curl -su admin:… https://admin:8404/admin/preview-reload -X POST

# Full config apply (rebinds listeners)
curl -su admin:… -X POST https://admin:8404/admin/reload

# Live TLS (TCP/TLS + H3 recreate when cert paths change)
curl -su admin:… -X POST https://admin:8404/admin/tls-reload

# Stick tables
curl -su admin:… https://admin:8404/admin/stick-tables

TLS / H3 cert reload

Surface Behavior on /admin/tls-reload
TCP TLS (HTTP/1–2) In-place tls_server_reload + SNI sync
HTTP/3 Recreate H3 listener when cert/key paths change
API fields tcp_tls_reloaded, h3_strategy, h3_recreate, h3_restart_required

h3_restart_required is false when Leba can recreate H3 listeners in-process; full process restart is only needed if the linked Mako/quiche build cannot open H3.

HA

See HA.md and deploy/ha/README.md.

  • VIP with keepalived + readyz
  • Optional stick peers (make test-ha-peers green: HELLO, proxy, UPSERT sync, reconnect; multi-hour VIP soak still required before production HA)
  • Practice reload on backup before VIP move

Limits

See LIMITS.md for body size and streaming honesty.

Supply chain

Release artifacts (when published via CI):

  • Multi-arch container images (linux/amd64, linux/arm64) on GHCR
  • Binary checksums (SHA256SUMS)
  • CycloneDX SBOM (sbom.cdx.json)
  • Sigstore cosign keyless signature bundle (leba-linux-amd64.cosign.bundle)
  • Container image signed with the same GitHub OIDC identity (when image push succeeds)

Verify binary:

gh release download v0.15.0 -p 'leba-linux-amd64' -p 'SHA256SUMS' -p 'leba-linux-amd64.cosign.bundle'
sha256sum -c SHA256SUMS
cosign verify-blob \
  --bundle leba-linux-amd64.cosign.bundle \
  --certificate-identity-regexp 'https://github.com/loreste/leba/.*' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  leba-linux-amd64

Verify container (example):

cosign verify \
  --certificate-identity-regexp 'https://github.com/loreste/leba/.*' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/loreste/leba:0.15.0

Do not claim yet

  • “HAProxy Enterprise replacement” without H1–H4 + soak + support story
  • Unlimited streaming reverse proxy
  • Peers production without a signed multi-hour VIP soak report (local make test-ha-peers is necessary but not sufficient)