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.
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
.
├── 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
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 versionCreate and activate a virtual environment:
python -m venv .venv
source .venv/bin/activateInstall dependencies:
pip install -r requirements.txtStart the API locally:
uvicorn cdipe.api.app:app --reload --host 127.0.0.1 --port 8000The 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
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:devThe development salt above must never be used in a production environment.
To inspect container logs:
docker logs -f cdipe-apiConfiguration 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-developmentRecommended production variables include:
CDIPE_ENV=production
CDIPE_LOG_LEVEL=INFO