[claude] Sovereign Deployment Runbook — Repeatable, Documented Service Deployment (#146) #161
Reference in New Issue
Block a user
Delete Branch "claude/issue-146"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #146
What this PR delivers
Full implementation of the Bezalel Epic-002 deployment suite. A bare VPS running Ubuntu can go from nothing to a running Hermes instance using only
DEPLOY.md.New files
deploy/docker-compose.yml— Production-ready Compose stack with healthcheck, named volume, resource limits (2 GB RAM / 1.5 CPU), and log rotation.deploy/docker-compose.override.yml.example— Template for local dev overrides without polluting the main compose file.deploy/hermes-agent.service— systemd unit for headless CLI agent with security hardening (NoNewPrivileges,ProtectSystem,PrivateTmp).deploy/hermes-gateway.service— systemd unit for the messaging gateway with pre/post hooks that write deploy audit log entries.scripts/deploy-validate— Executable dry-run validator that checks: .env presence and placeholders, at least one LLM key, HERMES_HOME layout, gateway runtime state (viagateway_state.json), port availability, and git secret hygiene. Exit code 1 on blocking errors.DEPLOY.md— 15-section deployment runbook covering environment setup, secret injection, start/stop, zero-downtime restart (systemd reload + blue/green), rollback with data backup, Docker Compose updates, systemd install, monitoring, security checklist, and troubleshooting.Modified files
gateway/platforms/api_server.py— Enhanced/healthendpoint to returnversion,uptime_seconds,gateway_state, and per-platform connection states sourced fromgateway_state.json. Added_start_timetracking to__init__.Success criteria met
/healthreturns meaningful status (gateway state + per-platform)..gitignorealready covers.env;deploy-validateenforces this.scripts/deploy-validatecatches config errors before go-live.