Continuous Delivery with Jenkins Enterprise and IBM UrbanCode Deploy
- 1. ©2015 CloudBees, Inc. and IBM All Rights Reserved 1©2015 CloudBees, Inc. and IBM All Rights Reserved
Continuous Delivery with Jenkins
Enterprise and UrbanCode Deploy
Kohsuke Kawaguchi / CTO, CloudBees, Inc.
- kk@kohsuke.org / @kohsukekawa
Eric Minick / Release Automation Product Manager, IBM
- eminick@us.ibm.com / @EricMinick
- 2. ©2015 CloudBees, Inc. and IBM All Rights Reserved 2
Ground Rules
We’re all friends today!
Do you also compete in some circumstances?
Do you integrate with the other’s competitors?
Don’t you overlap in some way?
Valid questions
we won’t discuss today
- 5. ©2015 CloudBees, Inc. and IBM All Rights Reserved 5
Infrastructure as Code
IaaS
PaaS
Automated Testing
- 11. ©2015 CloudBees, Inc. and IBM All Rights Reserved 11
0
500,000
1,000,000
1,500,000
2,000,000
2,500,000
3,000,000
3,500,000
4,000,000
Number of Jobs
- 12. ©2015 CloudBees, Inc. and IBM All Rights Reserved 12
0
500,000
1,000,000
1,500,000
2,000,000
2,500,000
3,000,000
3,500,000
4,000,000
Number of Jobs
- 24. ©2015 CloudBees, Inc. and IBM All Rights Reserved 24
Traceability with Puppet/Chef
Dev
Ops
Traceability to the checkin
Traceability to the deployment
Traceability to the machine
- 25. ©2015 CloudBees, Inc. and IBM All Rights Reserved 25
Host that runs Docker
Jenkins + Docker = elastic build slave
- 26. ©2015 CloudBees, Inc. and IBM All Rights Reserved 26
Host that runs Docker
Jenkins + Docker = elastic build slave
- 27. ©2015 CloudBees, Inc. and IBM All Rights Reserved 27
Host that runs Docker
Jenkins + Docker = elastic build slave
- 28. ©2015 CloudBees, Inc. and IBM All Rights Reserved 28
Jenkins + Git = validated merge
• No more broken builds
• Improve developer efficiency
• Run tests more efficiently
upstream
repo
gate
repo
- 29. ©2015 CloudBees, Inc. and IBM All Rights Reserved 29
Jenkins & UrbanCode Deploy
• Push artifacts as new component version
urbancode
deploy
v1.0.${BUILD_NUMBER}
- 30. ©2015 CloudBees, Inc. and IBM All Rights Reserved 30
Jenkins & UrbanCode Deploy
• Trigger a process
urbancode
deploy
- 31. ©2015 CloudBees, Inc. and IBM All Rights Reserved 31
Jenkins & UrbanCode Deploy
• Lots of options to compose them
– single linear pipeline
– build promotion
• “thumbs up” based approach
• For example,
– Build, unit test, and deploy automatically
– Allow someone to put “a thumb up” on a build
– Automatically trigger deployment to UAT
– Ops can use UC Deploy to push it into prod
- 34. ©2015 CloudBees, Inc. and IBM All Rights Reserved 34
Build Promotion Illustration
Foo #5
FooTest #10
BarTest #16
- 35. ©2015 CloudBees, Inc. and IBM All Rights Reserved 35
Build Promotion Illustration
Foo #5
FooTest #10
BarTest #16
- 36. ©2015 CloudBees, Inc. and IBM All Rights Reserved 36
Build Promotion Illustration
Foo #5
FooTest #10
BarTest #16
FooIntTest #9
- 37. ©2015 CloudBees, Inc. and IBM All Rights Reserved 37
Build Promotion Illustration
Foo #5
FooTest #10
BarTest #16
FooIntTest #9
FooIntTest #10
- 38. ©2015 CloudBees, Inc. and IBM All Rights Reserved 38
Build Promotion Illustration
Foo #5
FooTest #10
BarTest #16
FooIntTest #9
FooIntTest #10
- 39. ©2015 CloudBees, Inc. and IBM All Rights Reserved 39
Build Promotion Illustration
Foo #5
FooTest #10
BarTest #16
FooIntTest #9
FooIntTest #10
Deploy #19
- 41. ©2015 CloudBees, Inc. and IBM All Rights Reserved 41http://www.flickr.com/photos/81305097@N00/370896570/
- 45. ©2015 CloudBees, Inc. and IBM All Rights Reserved 45
r10k + puppet enterprise
Every branch automatically
becomes environment
- 46. ©2015 CloudBees, Inc. and IBM All Rights Reserved 46
Two key branches & environments
‘staging’ branch
‘production’ branch
- 47. ©2015 CloudBees, Inc. and IBM All Rights Reserved 47http://commons.wikimedia.org/wiki/File:Close_up_of_Hand_Cut_Jigsaw_Puzzle.JPG
- 48. ©2015 CloudBees, Inc. and IBM All Rights Reserved 48http://www.flickr.com/photos/81305097@N00/370896570/
- 50. ©2015 CloudBees, Inc. and IBM All Rights Reserved 50
Workflow as code
node {
workspace {
git(url: ‘http://server/myapp.git’)
for ( i in 0..<10)
sh ‘mvn test –Dsuite=${i}’
}
}
- 51. ©2015 CloudBees, Inc. and IBM All Rights Reserved 51
More reasons why we like buildflow
• Rich control flow
• Rich abstractions
• Meaningful diff
- 52. ©2015 CloudBees, Inc. and IBM All Rights Reserved 52
Leap: one place for everything
• Not just calling other jobs
• Check out source code
• Fork processes
• Archive artifacts
• …
- 75. ©2015 CloudBees, Inc. and IBM All Rights Reserved 75
As the usage grows:
Jenkins Enterprise by CloudBees
Professional support
High availability
Large installations
Security
Optimized utilization
- 76. ©2015 CloudBees, Inc. and IBM All Rights Reserved 76
Conclusions
• More and more integrations
• Non-prescriptive approach for the win
• Many successful CD pipelines with Jenkins
• Workflow ties them all together
- 78. ©2015 CloudBees, Inc. and IBM All Rights Reserved 78
“Classic” CD
build
dev
test
system
test
UAT sign-off staging prod
- 79. ©2015 CloudBees, Inc. and IBM All Rights Reserved 79
Enterprise Challenges
?
Complex Systems
have many parts
many specialists and
teams too
Image credit: https://www.flickr.com/photos/billward/155440416
- 81. ©2015 CloudBees, Inc. and IBM All Rights Reserved 81
Composite apps: many tiers & components
An Application might have
dozens of components
- 82. ©2015 CloudBees, Inc. and IBM All Rights Reserved 82
Composite apps: many tiers & components
An Application might have
dozens of components
Delivered by Different Teams
- 83. ©2015 CloudBees, Inc. and IBM All Rights Reserved 83
Composite apps: many tiers & components
Which build does “Login” test?
- 84. ©2015 CloudBees, Inc. and IBM All Rights Reserved 84
Build pipelines in composite applications
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
build
dev
test
system
test
UAT sign-off staging prod
- 85. ©2015 CloudBees, Inc. and IBM All Rights Reserved 85
These people
deploy one build
at a time to prod
88% Deploy More than one
build to production a time
√
√
√
- 86. ©2015 CloudBees, Inc. and IBM All Rights Reserved 86
Key “Gotchas”
• Related stuff is deployed / released together
• Some of it isn’t built
• Some of it is incremental
Man… Databases,
content, middleware
config are a pain
- 87. ©2015 CloudBees, Inc. and IBM All Rights Reserved 87
The Plan!
• Continuous Delivery Overview
• Jenkins is awesome
• What’s new in Enterprise Jenkins
• Deployment “gotchas” for CD
• UrbanCode Deploy is awesome
• What’s new in UrbanCode Deploy
• The integrated scenario
- 88. ©2015 CloudBees, Inc. and IBM All Rights Reserved 88
Intuitive and Scalable Model Driven Deployment
Composite Applications
Components
Re-usable Processes
Environment
Management
SIT
PROD
The “What”
The “How”
The “Where”
Deployment
Automation
- 89. ©2015 CloudBees, Inc. and IBM All Rights Reserved 89
Components:
- Individual deployable projects
Application:
- A complete collection of components
- Describes inter-component dependencies
Applications are made of Components
- 90. ©2015 CloudBees, Inc. and IBM All Rights Reserved 90
Application Deployments made of Component
Deployments
Application Process
- Orchestrate deployment of many components
- Represents deploy-time dependencies
Component Process
- How to deploy a thing to a target
Drag-and-Drop Workflow Designer
Processes are Versioned with Change Logs
Create Custom Steps
- 91. ©2015 CloudBees, Inc. and IBM All Rights Reserved 91
Snapshots promote tested versions ….
• Manage a set of tested component versions as a single unit
• Guarantee the validated versions of related components are
deployed together
• Ease of promoting applications between environments
1
1
2
3
UAT Stage PROD
Promote Promote
Web
Mid. Code
Mid. Config
DB
Snapshot
- 92. ©2015 CloudBees, Inc. and IBM All Rights Reserved 92
The Plan!
• Continuous Delivery Overview
• Jenkins is awesome
• What’s new in Enterprise Jenkins
• Deployment “gotchas” for CD
• UrbanCode Deploy is awesome
• What’s new in UrbanCode Deploy
• The integrated scenario
- 94. ©2015 CloudBees, Inc. and IBM All Rights Reserved 94
Lots of new integrations
94
developer.ibm.com / urbancode / plugins
- 95. ©2015 CloudBees, Inc. and IBM All Rights Reserved 95
Dev/Test with Hybrid Cloud
95
Off-PremOn-Prem
Image Registry
IBM Bluemix
IBM UrbanCode Deploy
PRODSTAGING
- 96. ©2015 CloudBees, Inc. and IBM All Rights Reserved 96
The Plan!
• Continuous Delivery Overview
• Jenkins is awesome
• What’s new in Enterprise Jenkins
• Deployment “gotchas” for CD
• UrbanCode Deploy is awesome
• What’s new in UrbanCode Deploy
• The integrated scenario
- 97. ©2015 CloudBees, Inc. and IBM All Rights Reserved 97
Plugin to push files / trigger deploys
Jenkins can Easily:
• Tell UC Deploy about
new versions
• Trigger deployments to
dev and test
environments
Use Workflow to promote
through independent
testing environments.
- 98. ©2015 CloudBees, Inc. and IBM All Rights Reserved 98
On build completion, Jenkins
publishes the latest artifacts
to UrbanCode Deploy and
deployed to a development
or SIT environment.
After deployment,
automated tests are started.
If they pass, we mark the
tested versions as such.
Before any
deployments to
production, manual
approvals are
required.
The exact combination of
component versions which
passed tests is captured in a
snapshot.
Putting it all together – Continuous Delivery
The “What”
The “Where”
The “How”
- 99. ©2015 CloudBees, Inc. and IBM All Rights Reserved 99©2015 CloudBees, Inc. and IBM All Rights Reserved
Questions?
Kohsuke Kawaguchi / CTO, CloudBees, Inc.
- kk@kohsuke.org / @kohsukekawa
Eric Minick / Release Automation Product Manager, IBM
- eminick@us.ibm.com / @EricMinick