Skip to content

Update Deployment Configuration #19

@UJ2202

Description

@UJ2202

User Story

As a DevOps engineer, I want updated deployment configurations so that CMBCluster can deploy with PostgreSQL instead of SQLite across all environments (dev, staging, production).

Description

Update all deployment configurations, Helm charts, Kubernetes manifests, and infrastructure scripts to support PostgreSQL deployment, including database provisioning, connection management, and monitoring.

Current Deployment Analysis

Based on the codebase analysis:

  • Helm charts in helm/ directory configured for GCP
  • Setup scripts in scripts/ using GCS for SQLite storage
  • Docker configurations in various Dockerfiles
  • Environment configuration in .env and compose.yml
  • Kubernetes manifests in k8s/ directory

Technical Requirements

  • Update Helm charts to include PostgreSQL deployment
  • Modify setup scripts to provision PostgreSQL instead of SQLite storage
  • Update Docker configurations for PostgreSQL dependencies
  • Configure database connection strings and credentials
  • Set up database monitoring and health checks
  • Update backup and recovery procedures
  • Configure connection pooling and scaling

Key Areas to Update

  1. Helm Charts: Add PostgreSQL deployment templates
  2. Setup Scripts: Replace GCS bucket creation with PostgreSQL provisioning
  3. Environment Configuration: Update database connection settings
  4. Kubernetes Manifests: Add PostgreSQL service definitions
  5. Docker Images: Include PostgreSQL client libraries
  6. Monitoring: Add PostgreSQL health checks and metrics

Acceptance Criteria

  • Helm chart includes PostgreSQL deployment
  • Setup scripts provision PostgreSQL instance
  • Database credentials managed securely
  • Connection pooling configured properly
  • Health checks and monitoring implemented
  • Backup and recovery procedures updated
  • Documentation updated for new deployment process
  • Environment-specific configurations (dev/staging/prod)
  • Migration from SQLite to PostgreSQL documented
  • Rollback procedures for deployment failures

Files to Modify

  • helm/values.yaml - Add PostgreSQL configuration
  • helm/templates/ - Add PostgreSQL deployment templates
  • scripts/setup-cluster.sh - Replace SQLite bucket with PostgreSQL
  • compose.yml - Add PostgreSQL service for local development
  • k8s/ - Update Kubernetes manifests
  • Dockerfiles - Add PostgreSQL dependencies
  • .env.example - Update database configuration examples

Infrastructure Changes

  • Replace Cloud Storage bucket for SQLite with Cloud SQL PostgreSQL
  • Update IAM roles and permissions
  • Configure database networking and security
  • Set up automated backups and monitoring
  • Plan for database scaling and high availability

Related to

Epic #15 - Database Migration SQLite → PostgreSQL

Definition of Done

  • All environments can deploy with PostgreSQL
  • Database provisioning is automated
  • Security and monitoring are properly configured
  • Documentation is complete and tested
  • Deployment procedures are validated

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions