Files
sentryagent-idp/docs/devops
SentryAgent.ai Developer 6913d62648 feat(phase-2): workstream 8 — Multi-Region Terraform Deployment
AWS environment:
- VPC (3-AZ, public + private subnets, NAT gateways, VPC endpoints for ECR/SM/CW)
- ECS Fargate service (sentryagent/agentidp) — secrets from Secrets Manager
- RDS PostgreSQL 14 (Multi-AZ, encrypted, VPC-internal, storage autoscaling)
- ElastiCache Redis 7 (primary + replica, at-rest + in-transit encryption)
- ALB with HTTPS/443, HTTP→HTTPS redirect, ACM certificate
- Route 53 alias record

GCP environment:
- VPC + private services access + Serverless VPC connector
- Cloud Run service — secrets from Secret Manager
- Cloud SQL PostgreSQL 14 (private IP, no public endpoint)
- Cloud Memorystore Redis 7 (VPC-internal, AUTH enabled)

Shared:
- 4 reusable modules: agentidp (dual AWS/GCP), rds, redis, lb
- No hardcoded secrets; all sensitive vars marked sensitive=true
- terraform.tfvars.example for both environments
- docs/devops/deployment.md — AWS + GCP step-by-step walkthrough, rollback procedures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 06:25:14 +00:00
..

SentryAgent.ai AgentIdP — DevOps Documentation

Operational reference for engineers who deploy, configure, and maintain the AgentIdP infrastructure.

System Overview

SentryAgent.ai AgentIdP is a Node.js REST API backed by PostgreSQL and Redis. It runs as a single stateless application process. All state lives in PostgreSQL (durable) and Redis (ephemeral cache and rate limiting).

Stack:

  • Runtime: Node.js 18+ (TypeScript, compiled to JS)
  • Application: Express 4.18 on port 3000
  • Database: PostgreSQL 14+ (primary data store)
  • Cache: Redis 7+ (token revocation, rate limiting, monthly token counters)

Documentation

Document What it covers
Architecture Components, ports, data flow, Redis key patterns
Environment Variables Every env var — required, optional, format, examples
Database Schema (4 tables), migrations, how to apply and verify
Local Development docker-compose setup, startup, health checks
Security JWT key generation and rotation, CORS, secret storage
Operations Startup order, graceful shutdown, log interpretation, troubleshooting

Quick Reference — Ports

Service Port
AgentIdP app 3000
PostgreSQL 5432
Redis 6379

Quick Reference — npm Scripts

Script Purpose
npm run dev Run from TypeScript source (development)
npm run build Compile TypeScript to dist/
npm start Run compiled output from dist/ (production)
npm run db:migrate Apply pending database migrations
npm test Run all tests
npm run test:unit Unit tests only

Developer Documentation

For API usage (registering agents, getting tokens, calling endpoints) — see docs/developers/.