/codegraph-deploy

CodeGraph/USA - deploy

Primary LanguageMakefile

CodeGraph Deploy

Infrastructure and deployment configurations for CodeGraph/USA.

Overview

This repository contains:

  • Docker Compose configuration for local development
  • Kubernetes manifests for cloud deployment
  • Terraform modules for infrastructure provisioning
  • Ansible playbooks for configuration management
  • Monitoring and observability setup

Prerequisites

  • Docker & Docker Compose
  • Kubernetes (kubectl, kustomize)
  • Terraform 1.3+
  • Ansible 2.9+
  • Make

Quick Start

Local Development

# Start all services
make up

# View logs
make logs

# Stop services
make down

Kubernetes Deployment

# Deploy to development
make deploy-dev

# Deploy to staging
make deploy-staging

# Deploy to production (requires confirmation)
make deploy-prod

Architecture

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Ingress   │────▶│     API     │────▶│    Core     │
└─────────────┘     └─────────────┘     └─────────────┘
                            │                    │
                            ▼                    ▼
                    ┌─────────────┐     ┌─────────────┐
                    │  Analysis   │     │  Memgraph   │
                    └─────────────┘     └─────────────┘
                            │                    │
                            ▼                    ▼
                    ┌─────────────┐     ┌─────────────┐
                    │   Qdrant    │     │   Storage   │
                    └─────────────┘     └─────────────┘

Services

Core Services

  • Memgraph: Graph database for code relationships
  • Qdrant: Vector database for semantic search
  • MinIO: S3-compatible object storage
  • Redis: Caching and session storage

Supporting Services

  • RabbitMQ: Message queue for async processing
  • Prometheus: Metrics collection
  • Grafana: Metrics visualization
  • Jaeger: Distributed tracing

Monitoring

Access monitoring dashboards:

Security

  • All secrets are managed via Kubernetes secrets
  • TLS encryption for all external endpoints
  • Network policies restrict inter-service communication
  • Regular security scanning of container images

Backup & Recovery

# Backup development environment
make backup-dev

# Restore from backup
make restore-dev

Contributing

  1. Test changes locally using docker-compose
  2. Validate Kubernetes manifests: make test-k8s
  3. Run Terraform plan before applying changes
  4. Document any new services or configurations

License

Apache License 2.0