robco-forge

RobCo Forge - Deployment Checklist

Pre-Deployment Verification

Code Quality Checks

Testing Status

Documentation Review

Environment Setup

AWS Account Prerequisites

External Services

Development Tools

Phase 1: Infrastructure Deployment (Staging)

1.1 Terraform Infrastructure

cd terraform/environments/staging
terraform init
terraform plan -out=tfplan
terraform apply tfplan

Verify:

Capture Outputs:

1.2 Kubernetes Resources (CDK)

cd cdk
npm install
cdk deploy --all --require-approval never

Verify:

1.3 Secrets Configuration

# Database credentials
aws secretsmanager create-secret \
  --name forge/staging/database \
  --secret-string '{"username":"forge","password":"CHANGE_ME"}'

# Anthropic API key
aws secretsmanager create-secret \
  --name forge/staging/anthropic \
  --secret-string '{"api_key":"CHANGE_ME"}'

# Okta SSO credentials
aws secretsmanager create-secret \
  --name forge/staging/okta \
  --secret-string '{"client_id":"CHANGE_ME","client_secret":"CHANGE_ME","domain":"CHANGE_ME"}'

# JWT secret
aws secretsmanager create-secret \
  --name forge/staging/jwt \
  --secret-string '{"secret":"CHANGE_ME"}'

Verify:

Phase 2: Database Setup

2.1 Database Migrations

cd api
pip install -r requirements.txt

export DATABASE_URL="postgresql://forge:PASSWORD@RDS_ENDPOINT:5432/forge"
alembic upgrade head

Verify:

2.2 Initial Data

# Create admin user
python scripts/create_admin_user.py

# Create default blueprints
python scripts/create_default_blueprints.py

Verify:

Phase 3: API Services Deployment

3.1 Build and Push Docker Images

cd api

# Build image
docker build -t forge-api:v1.0.0 .

# Tag and push to ECR
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com
docker tag forge-api:v1.0.0 ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/forge-api:v1.0.0
docker push ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/forge-api:v1.0.0

Verify:

3.2 Deploy to Kubernetes

# Update image tag in manifests
kubectl apply -f k8s/api-deployment.yaml
kubectl apply -f k8s/api-service.yaml
kubectl apply -f k8s/api-ingress.yaml

# Wait for rollout
kubectl rollout status deployment/forge-api -n forge-api

Verify:

3.3 Test API Endpoints

# Get load balancer URL
kubectl get ingress -n forge-api

# Test health endpoint
curl https://api.forge.staging.example.com/health

# Test OpenAPI docs
curl https://api.forge.staging.example.com/docs

Verify:

Phase 4: CLI Deployment

4.1 Build CLI

cd cli
npm install
npm run build
npm pack

Verify:

4.2 Test CLI Locally

npm install -g ./forge-cli-1.0.0.tgz

forge config set api-url https://api.forge.staging.example.com
forge config set auth-method okta

# Test login
forge login

# Test workspace list
forge list

Verify:

Phase 5: Portal Deployment

5.1 Build Portal

cd portal
npm install

# Set environment variables
cat > .env.production << EOF
NEXT_PUBLIC_API_URL=https://api.forge.staging.example.com
NEXT_PUBLIC_WS_URL=wss://api.forge.staging.example.com/ws
EOF

npm run build

Verify:

5.2 Deploy Portal (Choose One)

npm install -g vercel
vercel --prod

Option B: Docker + Kubernetes

docker build -t forge-portal:v1.0.0 .
docker tag forge-portal:v1.0.0 ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/forge-portal:v1.0.0
docker push ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/forge-portal:v1.0.0

kubectl apply -f k8s/portal-deployment.yaml
kubectl apply -f k8s/portal-service.yaml
kubectl apply -f k8s/portal-ingress.yaml

Option C: Static Export to S3 + CloudFront

npm run build
npm run export

aws s3 sync out/ s3://forge-portal-staging/
aws cloudfront create-invalidation --distribution-id DIST_ID --paths "/*"

Verify:

Phase 6: Integration Testing

6.1 End-to-End Smoke Tests

Test 1: User Authentication

Test 2: WorkSpace Provisioning (Portal)

Test 3: WorkSpace Provisioning (CLI)

forge launch --bundle STANDARD --os Windows --blueprint default
forge list
forge describe WORKSPACE_ID

Test 4: Lucy AI Chat

Test 5: Cost Dashboard

Test 6: Budget Enforcement

Test 7: Theme Switching

Test 8: Accessibility

6.2 Performance Testing

# Test API response time
curl -w "@curl-format.txt" -o /dev/null -s https://api.forge.staging.example.com/api/v1/workspaces

# Expected: < 500ms

Verify:

6.3 Security Testing

Basic Security Checks:

Phase 7: Monitoring Setup

7.1 Verify Monitoring Stack

# Check Prometheus
kubectl port-forward -n forge-system svc/prometheus 9090:9090
# Open http://localhost:9090

# Check Grafana
kubectl port-forward -n forge-system svc/grafana 3000:3000
# Open http://localhost:3000

Verify:

7.2 Test Alerting

# Trigger test alert
aws cloudwatch put-metric-data \
  --namespace Forge/API \
  --metric-name ErrorRate \
  --value 10 \
  --unit Percent

Verify:

Phase 8: Production Deployment

8.1 Production Readiness Review

8.2 Production Infrastructure

cd terraform/environments/production
terraform init
terraform plan -out=tfplan
# Review plan carefully
terraform apply tfplan

8.3 Production Secrets

# Use strong, unique passwords for production
aws secretsmanager create-secret --name forge/production/database --secret-string '...'
aws secretsmanager create-secret --name forge/production/anthropic --secret-string '...'
aws secretsmanager create-secret --name forge/production/okta --secret-string '...'
aws secretsmanager create-secret --name forge/production/jwt --secret-string '...'

8.4 Production Database

cd api
export DATABASE_URL="postgresql://forge:PASSWORD@PROD_RDS_ENDPOINT:5432/forge"
alembic upgrade head
python scripts/create_admin_user.py
python scripts/create_default_blueprints.py

8.5 Production API Deployment

# Build and push production image
docker build -t forge-api:v1.0.0 .
docker tag forge-api:v1.0.0 ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/forge-api:v1.0.0-prod
docker push ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/forge-api:v1.0.0-prod

# Deploy with blue/green strategy
kubectl apply -f k8s/production/api-deployment.yaml
kubectl rollout status deployment/forge-api -n forge-api

8.6 Production Portal Deployment

cd portal
cat > .env.production << EOF
NEXT_PUBLIC_API_URL=https://api.forge.example.com
NEXT_PUBLIC_WS_URL=wss://api.forge.example.com/ws
EOF

npm run build
vercel --prod

8.7 Production Smoke Tests

8.8 24-Hour Monitoring Period

Phase 9: User Onboarding

9.1 Create Initial Users

# Import users from CSV
python scripts/create_users.py --csv users.csv

# Assign roles
python scripts/assign_roles.py --user alice@example.com --role team_lead
python scripts/assign_roles.py --user bob@example.com --role engineer

9.2 Set Budgets

# Set team budgets
python scripts/set_budgets.py --team engineering --amount 10000
python scripts/set_budgets.py --team data-science --amount 15000

# Set user budgets
python scripts/set_budgets.py --user alice@example.com --amount 2000

9.3 User Training

Post-Deployment

Ongoing Monitoring

Maintenance Schedule

Rollback Procedures

API Rollback

kubectl rollout undo deployment/forge-api -n forge-api
kubectl rollout status deployment/forge-api -n forge-api

Portal Rollback

vercel rollback
# Or for Kubernetes:
kubectl rollout undo deployment/forge-portal -n forge-portal

Database Rollback

cd api
alembic downgrade -1

Infrastructure Rollback

cd terraform/environments/production
terraform plan -destroy -out=tfplan
# Review carefully before applying

Success Criteria

Deployment is considered successful when:

Support Contacts

Notes


Deployment Date: _____ **Deployed By**: _________ Environment: [ ] Staging [ ] Production Version: v1.0.0 Status: [ ] In Progress [ ] Complete [ ] Rolled Back