Usage & Enterprise Capabilities
Drone is the leading open-source CI/CD platform for the container-first era. Built from the ground up to leverage the power of Docker, Drone allows engineering teams to automate their software testing and delivery pipelines with extreme speed and simplicity. Unlike legacy CI tools that require complex configuration and manual maintenance, Drone pipelines are defined in simple YAML files that live directly in your code repositories.
Every step in a Drone pipeline is executed in its own isolated Docker container, ensuring that builds are consistent, reproducible, and secure. Its lightweight architecture means it can be deployed on everything from a single Raspberry Pi to a massive Kubernetes cluster, handling thousands of builds per day without the overhead of heavy enterprise JVM-based tools.
Self-hosting Drone provides organizations with a world-class CI/CD system that integrates perfectly with their existing SCM (like GitHub Enterprise or Gitea) while maintaining full control over their sensitive build artifacts and secrets.
Key Benefits
Pipeline Simplicity: Define your entire CI/CD process in a single, version-controlled YAML file.
Isolated Builds: Containers ensure that every build starts with a clean environment.
Extreme Speed: Optimized for rapid execution and low resource consumption.
Plugin Ecosystem: Easily add support for deployments, notifications, and security scans.
Native Integration: Works out of the box with all major git providers.
Production Architecture Overview
A production Drone deployment consists of:
Drone Server: The central management service and web interface.
Drone Runners: Distributed processes that execute the actual pipeline steps (Docker, Kubernetes, or SSH).
Relational Database: PostgreSQL or MySQL for metadata and build history.
SCM Integration: Connection to your Git provider (GitHub, GitLab, Gitea).
Reverse Proxy: NGINX or Caddy to handle SSL/TLS and routing.
Implementation Blueprint
Implementation Blueprint
Prerequisites
sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker
sudo systemctl start dockerDocker Compose Production Setup
This configuration runs the Drone server and a Docker runner on a single host.
version: '3'
services:
drone-server:
image: drone/drone:latest
ports:
- "80:80"
- "443:443"
environment:
- DRONE_GITHUB_CLIENT_ID=${GITHUB_ID}
- DRONE_GITHUB_CLIENT_SECRET=${GITHUB_SECRET}
- DRONE_RPC_SECRET=${RPC_SECRET}
- DRONE_SERVER_HOST=${DOMAIN}
- DRONE_SERVER_PROTO=https
- DRONE_DATABASE_DRIVER=postgres
- DRONE_DATABASE_DATASOURCE=postgres://user:pass@db:5432/drone?sslmode=disable
depends_on:
- db
volumes:
- drone_data:/data
restart: always
drone-runner:
image: drone/drone-runner-docker:latest
environment:
- DRONE_RPC_HOST=${DOMAIN}
- DRONE_RPC_PROTO=https
- DRONE_RPC_SECRET=${RPC_SECRET}
- DRONE_RUNNER_CAPACITY=2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
db:
image: postgres:14-alpine
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=drone
volumes:
- pg_data:/var/lib/postgresql/data
restart: always
volumes:
drone_data:
pg_data:Kubernetes Production Deployment (Recommended)
Drone is highly scalable on Kubernetes using the official Drone Helm charts.
helm repo add drone https://charts.drone.io
helm install drone drone/drone --namespace devops --create-namespaceBenefits:
Scalable Runners: Use the Kubernetes runner to spin up isolated pods for every build step, scaling your CI capacity to infinity.
Secure Secret Management: Use Kubernetes Secrets to manage your SCM credentials and RPC tokens.
Zero-Downtime Reliability: Rolling updates for the server and runners without interrupting active builds.
Scaling Strategy
Distributed Runners: Scale your CI throughput by adding more Drone runners on different hosts or in the cluster.
Database Optimization: Use a managed PostgreSQL instance for your server to ensure build metadata is durable and fast.
Caching: Use the Drone S3 or volume caching plugins to speed up builds by persisting dependencies across runs.
Architecture Tuning: Deploy specific runners for AMD64, ARM64, or Windows workloads based on your project needs.
Backup & Safety
Database Snapshots: Automate daily PostgreSQL backups and store them offsite securely.
RPC Secret Management: Rotate your RPC secrets regularly and ensure they are never committed to your repositories.
Volume Backups: Regularly backup the persistent volumes containing your server logs and runner configurations.
HTTPS Enforcement: Always run Drone behind a secure reverse proxy with SSL/TLS enabled to protect your SCM integration.