Top Banner
1 Make Continuous Integration Scale Again Abderrazak BOUADMA
33

Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

Jan 28, 2018

Download

Technology

Sfeir
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

1

Make Continuous IntegrationScale Again

Abderrazak BOUADMA

Page 2: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

2

what is building softwares ?

Page 3: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

3

code repository

build factory

reports

artifacts

Developers Data center

push

trigger store

deploy

Page 4: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

4

reportspush

trigger store

deploy

Page 5: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

5

what is continuous integration ?

Page 6: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

6

reportspush

trigger store

deploy

Page 7: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

7

so, what’s the problem ?

Page 8: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

DOESN’T SCALE

Page 9: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

9

reportspush

trigger store

deploy

Page 10: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

10

reportspush

trigger store

deploy

Page 11: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

11

Page 12: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

12

so, how to solve it ?

Page 13: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

13

push

trigger

deploy

master

slaves

Page 14: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

pros

1. specialize each salve2. adding slaves permits to scale3. each team could manage its own slave(s)4. slaves are isolated

14

Page 15: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

cons

1. Provisioning slaves still manual operation (could be automated)

2. it’s not an instant operation (VMs take time before being available)

3. A developer team hasn’t to bother about the build factory (not too much)

15

Page 16: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

16

Using Docker Swarm and Ephemeral Containers ?

Page 17: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

17

docker swarm cluster

registry

push code

spawn a container

deploy

canarytest

prod

publish

scale

Page 18: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

pros

1. scales very well2. tailored for on-premises or the cloud3. slaves images could be specialized at will

18

Page 19: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

cons

1. Need a dedicated team to manage the swarm cluster2. There’s not yet a managed Docker container on GCP3. On the cloud, the Docker cluster could cost a lot of

money.

19

Page 20: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

20

Managed Container Orchestration ?

Page 21: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

21

Page 22: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

Kubernetes concepts

22

Pod Selector ReplicaSet

Volume Secret DaemonSet

Service Ingress StatefulSet

Deployment Liveness Probe ConfigMap

Cluster Readiness Probe

Label Job

Page 23: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

23

+ +

Page 24: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

24

How ?

Page 25: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

Read the doc

https://cloud.google.com/solutions/configuring-jenkins-container-engine

https://cloud.google.com/solutions/continuous-delivery-jenkins-container-engine

https://github.com/GoogleCloudPlatform/continuous-deployment-on-kubernetes

https://cloud.google.com/solutions/jenkins-on-container-engine-tutorial

25

Page 26: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

Jenkins Kubernetes Plugin

The aim of the Kubernetes plugin is to be able to use a Kubernetes cluster to dynamically provision a Jenkins agent (using Kubernetes scheduling mechanisms to optimize the loads), run a single build, then tear-down that slave.

26

Page 27: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

27

Why ?

Page 28: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

pros

1. Google takes care of the scalability (almost)2. Kubernetes has already needed concepts to create a

Jenkins cluster3. Native Cluster isolation (namespaces)4. virtually unlimited (Container Auto Scaler

https://cloud.google.com/container-engine/docs/resize-cluster )

28

Page 29: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

Links

https://www.martinfowler.com/articles/continuousIntegration.html

https://www.slideshare.net/Docker/build-publish-deploy-and-test-docker-images-and-containers-with-jenkins-workflow

https://engineering.riotgames.com/news/jenkins-ephemeral-docker-tutorial

https://goto.docker.com/continuous-integration-pipeline-ty.html

http://glaforge.appspot.com/article/scale-jenkins-with-kubernetes-on-google-container-engine

29

Page 30: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

30

Questions ?

Page 31: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

Demo

Coming soon :1. Jenkins/Kubernetes/GCP 2. Jenkins/Nomad/GCP3. (vault, google iam, google Logging)

31

Page 32: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

Next session October 3th 2017

1. Retrofit 2. Semantic Web3. Kotlin4. Java Mission Control

32

Page 33: Make continuous integration scale again - Abderrazak Bouadma aux Quarter Backs SFEIR

Next

1. quarterbacks.io (cfp, slides, reports, videos …)2. @quarterbacks_io3. Quarter Backs Tour

33