Más contenido relacionado La actualidad más candente (20) Similar a From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 2014 (20) From Continuous Integration to Continuous Delivery with Jenkins - javaland.de 20141. ©2014 CloudBees, Inc. All Rights Reserved
From Continuous Integration
To Continuous Delivery
With Jenkins
Cyrille Le Clerc, Solution Architect, CloudBees
2. ©2014 CloudBees, Inc. All Rights Reserved
About Me
Cyrille Le Clerc
@cyrilleleclerc
Open
Source
CTO
DevOps,
Infra
as
Code,
Con9nuous
Delivery
Solu9on
Architect
4. ©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
6. ©2014 CloudBees, Inc. All Rights Reserved
Continuous Integration
• Prac9ce
of
SoIware
Engineering
• Introduced
by
eXtreme
Programming
• Prevent
the
“Integra9on
Hell”
• Itera9ve
7. ©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
9. ©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
10. ©2014 CloudBees, Inc. All Rights Reserved
#1 Continuous Integration Tool in the Market
Source:
Eclipse
Community
Survey
2012
11. ©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”!
13. ©2014 CloudBees, Inc. All Rights Reserved
Why Continuous Delivery
• Limits
of
Con9nuous
Integra9on
• Lean
SoIware
Manufacturing
14. ©2014 CloudBees, Inc. All Rights Reserved
Continuous Delivery
• “Reliable
SoAware
Releases
through
Build,
Test,
and
Deployment
AutomaJon”
• DONE
=
Shippable
into
Produc9on
15. ©2014 CloudBees, Inc. All Rights Reserved
Continuous Delivery Steps
Con$nuous
Delivery
Source Code
Quality Analysis
Unit Tests
Binaries
16. ©2014 CloudBees, Inc. All Rights Reserved
DEV
DEV
OPS
QA
Continuous Delivery Steps
Con$nuous
Delivery
Source Code
Quality Analysis
Unit Tests
Binaries
Perfs Environment
Func Test Environment
UAT Environment
Production Environment
GO LIVE!
Release!
Staging Environment
17. ©2014 CloudBees, Inc. All Rights Reserved
Jenkins: pillar of Continuous Delivery
• Connect
the
dots
• It
is
the
process
18. ©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
19. ©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
20. ©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
21. ©2014 CloudBees, Inc. All Rights Reserved
Test Automation
• Powered
by
Jenkins
ecosystem
• Requires
full
environment
setup
(app,
dataset)
22. ©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
23. ©2014 CloudBees, Inc. All Rights Reserved
Workflow
Choreograph
ac9vi9es
that
are
…
• complex
• long-‐running
• not
sequen9al
• pausable
• retryable
24. ©2014 CloudBees, Inc. All Rights Reserved
Great power, great responsibilities
Cross
team
collabora9on
pla_orm:
• High
Availability
and
SLAs
• Security
25. ©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
28. ©2014 CloudBees, Inc. All Rights Reserved
Multiple Medium Sized Masters
Jenkins Enterprise Master-1
Jenkins Enterprise Master-N
Jenkins
Enterprise
Master-N
Jenkins
Enterprise
Master-1
…
29. ©2014 CloudBees, Inc. All Rights Reserved
Master Slave Setup
Jenkins Enterprise Master-1
Jenkins Enterprise Master-N
Jenkins
Enterprise
Master-N
Jenkins
Enterprise
Master-1
…
Master-1 Build
Nodes
Master-N Build
Nodes
30. ©2014 CloudBees, Inc. All Rights Reserved
High Availability
Jenkins Enterprise Master-1
Jenkins Enterprise Master-N
HA Proxy
Jenkins
Enterprise
Master-N
Jenkins
Enterprise
Master-1
HA Proxy
NAS Storage
NAS Storage
backup
backup
…
31. ©2014 CloudBees, Inc. All Rights Reserved
Manage Multiple Masters
Jenkins Enterprise Master-N
Jenkins Enterprise Master-1
Jenkins Operations Center
Jenkins
Operations
Center (JOC)
config
config
Jenkins
Enterprise
Master-N
Jenkins
Enterprise
Master-1
…
Master-1 Build
Nodes
Master-N Build
Nodes
32. ©2014 CloudBees, Inc. All Rights Reserved
Shared Build Nodes
Jenkins Enterprise Master-1
Jenkins Operations Center
Shared Build
Nodes
Jenkins Enterprise Master-N
Jenkins
Enterprise
Master-N
Master-1 Build
Nodes
Jenkins
Operations
Center (JOC)
Jenkins
Enterprise
Master-1
config
config
…
33. ©2014 CloudBees, Inc. All Rights Reserved
Testing Environment Jenkins Enterprise Master-1
Jenkins Enterprise Master-N
Jenkins Operations Center
Jenkins
Enterprise
Master-NJenkins
Operations
Center (JOC)
Jenkins Enterprise Test Environment
Jenkins
Enterprise
Test
Jenkins
Enterprise
Master-1
config
config
config
…
34. ©2014 CloudBees, Inc. All Rights Reserved
Global Security Jenkins Enterprise Master-1
Jenkins Enterprise Master-N
Jenkins Operations Center
Jenkins
Enterprise
Master-N
Role Based Access
Control Plugin
HA Proxy
DEV Build
Nodes
HA Proxy
Jenkins
Operations
Center (JOC)
Jenkins Enterprise Test Environment
Jenkins
Enterprise
Test
HA Proxy
Jenkins
Enterprise
Master-1
Access masters
HA Proxy
Security config pushed to masters
config
config
config
Security config pushed to masters
LDAP
…
audit
audit
audit
audit
35. ©2014 CloudBees, Inc. All Rights Reserved
Unified Navigation and SSO
Jenkins Enterprise Test Environment
Jenkins
Enterprise
Test
HA Proxy
Jenkins Enterprise Master-1
HA Proxy Jenkins
Enterprise
Master-1
Jenkins Operations Center
Jenkins
Operations
Center (JOC)
HA Proxy
config
config
config
Jenkins Enterprise Master-N
HA Proxy
Jenkins
Enterprise
Master-N
http://master-1.jenkins.mycie.com
http://test.jenkins.mycie.com
…
http://master-n.jenkins.mycie.com
http://joc.jenkins.mycie.com
Accessmasters(SSO)
36. ©2014 CloudBees, Inc. All Rights Reserved
Update Centers
Jenkins Enterprise Master-1
Jenkins Enterprise Master-N
Jenkins Operations Center
Master-1 Update
Center
Jenkins
Enterprise
Master-NUpdate
Center
Jenkins
Operations
Center (JOC)
Jenkins Enterprise Test Environment
Jenkins
Enterprise
Test
Master-1Test Update
Center
Test Update
Center
Promote plugins
Master specific Update Center
Jenkins
Enterprise
Master-1
config
config
config
Internet
Update
Center
http://jenkins-ci.org
…
37. ©2014 CloudBees, Inc. All Rights Reserved
Jenkins Reference Architecture
Jenkins Enterprise Master-1
Jenkins Enterprise Master-N
Jenkins Operations Center
Shared Build
Nodes
Update
Center Jenkins
Enterprise
Master-N
Role Based Access
Control Plugin
Master-1 Update
Center
HA Proxy
Master-1 Build
Nodes
HA Proxy
Jenkins
Operations
Center (JOC)
Jenkins Enterprise Test Environment
Jenkins
Enterprise
Test
HA Proxy
Master-1 Test Update
Center
Test Update
Center
Promote plugins
Master specific Update Center
Jenkins
Enterprise
Master-1
Access masters (SSO)
HA Proxy
Security config pushed to masters
config
config
config
LDAP
…
DEV, QA, OPS, admins