Skip to content

Repository files navigation

CDIPE Deployment Guide

This guide describes how to deploy CDIPE—a data ingestion, processing, risk analysis, and secure reporting platform—to a local development environment or a managed Kubernetes cluster.

Deployment status: This repository currently contains deployment scaffolding. Cloud infrastructure, production secrets, container registries, observability, and provider-specific Terraform resources must be completed before production use.

1. Deployment Architecture

A production CDIPE deployment is expected to include:

  • CDIPE API service
  • PostgreSQL or managed relational database
  • Object storage for raw and processed datasets
  • Kubernetes Deployment and Service resources
  • Ingress or API gateway
  • Secrets manager or Vault
  • CI/CD pipeline
  • Prometheus and Grafana observability
  • Horizontal Pod Autoscaler
  • Centralized logging
  • Optional asynchronous workers and queue infrastructure

A typical data flow is:

Client
  |
  v
Ingress / API Gateway
  |
  v
CDIPE API
  |
  +--> PostgreSQL
  +--> Object Storage
  +--> Risk Detection / Processing Workers
  +--> Metrics and Logs

2. Repository Layout

.
├── charts/
│   └── cdipe/
│       ├── Chart.yaml
│       ├── values.yaml
│       └── templates/
├── infra/
│   └── terraform/
│       ├── main.tf
│       ├── variables.tf
│       ├── outputs.tf
│       └── providers.tf
├── .github/
│   └── workflows/
│       └── ci-cd.yml
├── Dockerfile
├── pyproject.toml
├── requirements.txt
└── src/
    └── cdipe/
        └── api/
            └── app.py

3. Prerequisites

Install the following tools:

  • Docker
  • Python 3.11+
  • uvicorn
  • Helm 3
  • kubectl
  • Terraform
  • Access to a Kubernetes cluster
  • Access to a container registry
  • Cloud-provider credentials

Verify the installation:

docker --version
python --version
helm version
kubectl version --client
terraform version

4. Local Development

Create and activate a virtual environment:

python -m venv .venv
source .venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Start the API locally:

uvicorn cdipe.api.app:app --reload --host 127.0.0.1 --port 8000

The API should be available at:

http://127.0.0.1:8000

If FastAPI is enabled, interactive documentation is usually available at:

http://127.0.0.1:8000/docs

5. Build and Run the Docker Image

Build the development image:

docker build -t cdipe:dev .

Run the container:

docker run --rm \
  --name cdipe-api \
  -p 8000:8000 \
  -e CDIPE_ENV=development \
  -e CDIPE_PII_SALT=development-only-value \
  cdipe:dev

The development salt above must never be used in a production environment.

To inspect container logs:

docker logs -f cdipe-api

6. Configuration

Configuration should be provided through environment variables or a managed secrets system.

Example development variables:

export CDIPE_ENV=development
export CDIPE_LOG_LEVEL=INFO
export CDIPE_DATABASE_URL=sqlite:///./cdipe.db
export CDIPE_PII_SALT=replace-me
export CDIPE_OBJECT_STORAGE_BUCKET=cdipe-development

Recommended production variables include:

CDIPE_ENV=production
CDIPE_LOG_LEVEL=INFO

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages