SlideShare a Scribd company logo
CI AND CD AT SCALE
SCALING JENKINS WITH DOCKER
AND APACHE MESOS
Carlos Sanchez
/csanchez.org @csanchez
See online at http://carlossg.github.io/presentations
ABOUT ME
Senior So ware Engineer @ CloudBees
Contributor to the Jenkins Mesos plugin and the Java
Marathon client
Author of Jenkins Kubernetes plugin
Long time OSS contributor at Apache, Eclipse, Puppet,…
OUR USE CASE
Scaling Jenkins
Your mileage may vary
SCALING JENKINS
Two options:
More build agents per master
More masters
SCALING JENKINS: MORE BUILD
AGENTS
Pros
Multiple plugins to add more agents, even dynamically
Cons
The master is still a SPOF
Handling multiple configurations, plugin versions,...
There is a limit on how many build agents can be
attached
SCALING JENKINS: MORE MASTERS
Pros
Different sub-organizations can self service and operate
independently
Cons
Single Sign-On
Centralized configuration and operation
CLOUDBEES JENKINS ENTERPRISE EDITION
CloudBees Jenkins Operations Center
CLOUDBEES JENKINS PLATFORM - PRIVATE
SAAS EDITION
The best of both worlds
CloudBees Jenkins Operations Center with multiple masters
Dynamic build agent creation in each master
ElasticSearch for Jenkins metrics and Logstash
BUT IT IS NOT TRIVIAL
ARCHITECTURE
Docker Docker Docker
Isolated Jenkins masters
Isolated build agents and jobs
Memory and CPU limits
How would you design your infrastructure if
you couldn't login? Ever.
Kelsey Hightower
EMBRACE FAILURE!
CLUSTER SCHEDULING
Running in public cloud, private cloud, VMs or bare metal
Starting with AWS and OpenStack
HA and fault tolerant
With Docker support of course
MESOSPHERE MARATHON
TERRAFORM
TERRAFORM
resource "aws_instance" "worker" {
count = 1
instance_type = "m3.large"
ami = "ami-xxxxxx"
key_name = "tiger-csanchez"
security_groups = ["sg-61bc8c18"]
subnet_id = "subnet-xxxxxx"
associate_public_ip_address = true
tags {
Name = "tiger-csanchez-worker-1"
"cloudbees:pse:cluster" = "tiger-csanchez"
"cloudbees:pse:type" = "worker"
}
root_block_device {
volume_size = 50
}
}
TERRAFORM
State is managed
Runs are idempotent
terraform apply
Sometimes it is too automatic
Changing image id will restart all instances
Preinstall packages: Mesos, Marathon, Docker
Cached docker images
Other drivers: XFS, NFS,...
Enhanced networking driver (AWS)
STORAGE
Handling distributed storage
Servers can start in any host of the cluster
And they can move when they are restarted
Jenkins masters need persistent storage, agents (typically)
don't
Supporting EBS (AWS) and external NFS
SIDEKICK CONTAINER
A privileged container that manages mounting for other
containers
Can execute commands in the host and other containers
SIDEKICK CONTAINER CASTLE
Running in Marathon in each host
"constraints": [
[
"hostname",
"UNIQUE"
]
]
A lot of magic happening with nsenter
both in host and other containers
Jenkins master container requests data on startup using
entrypoint
REST call to Castle
Castle checks authentication
Creates necessary storage in the backend
EBS volumes from snapshots
Directories in NFS backend
Mounts storage in requesting container
EBS is mounted to host, then bind mounted into
container
NFS is mounted directly in container
Listens to Docker event stream for killed containers
CASTLE: BACKUPS AND CLEANUP
Periodically takes S3 snapshots from EBS volumes in AWS
Cleanups happening at different stages and periodically
EMBRACE FAILURE!
PERMISSIONS
Containers should not run as root
Container user id != host user id
i.e. jenkinsuser in container is always 1000 but matches
ubuntuuser in host
CAVEATS
Only a limited number of EBS volumes can be mounted
Docs say /dev/sd[f-p], but /dev/sd[q-z]seem to
work too
Sometimes the device gets corrupt and no more EBS
volumes can be mounted there
NFS users must be centralized and match in cluster and NFS
server
MEMORY
Scheduler needs to account for container memory
requirements and host available memory
Prevent containers for using more memory than allowed
Memory constrains translate to Docker --memory
WHAT DO YOU THINK HAPPENS
WHEN?
Your container goes over memory quota?
WHAT ABOUT THE JVM?
WHAT ABOUT THE CHILD
PROCESSES?
OTHER
CONSIDERATIONS
ZOMBIE REAPING PROBLEM
Zombie processes are processes that have terminated but
have not (yet) been waited for by their parent processes.
The init process -- PID 1 -- task is to "adopt" orphaned child
processes
source
THIS IS A PROBLEM IN DOCKER
Jenkins build agent run multiple processes
But Jenkins masters too, and they are long running
TINI
Systemd or SysV init is too heavyweight for containers
All Tini does is spawn a single child (Tini is
meant to be run in a container), and wait
for it to exit all the while reaping zombies
and performing signal forwarding.
PROCESS REAPING
Docker 1.9 gave us trouble at scale, rolled back to 1.8
Lots of defunct processes
NETWORKING
Jenkins masters open several ports
HTTP
JNLP Build agent
SSH server (Jenkins CLI type operations)
NETWORKING: HTTP
We use a simple nginxreverse proxy for
Mesos
Marathon
ElasticSearch
CJOC
Jenkins masters
Gets destination host and port from Marathon
NETWORKING: HTTP
Doing both
domain based routing master1.pse.example.com
path based routing pse.example.com/master1
because not everybody can touch the DNS or get a
wildcard SSL certificate
NETWORKING: JNLP
Build agents started dynamically in Mesos cluster can
connect to masters internally
Build agents manually started outside cluster get host and
port destination from HTTP, then connect directly
NETWORKING: SSH
SSH Gateway Service
Tunnel SSH requests to the correct host
Simple configuration needed in client
Host=*.ci.cloudbees.com
ProxyCommand=ssh -q -p 22 ssh.ci.cloudbees.com tunnel %h
allows to run
ssh master1.ci.cloudbees.com
SCALING
New and interesting problems
Hitler uses Docker
A 300 JENKINS MASTERS CLUSTER
3 Mesos masters (m3.xlarge: 4 vCPU, 15GB, 2x40 SSD)
80 Mesos slaves (m3.xlarge)
7 Mesos slaves dedicated to ElasticSearch: (r3.2xlarge: 8
vCPU, 61GB, 1x160 SSD)
Total: 1.5TB 376 CPUs
Running 300 masters and ~3 concurrent jobs per master
Masters: 2GB 0.1 CPU / Build agents: 512MB 0.1 CPU
TERRAFORM AWS
Instances
Keypairs
Security Groups
S3 buckets
ELB
VPCs
AWS
Resource limits: VPCs, S3 snapshots, some instance sizes
Rate limits: affect the whole account
Retrying is your friend, but with exponential backoff
AWS
Running with a patched Terraform to overcome timeouts
and AWS eventual consistency
<?xml version="1.0" encoding="UTF-8"?>
<DescribeVpcsResponse xmlns="http://ec2.amazonaws.com/doc/2015-10-01/"
<requestId>8f855bob-3421-4cff-8c36-4b517eb0456c</requestld>
<vpcSet>
<item>
<vpcId>vpc-30136159</vpcId>
<state>available</state>
<cidrBlock>10.16.0.0/16</cidrBlock>
...
</DescribeVpcsResponse>
2016/05/18 12:55:57 [DEBUG] [aws-sdk-go] DEBUG: Response ec2/DescribeVpcAttri
--[ RESPONSE] ------------------------------------
HTTP/1.1 400 Bad Request
<Response><Errors><Error><Code>InvalidVpcID.NotFound</Code><Message>
The vpc ID 'vpc-30136159‘ does not
exist</Message></Error></Errors>
TERRAFORM OPENSTACK
Instances
Keypairs
Security Groups
Load Balancer
Networks
OPENSTACK
Custom flavors
Custom images
Different CLI commands
There are not two OpenStack installations that are the same
THE FUTURE
New framework using Netflix Fenzo
Runs under marathon, exposes REST API that masters call
Affinity
Reduce number of frameworks
Faster to spawn new build agents because framework is
not started
Pipeline durable builds, can survive a restart of the master
Dedicated workers for builds
THANKS
csanchez.org
csanchez
carlossg

More Related Content

What's hot

Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Carlos Sanchez
 
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Carlos Sanchez
 
Docker toolbox
Docker toolboxDocker toolbox
Docker toolbox
Yonghwee Kim
 
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Carlos Sanchez
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and Kubernetes
Carlos Sanchez
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
Puppet
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Erica Windisch
 
Using Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous DeliveryUsing Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous Delivery
Carlos Sanchez
 
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Carlos Sanchez
 
Securing Containers, One Patch at a Time - Michael Crosby, Docker
Securing Containers, One Patch at a Time - Michael Crosby, DockerSecuring Containers, One Patch at a Time - Michael Crosby, Docker
Securing Containers, One Patch at a Time - Michael Crosby, Docker
Docker, Inc.
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and Azure
Jérôme Petazzoni
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
Ben Hall
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous Delivery
Carlos Sanchez
 
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron GrattafioriThe Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
Docker, Inc.
 
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Patrick Chanezon
 
Docker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about DockerDocker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about Docker
Nguyen Anh Tu
 
Comprehensive Monitoring for Docker
Comprehensive Monitoring for DockerComprehensive Monitoring for Docker
Comprehensive Monitoring for Docker
Christian Beedgen
 
Docker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David LawrenceDocker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David Lawrence
Docker, Inc.
 

What's hot (20)

Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
 
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-Services
 
Docker toolbox
Docker toolboxDocker toolbox
Docker toolbox
 
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and Kubernetes
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
 
Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
 
Using Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous DeliveryUsing Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous Delivery
 
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
 
Securing Containers, One Patch at a Time - Michael Crosby, Docker
Securing Containers, One Patch at a Time - Michael Crosby, DockerSecuring Containers, One Patch at a Time - Michael Crosby, Docker
Securing Containers, One Patch at a Time - Michael Crosby, Docker
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and Azure
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous Delivery
 
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron GrattafioriThe Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
 
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
 
Docker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about DockerDocker-hanoi meetup #1: introduction about Docker
Docker-hanoi meetup #1: introduction about Docker
 
Comprehensive Monitoring for Docker
Comprehensive Monitoring for DockerComprehensive Monitoring for Docker
Comprehensive Monitoring for Docker
 
Docker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David LawrenceDocker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David Lawrence
 

Similar to CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos

Using containers for continuous integration and continuous delivery - Carlos ...
Using containers for continuous integration and continuous delivery - Carlos ...Using containers for continuous integration and continuous delivery - Carlos ...
Using containers for continuous integration and continuous delivery - Carlos ...
Paris Container Day
 
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Carlos Sanchez
 
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
Docker, Inc.
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Codemotion
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
Vanika Kapoor
 
Sheep it
Sheep itSheep it
Sheep it
lxfontes
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Partner S.A.
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
Patrick Chanezon
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
Carlo Bonamico
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
Puppet
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
Carlos Sanchez
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWS
Amazon Web Services
 
Docker Demystified for SB JUG
Docker Demystified for SB JUGDocker Demystified for SB JUG
Docker Demystified for SB JUG
Erik Osterman
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
Sergey Dzyuban
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecture
joaquincasares
 
How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...
Codemotion
 
Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017
Amazon Web Services
 
Docker: Testing to Production
Docker: Testing to ProductionDocker: Testing to Production
Docker: Testing to Production
Edwin Fuquen
 
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
 Build High-Performance, Scalable, Distributed Applications with Stacks of Co... Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
Yandex
 
HA Kubernetes on Mesos / Marathon
HA Kubernetes on Mesos / MarathonHA Kubernetes on Mesos / Marathon
HA Kubernetes on Mesos / Marathon
Cobus Bernard
 

Similar to CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos (20)

Using containers for continuous integration and continuous delivery - Carlos ...
Using containers for continuous integration and continuous delivery - Carlos ...Using containers for continuous integration and continuous delivery - Carlos ...
Using containers for continuous integration and continuous delivery - Carlos ...
 
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
 
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
 
Sheep it
Sheep itSheep it
Sheep it
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWS
 
Docker Demystified for SB JUG
Docker Demystified for SB JUGDocker Demystified for SB JUG
Docker Demystified for SB JUG
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecture
 
How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...
 
Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017
 
Docker: Testing to Production
Docker: Testing to ProductionDocker: Testing to Production
Docker: Testing to Production
 
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
 Build High-Performance, Scalable, Distributed Applications with Stacks of Co... Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
 
HA Kubernetes on Mesos / Marathon
HA Kubernetes on Mesos / MarathonHA Kubernetes on Mesos / Marathon
HA Kubernetes on Mesos / Marathon
 

More from Carlos Sanchez

Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Carlos Sanchez
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
Carlos Sanchez
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
Carlos Sanchez
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
Carlos Sanchez
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
Carlos Sanchez
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Carlos Sanchez
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
Carlos Sanchez
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
Carlos Sanchez
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012
Carlos Sanchez
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
Carlos Sanchez
 
From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011
Carlos Sanchez
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
Carlos Sanchez
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
Carlos Sanchez
 
Eclipse IAM, Maven Integration For Eclipse
Eclipse IAM, Maven Integration For EclipseEclipse IAM, Maven Integration For Eclipse
Eclipse IAM, Maven Integration For Eclipse
Carlos Sanchez
 

More from Carlos Sanchez (14)

Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-Services
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
 
From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
 
Eclipse IAM, Maven Integration For Eclipse
Eclipse IAM, Maven Integration For EclipseEclipse IAM, Maven Integration For Eclipse
Eclipse IAM, Maven Integration For Eclipse
 

Recently uploaded

Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 

Recently uploaded (20)

Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 

CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos

  • 1. CI AND CD AT SCALE SCALING JENKINS WITH DOCKER AND APACHE MESOS Carlos Sanchez /csanchez.org @csanchez See online at http://carlossg.github.io/presentations
  • 2. ABOUT ME Senior So ware Engineer @ CloudBees Contributor to the Jenkins Mesos plugin and the Java Marathon client Author of Jenkins Kubernetes plugin Long time OSS contributor at Apache, Eclipse, Puppet,…
  • 3. OUR USE CASE Scaling Jenkins Your mileage may vary
  • 4. SCALING JENKINS Two options: More build agents per master More masters
  • 5. SCALING JENKINS: MORE BUILD AGENTS Pros Multiple plugins to add more agents, even dynamically Cons The master is still a SPOF Handling multiple configurations, plugin versions,... There is a limit on how many build agents can be attached
  • 6. SCALING JENKINS: MORE MASTERS Pros Different sub-organizations can self service and operate independently Cons Single Sign-On Centralized configuration and operation
  • 7. CLOUDBEES JENKINS ENTERPRISE EDITION CloudBees Jenkins Operations Center
  • 8. CLOUDBEES JENKINS PLATFORM - PRIVATE SAAS EDITION The best of both worlds CloudBees Jenkins Operations Center with multiple masters Dynamic build agent creation in each master ElasticSearch for Jenkins metrics and Logstash
  • 9. BUT IT IS NOT TRIVIAL
  • 11. Isolated Jenkins masters Isolated build agents and jobs Memory and CPU limits
  • 12. How would you design your infrastructure if you couldn't login? Ever. Kelsey Hightower
  • 14. CLUSTER SCHEDULING Running in public cloud, private cloud, VMs or bare metal Starting with AWS and OpenStack HA and fault tolerant With Docker support of course
  • 17. TERRAFORM resource "aws_instance" "worker" { count = 1 instance_type = "m3.large" ami = "ami-xxxxxx" key_name = "tiger-csanchez" security_groups = ["sg-61bc8c18"] subnet_id = "subnet-xxxxxx" associate_public_ip_address = true tags { Name = "tiger-csanchez-worker-1" "cloudbees:pse:cluster" = "tiger-csanchez" "cloudbees:pse:type" = "worker" } root_block_device { volume_size = 50 } }
  • 18. TERRAFORM State is managed Runs are idempotent terraform apply Sometimes it is too automatic Changing image id will restart all instances
  • 19.
  • 20. Preinstall packages: Mesos, Marathon, Docker Cached docker images Other drivers: XFS, NFS,... Enhanced networking driver (AWS)
  • 21. STORAGE Handling distributed storage Servers can start in any host of the cluster And they can move when they are restarted Jenkins masters need persistent storage, agents (typically) don't Supporting EBS (AWS) and external NFS
  • 22. SIDEKICK CONTAINER A privileged container that manages mounting for other containers Can execute commands in the host and other containers
  • 23. SIDEKICK CONTAINER CASTLE Running in Marathon in each host "constraints": [ [ "hostname", "UNIQUE" ] ]
  • 24. A lot of magic happening with nsenter both in host and other containers
  • 25. Jenkins master container requests data on startup using entrypoint REST call to Castle Castle checks authentication Creates necessary storage in the backend EBS volumes from snapshots Directories in NFS backend
  • 26. Mounts storage in requesting container EBS is mounted to host, then bind mounted into container NFS is mounted directly in container Listens to Docker event stream for killed containers
  • 27. CASTLE: BACKUPS AND CLEANUP Periodically takes S3 snapshots from EBS volumes in AWS Cleanups happening at different stages and periodically EMBRACE FAILURE!
  • 28. PERMISSIONS Containers should not run as root Container user id != host user id i.e. jenkinsuser in container is always 1000 but matches ubuntuuser in host
  • 29. CAVEATS Only a limited number of EBS volumes can be mounted Docs say /dev/sd[f-p], but /dev/sd[q-z]seem to work too Sometimes the device gets corrupt and no more EBS volumes can be mounted there NFS users must be centralized and match in cluster and NFS server
  • 30. MEMORY Scheduler needs to account for container memory requirements and host available memory Prevent containers for using more memory than allowed Memory constrains translate to Docker --memory
  • 31. WHAT DO YOU THINK HAPPENS WHEN? Your container goes over memory quota?
  • 32.
  • 34. WHAT ABOUT THE CHILD PROCESSES?
  • 36. ZOMBIE REAPING PROBLEM Zombie processes are processes that have terminated but have not (yet) been waited for by their parent processes. The init process -- PID 1 -- task is to "adopt" orphaned child processes source
  • 37. THIS IS A PROBLEM IN DOCKER Jenkins build agent run multiple processes But Jenkins masters too, and they are long running
  • 38. TINI Systemd or SysV init is too heavyweight for containers All Tini does is spawn a single child (Tini is meant to be run in a container), and wait for it to exit all the while reaping zombies and performing signal forwarding. PROCESS REAPING Docker 1.9 gave us trouble at scale, rolled back to 1.8 Lots of defunct processes
  • 39. NETWORKING Jenkins masters open several ports HTTP JNLP Build agent SSH server (Jenkins CLI type operations)
  • 40. NETWORKING: HTTP We use a simple nginxreverse proxy for Mesos Marathon ElasticSearch CJOC Jenkins masters Gets destination host and port from Marathon
  • 41. NETWORKING: HTTP Doing both domain based routing master1.pse.example.com path based routing pse.example.com/master1 because not everybody can touch the DNS or get a wildcard SSL certificate
  • 42. NETWORKING: JNLP Build agents started dynamically in Mesos cluster can connect to masters internally Build agents manually started outside cluster get host and port destination from HTTP, then connect directly
  • 43. NETWORKING: SSH SSH Gateway Service Tunnel SSH requests to the correct host Simple configuration needed in client Host=*.ci.cloudbees.com ProxyCommand=ssh -q -p 22 ssh.ci.cloudbees.com tunnel %h allows to run ssh master1.ci.cloudbees.com
  • 44. SCALING New and interesting problems Hitler uses Docker
  • 45.
  • 46. A 300 JENKINS MASTERS CLUSTER 3 Mesos masters (m3.xlarge: 4 vCPU, 15GB, 2x40 SSD) 80 Mesos slaves (m3.xlarge) 7 Mesos slaves dedicated to ElasticSearch: (r3.2xlarge: 8 vCPU, 61GB, 1x160 SSD) Total: 1.5TB 376 CPUs Running 300 masters and ~3 concurrent jobs per master Masters: 2GB 0.1 CPU / Build agents: 512MB 0.1 CPU
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 53. AWS Resource limits: VPCs, S3 snapshots, some instance sizes Rate limits: affect the whole account Retrying is your friend, but with exponential backoff
  • 54. AWS Running with a patched Terraform to overcome timeouts and AWS eventual consistency <?xml version="1.0" encoding="UTF-8"?> <DescribeVpcsResponse xmlns="http://ec2.amazonaws.com/doc/2015-10-01/" <requestId>8f855bob-3421-4cff-8c36-4b517eb0456c</requestld> <vpcSet> <item> <vpcId>vpc-30136159</vpcId> <state>available</state> <cidrBlock>10.16.0.0/16</cidrBlock> ... </DescribeVpcsResponse> 2016/05/18 12:55:57 [DEBUG] [aws-sdk-go] DEBUG: Response ec2/DescribeVpcAttri --[ RESPONSE] ------------------------------------ HTTP/1.1 400 Bad Request <Response><Errors><Error><Code>InvalidVpcID.NotFound</Code><Message> The vpc ID 'vpc-30136159‘ does not exist</Message></Error></Errors>
  • 56. OPENSTACK Custom flavors Custom images Different CLI commands There are not two OpenStack installations that are the same
  • 57. THE FUTURE New framework using Netflix Fenzo Runs under marathon, exposes REST API that masters call Affinity Reduce number of frameworks Faster to spawn new build agents because framework is not started Pipeline durable builds, can survive a restart of the master Dedicated workers for builds