continuous delivery from the trenches
TRANSCRIPT
CONTINOUSDELIVERY
Community
Learning & fun
Once per month
Platform X
Broadcast
Selling Things
What can I contribute with
to the group
Which Topic (1) is the most interesting
#1:The history
waterfallRequirements
Specification
Build
Test
Deliver
Done
AGILE
RESCUEto the
Gather Requirements
Write Specification
Build softwareTest software
Deliver Software
Acceptance Test
Agile
Frontend
Business logic
Backend
3-tier
Gather Requirements
Write Specification
Build softwareTest software
Deliver Software
Acceptance Test
…but how?
Frontend
Business logic
Backend
waterfalls
Gather Requirements
Write Specification
Build softwareTest software
Deliver Software
Acceptance Test
projects
not code
Automation for
INTEGRATIONCONTINUOUS
RESCUEto the
Code
IntegrateBuild
Test
INTEGRATIONCONTINUOUS
complexity++
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
complexity++DEV
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
DEV2
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
TEST
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
AT
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
ST
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
PRE PROD
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
PROD
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
ST
WEB/APP
DB
WEB/APP WEB/APP
LB
APPESB
Code
IntegrateBuild
Test
…but how?
Development
Installation
Testing
waterfalls
Code
IntegrateBuild
Test
code
not systems
Automation for
DELIVERYCONTINUOUS
RESCUEto the
Code
Integrate
Build
Unit-test
Deploy
Acceptance/Integration
test
Release
DELIVERYCONTINUOUS
SAP
.NET Oracle
Java
distributed
Code
Integrate
Build
Unit-test
Deploy
Acceptance/Integration
test
Release
…but how?
Code
Integrate
Build
Unit-test
Deploy
Acceptance/Integration
test
Release Code
Integrate
Build
Unit-test
Deploy
Acceptance/Integration
test
Release
Code
Integrate
Build
Unit-test
Deploy
Acceptance/Integration
test
ReleaseCode
Integrate
Build
Unit-test
Deploy
Acceptance/Integration
test
Release
.NET Oracle
JavaSAP
waterfalls
Code
Integrate
Build
Unit-test
Deploy
Acceptance/Integration
test
Release
systems
not enterprise
Automation for
Why do we love waterfalls?
Are waterfalls bad?
#2:The light
reproducibilityis key
humans=
failure
robots=
success
pirates!
Tools centric
Jenkins
Deploy button
500 services
500 buttons
JenkinsAutomation
Jenkins a.k.a. Hudson © 2005
Subversion 1.0: 2004-02-23
Jenkins:cron + web
in 2005
everything!Automation
Not just deploy and test
There are many tools
But the tool isirrelevant
CD is not a tool
CD is areligion
automationis the light
there is no toolSO…
there is a recipe
find your pain
#1
fix the pain
#2
reach enlightened
#3
goto #1
#4
1:find the pain
2:fix the pain
3:reach enlightenment
4:goto #1
The recipe
give me a tool%&!#¤?$%&
Jenkinsis fine…
Many modern options
But remember the glue
Deploy button
Start small
1:find the pain
2:fix the pain
3:reach enlightenment
4:goto #1
The recipe
That really really hurts
no big bangs
riskyDon’t fix what’s not broken
expensiveIf you are not saving money:
your spending it
stupidremember waterfalls?
Easy: right?
What is the real problem?
Is CI/CD a religion?
#3:The People
Placeholder for Mats Slides
#4:The Map
ARTIFACTS
CONFIG
DEVELOP TEST/VER/PROD
• The world changes• Separate build from deploy• Archive• Write once only (immutable)
ARTIFACTS
CONFIG
DEVELOP TEST/VER/PROD
• First class citizens• History• Audit• Roll back/revert• Public knowledge
ARTIFACTS
CONFIG
DEVELOP
ARTIFACTS
CONFIG
FrameworksGenerate Code
• Enforce standard patterns• From zero to “done” instantly• Quick on boarding• Easy refactoring• Quick development
ARTIFACTS
CONFIG
FrameworksGenerate Code
VERSION CONTROL
• Branching strategy (gitflow)• Version strategy (maven)• Easy access (web-ui)• Distributed (git)• Feature commits
ARTIFACTS
CONFIG
Build CodeFrameworksGenerate Code
VERSION CONTROL
• Standard tools (maven/ant)• Convention over configuration (the maven way)• Command Line• No configuration• No “installation”
ARTIFACTS
CONFIG
Test CodeBuild CodeFrameworksGenerate Code
VERSION CONTROL
• Unit test• Whenever possible• Black-box testing• Some “online testing”• Remember usability (auto update)
ARTIFACTS
CONFIG
Release Code
Test CodeBuild CodeFrameworksGenerate Code
VERSION CONTROL
• One liner (release.py)• Manage dependencies (maven)• Manage versions (maven)• Manage version control (git)• Push to Artifact (maven)• Rollback on failure (release branch)
ARTIFACTS
CONFIG
Release Code
Test CodeBuild CodeFrameworksGenerate Code
Edit Code
VERSION CONTROL
• Editor agnostic• No configuration• No magic
ARTIFACTS
CONFIG
Release Code
Test CodeBuild CodeFrameworksGenerate Code
Edit Code
VERSION CONTROL
Review Code
• Not to enforce policies• For education only• Everyone should review• “Pair programming”
ARTIFACTS
CONFIG
Release Code
Update Config
Test CodeBuild CodeFrameworksGenerate Code
Edit Code
VERSION CONTROL
Review Code• Version controlled (git)• Easy to edit/compare (web)• Connected to artifacts• Self documented
ARTIFACTS
CONFIG
Release Code
Update Config
Test CodeBuild CodeFrameworksGenerate Code
Create BOM
Edit Code
VERSION CONTROL
Review Code
• Simple text files (Bill of Material)• From comparing state (web)• From development• Describes state• Goes back and forwards
ARTIFACTS
CONFIG
Release Code
Update Config
Test CodeBuild CodeFrameworksGenerate Code
Create BOM
Create Ticket
Edit Code
VERSION CONTROL
Review Code
• Work order• Describes why and what• When approved: done• Contains logs• Self service deploy
ARTIFACTS
CONFIG
Release Code
Update Config
Test CodeBuild CodeFrameworksGenerate Code
Create BOM
Create Ticket
Edit Code
VERSION CONTROL
Review CodeAUTOMATED
ARTIFACTS
CONFIG
Release Code
Update Config
Test CodeBuild CodeFrameworksGenerate Code
Create BOM
Create Ticket
Edit Code
VERSION CONTROL
Review CodeAUTOMATED
SELF SERVICE PORTAL
ARTIFACTS
CONFIG
TEST/VER/PROD
ARTIFACTS
CONFIG
Verify Code
• Dependency mismatches• Accidental global changes• Invalid changes
ARTIFACTS
CONFIG
Verify CodeTest
Releases
• Regression test• Acceptance test• Performance test
ARTIFACTS
CONFIG
Verify CodeTest
ReleasesDocument
Code
• Think java doc• Generated from code• But focus is maintenance
ARTIFACTS
CONFIG
Verify CodeTest
ReleasesDocument
Code
• See live metrics• Changes over time
Monitoring
ARTIFACTS
CONFIG
Verify CodeTest
ReleasesDocument
Code
Manage Config
• Make sure “prod” is correct• Update when life changes• Does not require development
Monitoring
ARTIFACTS
CONFIG
Verify CodeTest
ReleasesDocument
Code
Manage Config
Deploy
• Apply configuration• Push to environment• Record logs• Update “state”
Monitoring
ARTIFACTS
CONFIG
Verify CodeTest
ReleasesDocument
Code
Manage Config
Deploy
Approve Tickets
• Configuration management• Coordinate projects• Coordinate deploys
Monitoring
ARTIFACTS
CONFIG
Verify CodeTest
ReleasesDocument
Code
Manage Config
Deploy
Approve Tickets
AUTOMATED
Monitoring
ARTIFACTS
CONFIG
Verify CodeTest
ReleasesDocument
Code
Manage Config
Deploy
Approve Tickets
AUTOMATED
SELF SERVICE PORTAL
ARTIFACTS
CONFIG
Release Code
Update Config
Test CodeBuild CodeGenerate
Code
Create BOM
Create Ticket
Edit Code
VERSION CONTROL
Review Code
Verify Code
Test Releases
Document Code
Manage Config
Deploy
Approve Tickets
Monitoring
ARTIFACTS
CONFIG
FrameworksGenerate Code
Edit Code
VERSION CONTROL
Review Code
Automation
Self Service UI
Automation
Ticket workflow
Automation
What's your CI/CD Vision?
Should everything be automated?
#5:The Tech
Placeholder for Mats Slides
Acceptance testsoapUI
citrusfitnesse jMeter
java“diff”
Unified Buildpackage
mavendocker
zip
Iterative CD
DB Artifacts
Static, never changesAssessment:
Cost: ?, Benefit: noneCost/Benefit:
Scripted during installRecommendation:
#1
Changes infrequentlyAssessment:
Cost: low, Benefit: lowCost/Benefit:
Package as jar, run scriptsRecommendation:
#2
Changes frequentlyAssessment:
Cost: med., Benefit: med.Cost/Benefit:
Package as jar, auto deployRecommendation:
#3
Changes very frequentlyAssessment:
Cost: high., Benefit: high.Cost/Benefit:
DB version tool, auto deployRecommendation:
#4
What's your best CI/CD
experience?
What's your worst?
#6:The Religion
Enlightenment
Helping People
The biggest hat
Your Religionnot mine...
Your commandmentsnot mine...
Your processnot mine...
make love
not war
Improvements
not crusades
Thank you
? !