ZenML Server Deployment Options
ZenML server can be deployed in multiple ways depending on your infrastructure requirements, scale, and operational preferences. This guide covers all deployment options from local development to production-grade setups.Deployment Methods
Local Server
Quick setup for development and testing
Docker
Containerized deployment for consistency
Kubernetes
Production-grade orchestrated deployment
Cloud Services
Managed deployment on cloud platforms
Local Server Deployment
The simplest way to deploy ZenML server for development and testing.Quick Start
Deploy a local server with a single command:- Starts a local ZenML server on
http://127.0.0.1:8237 - Uses SQLite database for storage
- Enables local artifact storage
- Opens the dashboard in your browser
Custom Configuration
Configure the local server with specific options:Connecting to Local Server
Connect your ZenML client to the local server:Stopping Local Server
Stop the running local server:Docker Deployment
Deploy ZenML server as a Docker container for isolated and reproducible environments.Using Docker Compose
Create adocker-compose.yml file:
Using Docker Run
Run the container directly:Docker Deployment with MySQL
For production-like Docker deployments, use an external MySQL database:Using ZenML CLI for Docker Deployment
ZenML provides a CLI command to deploy a Docker-based server:- SQLite database
- Local artifact storage
- Exposed on localhost:8238
Accessing Docker Server Logs
View server logs:Programmatic Deployment
Deploy ZenML server programmatically using Python:Cloud Provider Deployments
AWS Deployment Options
AWS ECS
Deploy on Elastic Container Service
AWS EKS
Deploy on Elastic Kubernetes Service
AWS App Runner
Fully managed container deployment
AWS Fargate
Serverless container deployment
GCP Deployment Options
Cloud Run
Fully managed serverless platform
GKE
Google Kubernetes Engine
Compute Engine
Virtual machine deployment
Cloud SQL
Managed MySQL database
Azure Deployment Options
Container Apps
Fully managed container platform
AKS
Azure Kubernetes Service
Container Instances
Lightweight container deployment
Azure Database
Managed MySQL database
Production Configuration
Essential Environment Variables
Production deployments require proper configuration:Database Backup Strategy
Configure automatic database backups:SSL/TLS Configuration
Secure database connections with SSL:Resource Requirements
Minimum Requirements (Development)
- CPU: 1 core
- Memory: 2 GB RAM
- Storage: 10 GB
- Network: 1 Mbps
Recommended Requirements (Production)
- CPU: 4+ cores
- Memory: 8+ GB RAM
- Storage: 100+ GB
- Network: 100+ Mbps
- Database: External MySQL with replication
Scaling Guidelines
| Users | Pipelines/Day | CPU | Memory | Replicas |
|---|---|---|---|---|
| 1-5 | < 50 | 2 | 4 GB | 1 |
| 5-20 | 50-200 | 4 | 8 GB | 2 |
| 20-50 | 200-500 | 8 | 16 GB | 3-5 |
| 50+ | 500+ | 16+ | 32+ GB | 5-10 |
Health Checks
Implement health checks for monitoring:Liveness Probe
Readiness Probe
Version Check
Troubleshooting
Server Won’t Start
Check logs for errors:Database Connection Issues
Verify database connectivity:Authentication Failures
Reset admin credentials:Port Conflicts
Check if port is already in use:Migration Guide
Migrating from Local to Docker
- Export local configuration:
- Deploy Docker server:
- Import configuration:
Migrating from Docker to Kubernetes
- Backup database:
- Deploy Kubernetes cluster (see Kubernetes deployment guide)
- Restore database:
Best Practices
Use External Database
Always use MySQL for production deployments, never SQLite
Enable Authentication
Never deploy without authentication in production environments
Configure SSL/TLS
Use HTTPS and SSL for all network connections
Regular Backups
Implement automated database backup strategies
Monitor Resources
Set up monitoring for CPU, memory, and disk usage
Scale Horizontally
Use multiple replicas for high availability
Rotate Secrets
Regularly rotate JWT keys and database credentials
Update Regularly
Keep ZenML server updated to latest stable version
Next Steps
Kubernetes Deployment
Deploy on Kubernetes with Helm
Docker Guide
Detailed Docker deployment instructions
Security Configuration
Secure your ZenML deployment
