39
©2014 CloudBees, Inc. All Rights Reserved From Continuous Integration To Continuous Delivery With Jenkins Cyrille Le Clerc, Solution Architect, CloudBees

From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

Embed Size (px)

DESCRIPTION

The concept of DONE have changed in project teams to evolve from “The unit tests are green” to “The software is shippable in production”. Continuous Integration mutated into Continuous Delivery and this process was no longer limited to the DEV teams but had to integrate the OPS team to cover the deployment phases of the applications. Come and discover how the Continuous Integration server Jenkins CI became the nexus of Continuous Delivery orchestrating the phases of complex Application Lifecycle processes. Discover how Jenkins is becoming the lingua franca between DEV teams and OPS teams to deliver applications faster.

Citation preview

Page 1: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

From Continuous Integration To Continuous Delivery With Jenkins Cyrille Le Clerc, Solution Architect, CloudBees

Page 2: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

About Me

Cyrille Le Clerc  

@cyrilleleclerc  

Open  Source  

CTO  

DevOps,  Infra  as  Code,  Con9nuous  Delivery  

Solu9on  Architect  

Page 3: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

About you

Dev? Ops? Maven? CI? CD? Cloud?

Page 4: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Agenda

•  Concepts:  CI,  Jenkins  and  CD  •  New  roles  for  Jenkins  –  Cross  team  – Deployment  – Workflow  

•  Great  power,  great  responsibili9es  •  Jenkins  reference  architecture  

Page 5: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Concepts

Continuous Integration

Page 6: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Continuous Integration

•  Prac9ce  of  SoIware  Engineering  •  Introduced  by  eXtreme  Programming  •  Prevent  the  “Integra9on  Hell”  •  Itera9ve  

Page 7: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Continuous Integration Principles

•  Source  code  repository  •  Automated  build  •  Self  tes9ng  build  •  Commit  to  the  baseline  every  day  

•  Build  every  commit  

•  Everybody  can  see  the  results  of  the  build  

•  Latest  deliverable  easy  to  download  

•  Fast  build  

Wikipedia  

Page 8: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Jenkins

Page 9: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Meet Jenkins… •  #1  Con9nuous  Integra9on  

and  Con9nuous  Deployment  server  

•  Java  web  applica9on    •    “java  –jar  jenkins.war”  

•  MIT-­‐licensed,  8  years  old  •  500+  releases  

jenkins-ci.org

Page 10: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

#1 Continuous Integration Tool in the Market

Source:  Eclipse  Community  Survey  2012  

Page 11: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Massive Adoption, Happy Users

•  61,000+  installa9ons  around  the  world;  +60%  in  last  year  •  700+  plugins  by  500  contributors  •  Huge  community  

87% are “very satisfied” or “satisfied”!

Page 12: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Continuous Delivery

Page 13: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Why Continuous Delivery

•  Limits  of  Con9nuous  Integra9on  •  Lean  SoIware  Manufacturing  

Page 14: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Continuous Delivery

•  “Reliable  SoAware  Releases  through  Build,  Test,  and  Deployment  AutomaJon”  

•  DONE  =  Shippable  into  Produc9on  

Page 15: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Continuous Delivery Steps

Con$

nuou

s  Delivery  

Source Code

Quality Analysis

Unit Tests

Binaries

Page 16: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

DEV

DEV

OPS

QA

Continuous Delivery Steps

Con$

nuou

s  Delivery  

Source Code

Quality Analysis

Unit Tests

Binaries

Perfs Environment

Func Test Environment

UAT Environment

Production Environment

GO LIVE!

Release!

Staging Environment

Page 17: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Jenkins: pillar of Continuous Delivery

•  Connect  the  dots  

•  It  is  the  process  

Page 18: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

New Roles for Jenkins

•  Cross  team  pla_orm  •  Deployment  automa9on  

–  App,  dataset  …  environment  provisioning  •  Test  automa9on:  load  test,  acceptance  test  …  •  Release  management  •  Workflow  

Jenkins  as  an  Applica9on  Lifecycle  Management  pla_orm  

Page 19: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Cross Team Platform

•  Not  only  used  by  DEV  but  also  QA  and  OPS  •  Various  profiles  and  skills  •  Mission  Cri9cal  

Page 20: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Deployment Automation

•  Same  tools  and  automa9ons  on  all  the  environments  

xxx Environment

xxx Environment

•  Deploy  app,  dataset  …  •  Plugins  ecosystem  

Page 21: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Test Automation

•  Powered  by  Jenkins  ecosystem  •  Requires  full  environment  setup  (app,  dataset)  

Page 22: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Release Management

•  Not  only  “mvn release:prepare release:perform”  

•  Includes  QA  valida9on,  Staging  …  

•  “Jenkins'  Maven  job  type  considered  evil”  S.  Connolly    

Page 23: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Workflow

Choreograph  ac9vi9es  that  are  …  •  complex  •  long-­‐running  •  not  sequen9al  •  pausable  •  retryable  

Page 24: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Great power, great responsibilities

Cross  team  collabora9on  pla_orm:  •  High  Availability  and  SLAs  •  Security  

Page 25: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

High Availability and SLAs

•  Jumbo  Jenkins  masters  are  fragile  –  Mul9ple  medium  sized  Jenkins  masters  

•  Careful  version  upgrades  –  Tes9ng  environment  +  Jenkins  &  plugins  version  control  

•  Support  •  It’s  not  an  open  bar,  security  

Jenkins  Opera9ons  Center  (JOC)  

Enterprise  Update  Center  +  JOC    

Professional  support  

Page 26: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Security

•  Authen9ca9on  •  Audit  •  Role  Base  Access  Control  

Page 27: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Jenkins Reference Architecture

Page 28: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Multiple Medium Sized Masters Jenkins Enterprise Master-1

Jenkins Enterprise Master-N

JenkinsEnterpriseMaster-N

JenkinsEnterpriseMaster-1

Page 29: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Master Slave Setup Jenkins Enterprise Master-1

Jenkins Enterprise Master-N

JenkinsEnterpriseMaster-N

JenkinsEnterpriseMaster-1

Master-1 BuildNodes

Master-N BuildNodes

Page 30: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

High Availability Jenkins Enterprise Master-1

Jenkins Enterprise Master-N

HA Proxy

JenkinsEnterpriseMaster-N

JenkinsEnterpriseMaster-1

HA Proxy

NAS Storage

NAS Storage

backup

backup

Page 31: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Manage Multiple Masters

Jenkins Enterprise Master-N

Jenkins Enterprise Master-1

Jenkins Operations Center

JenkinsOperations

Center (JOC)

config

configJenkins

EnterpriseMaster-N

JenkinsEnterpriseMaster-1

Master-1 BuildNodes

Master-N BuildNodes

Page 32: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Shared Build Nodes Jenkins Enterprise Master-1

Jenkins Operations Center

Shared BuildNodes

Jenkins Enterprise Master-N

JenkinsEnterpriseMaster-N

Master-1 BuildNodes

JenkinsOperations

Center (JOC)

JenkinsEnterpriseMaster-1

confi

g

config

Page 33: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Testing Environment Jenkins Enterprise Master-1

Jenkins Enterprise Master-N

Jenkins Operations Center

JenkinsEnterpriseMaster-NJenkins

OperationsCenter (JOC)

Jenkins Enterprise Test Environment

JenkinsEnterprise

Test

JenkinsEnterpriseMaster-1

config

config

config

Page 34: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Global Security Jenkins Enterprise Master-1

Jenkins Enterprise Master-N

Jenkins Operations Center

JenkinsEnterpriseMaster-N

Role Based AccessControl Plugin

HA Proxy

DEV BuildNodes

HA Proxy

JenkinsOperations

Center (JOC)

Jenkins Enterprise Test Environment

JenkinsEnterprise

Test

HA Proxy

JenkinsEnterpriseMaster-1

Access masters

HA Proxy

Security config pushed to masters

confi

g

config

config

Security config pushed to masters

LDAP…

audit

audit

audit

audit

Page 35: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Unified Navigation and SSO

Jenkins Enterprise Test Environment

JenkinsEnterprise

TestHA Proxy

Jenkins Enterprise Master-1

HA Proxy JenkinsEnterpriseMaster-1

Jenkins Operations Center

JenkinsOperations

Center (JOC)HA Proxy

config

config

config

Jenkins Enterprise Master-N

HA Proxy

JenkinsEnterpriseMaster-N

http://master-1.jenkins.mycie.com

http://test.jenkins.mycie.com

…http://master-n.jenkins.mycie.com

http://joc.jenkins.mycie.com

Acce

ss m

aste

rs (S

SO)

Page 36: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Update Centers Jenkins Enterprise Master-1

Jenkins Enterprise Master-N

Jenkins Operations Center

Master-1 UpdateCenter

JenkinsEnterpriseMaster-NUpdate

CenterJenkins

OperationsCenter (JOC)

Jenkins Enterprise Test Environment

JenkinsEnterprise

Test

Master-1Test UpdateCenter

Test UpdateCenter

Promote plugins

Master specific Update CenterJenkins

EnterpriseMaster-1

confi

g

config

config

Internet

UpdateCenter

http://jenkins-ci.org

Page 37: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Jenkins Reference Architecture Jenkins Enterprise Master-1

Jenkins Enterprise Master-N

Jenkins Operations Center

Shared BuildNodes

UpdateCenter Jenkins

EnterpriseMaster-N

Role Based AccessControl Plugin

Master-1 UpdateCenter

HA Proxy

Master-1 BuildNodes

HA Proxy

JenkinsOperations

Center (JOC)

Jenkins Enterprise Test Environment

JenkinsEnterprise

TestHA Proxy

Master-1 Test UpdateCenter

Test UpdateCenter

Promote plugins

Master specific Update CenterJenkins

EnterpriseMaster-1

Access masters (SSO)

HA Proxy

Security config pushed to masters

confi

g

config

config

LDAP …

DEV, QA, OPS, admins

Page 38: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved

Continuous Delivery is

•  People  •  Process  •  Tools  

Page 39: From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014

©2014 CloudBees, Inc. All Rights Reserved