Skip to main content

Infrastructure

The platform runs as container-based on Kubernetes. Each component can be independently scaled and managed.

Infrastructure Architecture

Three-tier architecture: Load Balancing, Application, and Data layers. Load balancing is done through Ingress Controller.

Container Structure

ContainerBase ImagePort
digital-idnode:18-alpine3000
Issuer-agentbcgovimages/aries-cloudagent:py3.9-1.1.18020/8021
Holder-agentbcgovimages/aries-cloudagent:py3.9-1.1.18030/8031
mediatorbcgovimages/aries-cloudagent:py3.9-1.1.13000/3001
tails-serverbcgovimages/tails-server6543
postgresqlpostgres:14-alpine5432

Kubernetes Resources

ResourceDescriptionCount
Namespaceidentity-platform isolation1
DeploymentsAPI, Issuer, Holder, Mediator4
ServicesClusterIP + LoadBalancer5
IngressExternal traffic routing1
ConfigMapsAgent configuration4
SecretsWallet keys, DB credentials3
PVCPostgreSQL, Wallet storage2
Example Deployment Structure
apiVersion: apps/v1
kind: Deployment
metadata:
name: digital-id-api
namespace: identity-platform
spec:
replicas: 2
selector:
matchLabels:
app: digital-id-api

Resource Requirements

ServiceCPU RequestMemory RequestReplicas
API250m512Mi2-10
Issuer Agent500m1Gi2-5
Holder Agent500m1Gi2-5
PostgreSQL1000m2Gi1 (HA: 3)
Quick Start

You can use Docker Compose for local development:

docker-compose.yml
services:
api:
image: digital-id:latest
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgresql://user:pass@db:5432/identity

Issuer-agent:
image: bcgovimages/aries-cloudagent:py3.9-1.1.1
ports:
- "8020:8020"
- "8021:8021"
Resource Optimization

Use minimum requirements for startup, HPA will automatically scale under load. Don't over-allocate resources unnecessarily.