Docker Compose Deployment
Docker Compose provides the simplest way to run Copr locally for development and testing.Architecture Overview
The Docker Compose deployment includes:- Frontend - Web UI and API (port 5000)
- Backend - Build dispatcher and logger (port 5002)
- DistGit - Source package management (port 5001)
- Keygen - GPG key signing service (port 5003)
- Database - PostgreSQL (port 5009)
- Redis - Message queue
- Resalloc - Resource allocation for builders (WebUI on port 5005)
- Builder - Build execution environment
Starting Services
Build and start all services:Port Layout
| Service | Host Port | Container Port | Purpose |
|---|---|---|---|
| Frontend | 5000 | 5000 | Web UI/API |
| DistGit | 5001 | 5001 | Source access |
| Backend | 5002 | 5002 | Build results |
| Keygen | - | 5003 | Key signing |
| Resalloc WebUI | 5005 | 5000 | Resource monitoring |
| PostgreSQL | 5009 | 5432 | Database |
Service Configuration
Thedocker-compose.yaml defines key backend services:
Persistent Volumes
Docker Compose creates persistent volumes for:results- Build artifactsdatabase- PostgreSQL dataredis- Message queue datadist-git- Source repositoriescopr-keygen- GPG keysresalloc- Resource allocation state
Kubernetes Deployment
Kubernetes deployment uses Kustomize for configuration management and is suitable for pre-production environments.Prerequisites
- Kustomize - Install from https://github.com/kubernetes-sigs/kustomize
- Docker Images - Build locally or use custom registry:
- Domain and Certificates - Replace
sample.copr.orgwith your domain:
- Storage Class - Update persistent volume claims to match your cluster:
Deploying to Kubernetes
Generate final manifests:Namespace and Resources
All resources are deployed to thefedora-copr namespace:
Component Configuration
Kustomize creates ConfigMaps from configuration files:config/frontend/- Frontend Apache and Copr configconfig/backend/- Backend, Nginx, and signing configconfig/distgit/- DistGit configurationconfig/keygen/- Key signing configurationconfig/builder/- Builder client configurationconfig/resalloc/- Resource allocation pools
Builder Configuration
Example Resalloc configuration for Kubernetes builders:Updating Images
Override image names and tags inkustomization.yaml:
OpenShift Deployment
OpenShift deployment uses Ansible playbooks and Jinja2 templates for automated infrastructure provisioning.Prerequisites
- OpenShift Cluster - Access to an OpenShift cluster
- AWS Credentials - For EC2 builder instances (currently required)
- Configuration File - Create from template:
Deploying to OpenShift
Login to OpenShift:Selective Deployment
Deploy specific components using tags:OpenShift Services
The deployment creates these DeploymentConfigs:copr-frontend- Web applicationcopr-backend- Build dispatcher (with action and log containers)copr-distgit- DistGit servicecopr-keygen- GPG signing servicepostgresql- Databaseredis- Message queueresalloc- Builder resource management
Configuration Management
Configuration is templated using Jinja2:Container Images
Current images are hosted at: https://quay.io/organization/coprKnown Limitations
- Privileged Containers - OpenShift typically doesn’t allow privileged containers, so builders must be VMs
- Logging - Logs should be sent to stdout/stderr for
oc logsintegration - Signing Security - The keygen service needs security hardening
- Certificate Management - Let’s Encrypt automation not yet implemented
- Cron Jobs - Automatic build removal and maintenance tasks need setup
Deployment Comparison
| Feature | Docker Compose | Kubernetes | OpenShift |
|---|---|---|---|
| Best For | Local development | Pre-production | Enterprise production |
| Setup Time | 5 minutes | 30 minutes | 2 minutes (with config) |
| Scalability | Single host | Multi-node cluster | Multi-node cluster |
| Builder Support | Privileged container | Privileged pod or VMs | VMs (AWS EC2) |
| Configuration | docker-compose.yaml | Kustomize + YAML | Ansible + Jinja2 |
| Automation | Manual | kubectl apply | Ansible playbook |
| Storage | Local volumes | PersistentVolumes | PersistentVolumes |
| Networking | Host ports | Ingress | Routes |
Next Steps
Maintenance
Learn about backup, monitoring, and routine operations
Release Process
Understand how Copr is released and packaged