Overview
Umbra’s CVM services are deployed to Phala Cloud, which provides Intel TDX confidential computing infrastructure. This guide covers the complete deployment process from local development to production.Prerequisites
Required Tools
- Docker: For building and testing container images
- Docker Compose: For local multi-service orchestration
- Make: For running build and test commands
- uv: Python package manager for development
- GitHub Account: For CI/CD via GitHub Actions
Required Accounts
- Phala Cloud: TEE infrastructure provider
- GitHub Container Registry: Docker image storage
- Domain Registrar: For DNS configuration (e.g., Cloudflare)
Local Development Setup
Start development services
- Nginx: https://localhost (self-signed cert)
- Attestation: Internal port 8080
- Auth: Internal port 8081
- vLLM: Internal port 8000
Building Docker Images
Service Images
Each service has its own Dockerfile:Attestation Service
attestation-service/Dockerfile
Auth Service
auth-service/Dockerfile
Certificate Manager
cert-manager/Dockerfile
GitHub Container Registry
Create GitHub Personal Access Token
- Go to GitHub Settings → Developer settings → Personal access tokens
- Generate new token (classic)
- Select scopes:
write:packages,read:packages,delete:packages - Save token securely
Phala Cloud Deployment
Platform Overview
Phala Cloud provides:- Intel TDX confidential virtual machines
- dstack daemon for TEE integration
- Secure key derivation and attestation
- NVIDIA GPU support for AI workloads
Deployment Configuration
Configure DNS
Point your domain to the Phala Cloud instance:Wait for DNS propagation (check with
dig vllm.concrete-security.com).Deploy to Phala Cloud
Upload docker-compose.yml to Phala Cloud:Phala Cloud will:
- Pull Docker images from GHCR
- Create TEE instance with dstack daemon
- Mount
/var/run/dstack.sockfor TEE integration - Start services with Docker Compose
GitHub Actions CI/CD
Workflow Overview
A typical CI/CD workflow for CVM services:Secrets Configuration
Configure in GitHub repository settings → Secrets and variables → Actions:| Secret | Description |
|---|---|
PHALA_API_KEY | Phala Cloud API key for deployments |
AUTH_SERVICE_TOKEN | Production auth token |
GHCR_TOKEN | GitHub PAT for container registry (if needed) |
Production Configuration
Environment Variables
Production environment configuration:Security Checklist
Disable development modes
Ensure production settings:
DEV_MODE=falseNO_TDXnot setLETSENCRYPT_STAGING=false
Configure firewall
Only expose required ports:
- Port 80: HTTP (ACME challenges only)
- Port 443: HTTPS
- Block all other ports (8080, 8081, 8000)
Enable HTTPS
Verify TLS configuration:
- Valid Let’s Encrypt certificate
- TLS 1.3 enforced
- HTTP redirects to HTTPS
Monitoring and Maintenance
Health Checks
Implement health check monitoring:Certificate Monitoring
Monitor certificate expiry:Log Collection
Collect logs from all services:Troubleshooting
Common Issues
Services fail to start
Services fail to start
Check:
- Docker daemon running
- Images pulled successfully
- Ports not already in use
- Environment variables set
TLS certificate not generated
TLS certificate not generated
Check:
- Domain DNS resolves to correct IP
- Port 80 accessible for ACME challenges
- Not hitting Let’s Encrypt rate limits
/var/run/dstack.sockmounted correctly
Attestation service returns 500 errors
Attestation service returns 500 errors
Check:
- dstack socket mounted:
/var/run/dstack.sock - Running on TDX-enabled hardware
- dstack daemon running in TEE
Auth failures on /metrics
Auth failures on /metrics
Check:
AUTH_SERVICE_TOKENset correctly- Token at least 32 characters
- Bearer token format:
Authorization: Bearer <token>
Debugging Tools
Rollback Procedures
If a deployment fails:Performance Optimization
vLLM Configuration
Optimize GPU memory and throughput:Attestation Service Scaling
Scale for high throughput:Nginx Keepalive
Optimize for attestation + inference flow:Next Steps
CVM Overview
Understand the full CVM architecture
Attestation Service
Deep dive into TDX attestation
Monitoring Setup
Set up Prometheus and Grafana
Frontend Integration
Connect frontend to CVM services
