- Organized 252 files across project - Root directory: 187 → 2 files (98.9% reduction) - Moved configuration guides to docs/04-configuration/ - Moved troubleshooting guides to docs/09-troubleshooting/ - Moved quick start guides to docs/01-getting-started/ - Moved reports to reports/ directory - Archived temporary files - Generated comprehensive reports and documentation - Created maintenance scripts and guides All files organized according to established standards.
11 KiB
DBIS Services - Complete Task List
Date: 2026-01-02
Status: ⏳ PENDING IMPLEMENTATION
Overview
This document lists all tasks required to bring all DBIS services to full operational status after IP address changes.
✅ Completed Tasks
- ✅ All container IP addresses updated
- ✅ DATABASE_URL updated in API containers (VMIDs 10150, 10151)
- ✅ Nginx configuration updated (VMID 10130)
- ✅ Comprehensive service status check completed
Priority 1: Database Services (Foundation)
PostgreSQL Primary (VMID 10100)
Container IP: 192.168.11.105/24
Status: Container running, PostgreSQL not installed
Installation Tasks
-
Task 1.1: Install PostgreSQL 15
- Update package repository
- Install
postgresql-15andpostgresql-contrib-15 - Verify installation
-
Task 1.2: Initialize PostgreSQL database
- Run
postgresql-setupor manual initialization - Set data directory (
/var/lib/postgresql/15/main) - Configure authentication
- Run
-
Task 1.3: Configure PostgreSQL
- Edit
/etc/postgresql/15/main/postgresql.conf- Set
listen_addresses = '*'or specific IP - Configure port (5432)
- Set memory settings
- Configure logging
- Set
- Edit
/etc/postgresql/15/main/pg_hba.conf- Configure host-based authentication
- Allow connections from API containers (192.168.11.155, 192.168.11.156)
- Edit
-
Task 1.4: Create database and user
- Create database:
dbis_core - Create user:
dbis - Set password (match
.envfile:8cba649443f97436db43b34ab2c0e75b5cf15611bef9c099cee6fb22cc3d7771) - Grant privileges
- Create database:
-
Task 1.5: Create systemd service (if not auto-created)
- Enable PostgreSQL service
- Start PostgreSQL service
- Verify service status
- Set to start on boot
-
Task 1.6: Verify PostgreSQL is running
- Check service status:
systemctl status postgresql - Check port listening:
ss -tln | grep 5432 - Test local connection:
psql -U dbis -d dbis_core -h localhost - Test external connection from API container
- Check service status:
-
Task 1.7: Run database migrations (if needed)
- Connect to database
- Run Prisma migrations or schema setup
- Verify tables/collections created
PostgreSQL Replica (VMID 10101) - Optional
Container IP: 192.168.11.106/24
Status: Container running, PostgreSQL not installed
Note: Replica is optional, can be deferred if not immediately needed
Installation Tasks
-
Task 2.1: Install PostgreSQL 15 (same version as primary)
- Update package repository
- Install
postgresql-15andpostgresql-contrib-15 - Verify installation
-
Task 2.2: Configure replication from primary
- Set up replication user on primary
- Configure
postgresql.conffor replication - Configure
pg_hba.conffor replication connections - Set up streaming replication
- Initialize replica from primary backup
-
Task 2.3: Create systemd service
- Enable PostgreSQL service
- Start PostgreSQL service
- Verify replication status
- Set to start on boot
-
Task 2.4: Verify replication
- Check replication lag
- Verify data synchronization
- Test read-only connections
Priority 2: API Services (Application Layer)
API Primary (VMID 10150)
Container IP: 192.168.11.155/24
Status: Container running, Node.js not installed, application not deployed
Configuration: ✅ DATABASE_URL updated
Installation Tasks
-
Task 3.1: Install Node.js
- Install Node.js 18+ (LTS recommended)
- Options: NodeSource repository, nvm, or package manager
- Verify installation:
node --version,npm --version
-
Task 3.2: Install system dependencies
- Install build tools:
build-essential,python3 - Install PostgreSQL client libraries (if needed)
- Install other system dependencies
- Install build tools:
-
Task 3.3: Deploy DBIS Core application
- Clone/copy application code to
/opt/dbis-core - Verify
.envfile exists and is configured - Install npm dependencies:
npm install - Build application (if needed):
npm run build
- Clone/copy application code to
-
Task 3.4: Configure application
- Verify
.envfile has correct DATABASE_URL (192.168.11.105:5432) - Set other required environment variables
- Configure JWT secrets, API keys, etc.
- Verify
-
Task 3.5: Set up process manager (choose one)
- Option A: systemd service
- Create service file:
/etc/systemd/system/dbis-api.service - Configure service (user, working directory, environment, etc.)
- Enable and start service
- Create service file:
- Option B: PM2
- Install PM2 globally:
npm install -g pm2 - Create PM2 ecosystem file
- Start application with PM2
- Set up PM2 startup script
- Install PM2 globally:
- Option A: systemd service
-
Task 3.6: Verify API service
- Check service/process is running
- Check port 3000 is listening
- Test health endpoint:
curl http://localhost:3000/health - Test from external:
curl http://192.168.11.155:3000/health - Verify database connectivity
-
Task 3.7: Set up logging
- Configure log rotation
- Verify logs are being written
- Set up log monitoring (optional)
API Secondary (VMID 10151)
Container IP: 192.168.11.156/24
Status: Container running, Node.js not installed, application not deployed
Configuration: ✅ DATABASE_URL updated
Installation Tasks
-
Task 4.1: Install Node.js
- Install Node.js 18+ (same version as primary)
- Verify installation:
node --version,npm --version
-
Task 4.2: Install system dependencies
- Install build tools and dependencies
- Install PostgreSQL client libraries (if needed)
-
Task 4.3: Deploy DBIS Core application
- Clone/copy application code to
/opt/dbis-core - Verify
.envfile exists and is configured - Install npm dependencies:
npm install - Build application (if needed):
npm run build
- Clone/copy application code to
-
Task 4.4: Configure application
- Verify
.envfile has correct DATABASE_URL (192.168.11.105:5432) - Set other required environment variables
- Configure for HA/secondary role (if needed)
- Verify
-
Task 4.5: Set up process manager
- Create systemd service or PM2 configuration (same as primary)
- Enable and start service
-
Task 4.6: Verify API service
- Check service/process is running
- Check port 3000 is listening
- Test health endpoint:
curl http://localhost:3000/health - Test from external:
curl http://192.168.11.156:3000/health - Verify database connectivity
-
Task 4.7: Set up logging
- Configure log rotation
- Verify logs are being written
Priority 3: Frontend Service (Verification)
Frontend/Nginx (VMID 10130)
Container IP: 192.168.11.130/24
Status: ✅ Running, ✅ Configuration updated
Verification Tasks
-
Task 5.1: Verify Nginx configuration
- Verify proxy_pass uses correct API IP (192.168.11.155:3000)
- Check for any other hardcoded IP references
- Test Nginx configuration:
nginx -t
-
Task 5.2: Test API connectivity from Frontend
- Test proxy to API Primary:
curl http://localhost/api/health - Verify requests are forwarded correctly
- Check Nginx access/error logs
- Test proxy to API Primary:
-
Task 5.3: Verify frontend application (if deployed)
- Check if frontend files are deployed
- Verify Nginx serves frontend correctly
- Test frontend → API connectivity
-
Task 5.4: SSL/HTTPS configuration (if needed)
- Configure SSL certificates
- Set up HTTPS redirect
- Verify SSL configuration
Priority 4: Integration & Testing
End-to-End Verification
-
Task 6.1: Test database connectivity
- From API Primary (10150): Test connection to PostgreSQL (192.168.11.105:5432)
- From API Secondary (10151): Test connection to PostgreSQL (192.168.11.105:5432)
- Verify authentication works
- Test database queries
-
Task 6.2: Test API services
- Test API Primary health endpoint
- Test API Secondary health endpoint
- Test API functionality (CRUD operations, etc.)
- Verify database operations work
-
Task 6.3: Test Frontend → API connectivity
- Test frontend can reach API Primary
- Test API responses are correct
- Verify end-to-end request flow
-
Task 6.4: Load balancing / High Availability (if configured)
- Test failover scenarios
- Verify load distribution
- Test health checks
-
Task 6.5: Monitoring and logging
- Verify all services are logging correctly
- Set up monitoring/alerts (optional)
- Verify log aggregation (if applicable)
Priority 5: Documentation & Maintenance
Documentation Updates
-
Task 7.1: Update deployment documentation
- Document PostgreSQL installation steps
- Document API deployment steps
- Update IP addresses in all documentation
- Document service startup procedures
-
Task 7.2: Update configuration documentation
- Document all configuration files
- Document environment variables
- Document service dependencies
-
Task 7.3: Create runbooks
- Service startup procedures
- Troubleshooting guide
- Backup/restore procedures
Task Summary by Service
PostgreSQL Primary (10100)
- Total Tasks: 7 tasks
- Status: 0/7 completed
- Priority: 🔴 Critical (blocks API services)
PostgreSQL Replica (10101)
- Total Tasks: 4 tasks
- Status: 0/4 completed
- Priority: 🟡 Medium (optional, can be deferred)
API Primary (10150)
- Total Tasks: 7 tasks
- Status: 0/7 completed (config updated separately)
- Priority: 🔴 Critical
API Secondary (10151)
- Total Tasks: 7 tasks
- Status: 0/7 completed (config updated separately)
- Priority: 🔴 Critical (for HA)
Frontend/Nginx (10130)
- Total Tasks: 4 tasks (mostly verification)
- Status: 1/4 completed (config updated)
- Priority: 🟢 Low (mostly verification)
Integration & Testing
- Total Tasks: 5 tasks
- Status: 0/5 completed
- Priority: 🟡 Medium (after services are running)
Documentation
- Total Tasks: 3 tasks
- Status: 0/3 completed
- Priority: 🟢 Low
Recommended Task Order
Phase 1: Foundation (Critical Path)
- PostgreSQL Primary installation and configuration (Tasks 1.1 - 1.7)
- Database setup (Task 1.4, 1.7)
Phase 2: Application Layer
- API Primary installation and deployment (Tasks 3.1 - 3.7)
- API Secondary installation and deployment (Tasks 4.1 - 4.7)
Phase 3: Verification
- Frontend verification (Tasks 5.1 - 5.4)
- End-to-end testing (Tasks 6.1 - 6.5)
Phase 4: Optional
- PostgreSQL Replica (Tasks 2.1 - 2.4) - if needed
- Documentation updates (Tasks 7.1 - 7.3)
Estimated Effort
- PostgreSQL Primary: 2-4 hours
- PostgreSQL Replica: 1-2 hours (optional)
- API Primary: 2-3 hours
- API Secondary: 1-2 hours (after primary)
- Frontend Verification: 30 minutes
- Testing: 1-2 hours
- Documentation: 1-2 hours
Total Estimated Time: 8-16 hours (excluding optional replica)
Dependencies
PostgreSQL Primary (10100)
└── API Primary (10150) ──┐
└── API Secondary (10151) ─┼── Frontend (10130)
│
PostgreSQL Replica (10101) ──┘ (optional)
Last Updated: 2026-01-02
Status: ⏳ TASKS DEFINED - Ready for implementation