13. Infrastructure: CI+CD
(build & deploy)
Orchestrator
Server
Build Server
Agent
Build Server
Agent
Artifact Store
Server
Server
Agent
Deploy Server
Agent
20. Pattern #1 – pure Docker
Host
Container
Agent
AgentOrchestrator
Server
1
3
Pipelines:
1. Create the Host VM with Agent installed (require bootstrap)
2. Build and Push Docker images for Build Agents
3. Start Docker Containers hosting Build Agents
Docker
Registry
2
21. Design #2 – Kubernetes
Kubernetes Cluster
Container
Agent
AgentOrchestrator
Server
Docker
Registry
Pipelines:
1. Create the Kubernetes cluster (require bootstrap)
2. Build and Push Docker images for Build Agents (bootstrap)
3. Deploy Docker Containers hosting Build Agents to cluster
1
3
2
22. Step 0: Bootstrapping
Aim to minimal requirements, e.g.
• Cloud credentials
• Cloud toolkit (e.g. AWS or Azure CLI)
• Script that setup a VM
• Installs the server
• Restore backups
23. Step 1: Hosts
Physical machine(s)
VMs
Kubernetes cluster
Metal-as-a-Service
Microsoft Deployment Toolkit
Infrastructure-as-code
Terraform, Pulumi
CloudFormation, ARM Templates
25. Step 3: pipeline the
creation of agents
Automate deployment of new / existing agents
Agent on host launches new agents in containers
Hurdle: manual admin grant
26. Step 4: pipeline the
creation of hosts
Script to create host
Create VM
Install Agent
Run on master or hosted agent
Autoscale?
As Eric Raymond pointed out in his seminal open-source work, The Cathedral and the Bazaar: "Every good work of software starts by scratching a developer's personal itch."
Robert A. Heinlein
https://en.wikipedia.org/wiki/By_His_Bootstraps
You can see why I chose that title for this presentation
I have a living documentation of my build and deploy infrastructure
I can recreate it easily on another cloud provider
Team familiarize with Docker & K8S
Jenkins? Easy, rsync the content of JENKINS_HOMETFS/Azure Pipelines? Easy, configure the built-in backup (basically a DB backup)