verae-ops/07-maintenance.md

45 lines
1.7 KiB
Markdown

# 7. Maintenance
## Health
| Check | Command |
|-------|---------|
| Edges | `curl -fsS https://zappier.example.com/health` and middleware `/health` |
| NATS | `curl -fsS http://127.0.0.1:8222/healthz` on each nats node (localhost) |
| Fleet | `node src/cli.js status` or http://127.0.0.1:3850/ (loopback) |
| Tree floor | status: tree-node available ≥ min, none of those paused |
Green / yellow / red on the operator console: https://zapier.georgelambert.org/packages/verae-fleet/docs/CONSOLE.pdf
## Restart
- systemd: `systemctl restart verae-middleware zappier-edge`
- Compose: `docker compose up -d --no-deps middleware`
- One replica: fleet `restart tree-node-1` (floor spawns a replacement if needed)
- Pause is **not** off — paused copies do not count toward `keepFloor`
## Backup
| Data | Where |
|------|--------|
| zappier SQLite | `ZAPPIER_DB` path / volume |
| worm / tree blobs | instance `data/` dirs |
| NATS JetStream | nats store dir |
| fleet overlay | `packages/verae-fleet/data/` (gitignored) |
Do not back up private keys into git. Restore `identityFile` paths on the operator host.
## Upgrade
1. `git pull` each independent repo (or refresh the monorepo snapshot).
2. `npm test` in that package.
3. Restart that unit only; NATS cluster stays up.
4. Zapier Platform app: `zapier-platform push` from `verae-zapier-app` when HTTPS contracts change.
## Logs
journald for systemd; `docker compose logs -f middleware nats1`. Redact API keys (middleware debug redaction).
## Docs
After doc edits: from the monorepo `npm run docs:site && npm run docs:deploy` so https://zapier.georgelambert.org/ stays current (PDF default, Markdown indexes at `/index-md.html`).