journée devops : de l'intégration continue au déploiement continu avec jenkins
DESCRIPTION
Vous n'avez pas pu assister à la journée DevOps by Xebia ? Voici la présentation de Cyrille Le Clerc (Cloudbees) et Geoffroy Warrin (Xebia) : "De l'intégration continue au déploiement continu avec Jenkins"TRANSCRIPT
©2014 CloudBees, Inc. All Rights Reserved
From CI to CD with Jenkins Cyrille Le Clerc, Product Management, CloudBees Geoffroy Warin, Xebia
©2014 CloudBees, Inc. All Rights Reserved
/me
Cyrille Le Clerc
@cyrilleleclerc
Open Source
CTO
DevOps, Infra as Code, ConEnuous Delivery
Product Manager
©2014 CloudBees, Inc. All Rights Reserved
/me
Geoffroy Warin
@geowarin Développeur
@geowarin
CraHsmanship
©2014 CloudBees, Inc. All Rights Reserved
/you
Dev? Ops? CI? Maven? CD?
©2014 CloudBees, Inc. All Rights Reserved
Agenda
• Concepts: CI, Jenkins and CD • New roles for Jenkins
– Cross team – Deployment – Workflow
• Great power, great responsibiliEes
©2014 CloudBees, Inc. All Rights Reserved
Concepts
Continuous Integration
©2014 CloudBees, Inc. All Rights Reserved
Continuous Integration
• PracEce of SoHware Engineering • Introduced by eXtreme Programming • Prevent the “IntegraEon Hell” • IteraEve
©2014 CloudBees, Inc. All Rights Reserved
/you
What is Continuous Integration?
©2014 CloudBees, Inc. All Rights Reserved
Continuous Integration Principles
• Source code repository • Automated build • Self tesEng 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
©2014 CloudBees, Inc. All Rights Reserved
Jenkins
©2014 CloudBees, Inc. All Rights Reserved
CloudBees & Jenkins
• Premier provider of Jenkins services and support
• Java PaaS
• CEO: Sacha Labourey • CTO: Kohsuke Kawaguchi
©2014 CloudBees, Inc. All Rights Reserved
Meet Jenkins…
• #1 ConEnuous IntegraEon and ConEnuous Deployment server
• Java web applicaEon
“java –jar jenkins.war”
• MIT-‐licensed, 8 years old
• 500+ releases
jenkins-ci.org
©2014 CloudBees, Inc. All Rights Reserved Source: 2012 Jenkins Survey
©2014 CloudBees, Inc. All Rights Reserved
#1 Continuous Integration Tool in the Market
14,2%
21,8%
15,7%
50,4%
28,3%
16,0%
32,2%
16,0%
32,2%
48,2%
30,8%
2,3%
6,0%
5,1%
11,6%
7,1%
10,1%
20,1%
15,3%
29,8%
50,8%
42,3%
4,5%
6,1%
6,2%
6,5%
8,0%
9,7%
10,9%
12,7%
16,7%
35,3%
38,3%
41,3%
Gradle Other (specify)
CMake PDE Build
Custom/in-‐house Tycho
Sonatype Nexus Hudson Make
Jenkins Ant
Maven
What build and release management products do you typically use? (Select all that apply.)
2013
2012
2011
2010
©2014 CloudBees, Inc. All Rights Reserved
Massive Adoption
• 61,000+ installaEons around the world; +60% in last year • 700+ plugins by 500 contributors • Huge community
©2014 CloudBees, Inc. All Rights Reserved
Continuous Delivery
Visualizations are a courtesy of Nhan Ngo, Spotify Available on countinuousdelivery.com under Creative license
©2014 CloudBees, Inc. All Rights Reserved
Reliable Software Releases through
Build, Test, and Deployment
Automation
©2014 CloudBees, Inc. All Rights Reserved
Continuous Delivery
©2014 CloudBees, Inc. All Rights Reserved
Feedback
©2014 CloudBees, Inc. All Rights Reserved
Continuous Delivery – Martin Fowler
ü Your software is deployable throughout its lifecycle ü Prioritize deployable software over new features ü Fast, automated feedback on the product readiness ü Push-button deployments of any version of the software to any environment
on demand
Contact :
Benoit Moussaud Technical Director Southern Europe
©2014 CloudBees, Inc. All Rights Reserved
Continuous Integration Steps
Con@
nuou
s Delivery
Source Code
Quality Analysis
Unit Tests
Binaries
©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
©2014 CloudBees, Inc. All Rights Reserved
Jenkins: Hub of Continuous Delivery
• Connect the dots
• It is the process
©2014 CloudBees, Inc. All Rights Reserved
New Roles for Jenkins
• Cross team plaiorm • Deployment automaEon
– App, dataset … environment provisioning • Test automaEon: load test, acceptance test … • Release management • Workflow
Jenkins as an ApplicaEon Lifecycle Management plaiorm
©2014 CloudBees, Inc. All Rights Reserved
Cross Team Platform
• Not only used by DEV but also QA and OPS
• Various profiles and skills
• Mission CriEcal
©2014 CloudBees, Inc. All Rights Reserved
Deployment Automation
• Same tools and automaEons on all the environments
xxx Environment
xxx Environment
• Deploy app, dataset … • Plugins ecosystem
©2014 CloudBees, Inc. All Rights Reserved
Test Automation
• Powered by Jenkins ecosystem
• Requires full environment setup (app, dataset)
©2014 CloudBees, Inc. All Rights Reserved
Brian Marick
©2014 CloudBees, Inc. All Rights Reserved
Release Management
• Not only “mvn release:prepare release:perform”
• Includes QA validaEon, Staging …
• “Jenkins' Maven job type considered evil” S. Connolly
©2014 CloudBees, Inc. All Rights Reserved
Workflow
Nightly Build
Unit Tests
Perfs Tests
Selenium Tests Deploy to UAT
Sonar Analysis
©2014 CloudBees, Inc. All Rights Reserved
Workflow
Choreograph acEviEes that are … • complex • long-‐running • not sequenEal • pausable • retryable
©2014 CloudBees, Inc. All Rights Reserved
Workflow
Today
• Build Flow Plugin
• Build Pipeline Plugin
• Build Delivery Pipeline
©2014 CloudBees, Inc. All Rights Reserved
Workflow
©2014 CloudBees, Inc. All Rights Reserved
Jenkins Workflow Plugin
• Engine is Open Source • Should become a de-‐facto standard for CD • Groovy DSL • 1 single job to replace mulEple atomic jobs • Intended for graphical visualizaEon and value-‐added extensions
• SomeEmes in 2014
©2014 CloudBees, Inc. All Rights Reserved
Great power, great responsibilities
Cross team collaboraEon plaiorm:
• High Availability and SLAs
• Security
©2014 CloudBees, Inc. All Rights Reserved
High Availability and SLAs
• Jumbo Jenkins masters are fragile – MulEple medium sized Jenkins masters
• Careful version upgrades – TesEng environment + Jenkins & plugins version control
• Support • It’s not an open bar, security
Jenkins OperaEons Center (JOC)
Enterprise Update Center + JOC
Professional support
©2014 CloudBees, Inc. All Rights Reserved
Security
• AuthenEcaEon
• Audit
• Role Base Access Control
Jenkins OperaEons Center (JOC)
Jenkins Enterprise by CloudBees
©2014 CloudBees, Inc. All Rights Reserved
Continuous Delivery is
• People • Process • Tools
©2014 CloudBees, Inc. All Rights Reserved