Newer
Older
gnexus-book / 10-systems / applications / gnexus-book.md
@Eugene Sukhodolskiy Eugene Sukhodolskiy 4 days ago 3 KB docs: add operations and decommission runbooks

owner: gmikcon status: active last_reviewed: 2026-11-19 review_interval: 30d confidence: high

source_of_truth: repository

Gnexus Book

Gnexus Book is the canonical infrastructure knowledge base and maintenance API for the personal digital and server infrastructure.

Access

  • UI and REST: gnexus-auth SSO when authentication is configured; otherwise the local-development installation runs open.
  • Agents: personal mcp_* keys over streamable HTTP at /mcp-protocol/.
  • Service-to-service key provisioning: /internal/keys, protected by a service secret, not exposed through nginx.
  • Secrets are references only; no raw credentials are documented here.

Repository and storage

  • Local path: /home/gmikcon/Projects/gnexus-book.
  • Canonical store: PostgreSQL (gnexus_book), with immutable document and inventory versions grouped into changesets.
  • Git remains the code repository and the rollback source until the file backend is decommissioned.

Runtime components

  • Backend: FastAPI under server/.
  • MCP: server/app/mcp_http.py, streamable HTTP at /mcp-protocol/.
  • UI: Vue/Vite under ui/, using gnexus-ui-kit.
  • Auth: gnexus-auth SSO plus per-user service keys.

Local endpoints

  • Backend API: http://127.0.0.1:3005/.
  • API docs: http://127.0.0.1:3005/api-docs.
  • UI: http://127.0.0.1:3006/.
  • MCP: http://127.0.0.1:8001/mcp-protocol/.

Production URLs and the public MCP hostname are set at deployment.

Deployment

  • scripts/install.sh installs dependencies and user units.
  • scripts/deploy.sh pulls, builds, applies database migrations when the db backend is active, refreshes units and restarts backend, MCP and frontend.
  • Runtime configuration: server/.env (chmod 600, gitignored) and gnexus-creds.
  • systemd user units: backend, frontend, MCP, daily backup, optional monthly restore drill.

Backups and recovery

  • Daily off-host pg_dump through gnexus-book-backup.timer; retention is configured by GNEXUS_BOOK_BACKUP_KEEP.
  • Restore procedure and periodic drill: 30-runbooks/postgres-operations.md.
  • Backup failures and failed health probes alert through Gnexus Synapse when a syn_* source key is configured.

Monitoring

  • GET /health follows the platform contract (status, checks.db, service, version, timestamp); it is public and contains no personal data.
  • hard-panel probes the same endpoint; alerts are routed through Synapse.
  • Local check: scripts/healthcheck.sh.

Maintenance model

Agents should prefer structured inventory changes, validation, draft changesets and apply/publish through the maintenance API or MCP. For MCP rules see ../../90-maintenance/agent-mcp-usage.md.

The PostgreSQL cutover is complete locally. Production cutover and the removal of the file write path remain separate deployment actions; see ../../30-runbooks/cutover-postgres.md and ../../30-runbooks/decommission-file-backend.md.