Continuous Deployment
Declan Whelan
Shawn Button
through technical excellence
Continuous Deployment
Declan Whelan
Shawn Button
through technical excellence
Who We Are
Declan Whelan and Shawn Button
are developers and technical coaches.
Find us at www.leanintuit.com
Agenda
• What Continuous Deployment feels like.
• What is necessary for CD.
• What we often see as the missing pieces.
• Aiming for CD.
• Steps to CD success.
What Is Continuous Delivery
“Continuous delivery is a software
engineering approach in which teams
produce software in short cycles,
ensuring that the software can be
reliably released at any time.”
- Wikipedia
What Is Continuous Deployment
“Continuous deployment is
continuous delivery plus the code
always goes to production.”
- Us
Make Continuous Deployment Your Goal
If there’s one thing to take from this today, we hope it be this:
Make Continuous Deployment your goal.

Every time you are faced with a decision ask yourselves:
“Will this take us closer to Continuous Deployment?”
What is required for Continuous Deployment?
Version
Control
Build/Deploy
Pipelines
Infrastructure
as Code
Frequent,
safe code
updates
Separation of
rollout and
activation
Good
Observability
What is required for Continuous Deployment?
Version
Control
Build/Deploy
Pipelines
Infrastructure
as Code
Frequent,
safe code
updates
Separation of
rollout and
activation
Good
Observability
A Lot of DevOps Initiatives Focus on These
What is required for Continuous Deployment?
Version
Control
Build/Deploy
Pipelines
Infrastructure
as Code
Frequent,
safe code
updates
Separation of
rollout and
activation
Good
Observability
A Lot of DevOps Initiatives Focus on These
This is Ignored
“A Tool Will Solve Our Problem” - Developers, Always
Frequent, Safe, Small Code Updates
Requires changes to how we:
" Test
" Code
" Organize ourselves
" Plan and execute
" Learn
Continuous Deployment
monitor
operate
activate
rollout
build
commit
integration
test
unit
test
code
plan
dev ops
Let’s focus on the “dev” loop
build
end to
end test
integration
test
unit
test
code
plan
dev
Shift quality left
Move quality checks upstream
build
end to
end test
integration
test
unit
test
codeplan
Planning: 3 amigos story writing
Product owner / BA Developer Tester
hmmm … 

what edge cases

might there be?
hmmm … 

how I simplify this?
hmmm … 

how can I make

my customers

more awesome?
Story writing is a team effort
From User Story Mapping, by Jeff Patton (O’Reilly, 2014)
Smaller stories, limiting WIP
https://leankit.com//uploads/images/general/_large/WIPLimitsCauses.jpg
Code Quality
We see a lot of code from a lot of different contexts.
We consider most of the code we see to be of insufficient quality to be
safe in continuous deployment.
It might have been fine when we were releasing bi-monthly. We had
long manual integration and testing cycles. Not now.
What do we need?
A Tool!
Code Quality
Code Quality
You need a broad-based approach to improving code quality:
" Don’t trade quality for short-term delivery speed.
" Pair and mob
" Adopt Test-Driven Development
" Make time for refactoring, and re-design
" Foster team code standards and conventions
" Establish enterprise code standards
" Hold technical training and bring in technical coaches (shameless plug)
" Run coding/testing book/video clubs
" Hold hack-a-thons
" Foster diversity
" Do regular root-cause analysis of failures and bugs
" Use linters and static code analysis tools
" …
From https://nvie.com/posts/a-successful-git-branching-model/
Branches
Complicated branching
shenanigans slow you
down, without improving
safety.
Developers always push
to Master.
Which always goes into
production.
From https://www.semanticscholar.org/paper/Reviewer-recommendation-for-pull-requests-in-What-Yu-Wang/9b4df30d4019ad196ca0d5c34b8ef6ae5e5fc7ca
Code Reviews
Code Reviews
Code Reviews
Code reviews do improve safety, but slow you down.
" Developers can mob or pair instead:
" Problems are found and fixed immediately.
" Learning is vastly increased. Team members help each other
improve.
" The team develops a shared code style.
" etc.
" (If you can’t mob or pair yet, please STILL DO CODE REVIEWS)
Mobbing
Impediments to CD
" existing technical debt

" ineffective development practices

" hand-offs

" schedule pressure
Key Metrics
In the book Accelerate by Forsgren, et al., they describe four key
software delivery metrics:
" Lead time for changes
" Time from check-in to production

" Deployment frequency
" How often code is deployed to production

" Time to restore service
" Mean time to recover from failure (MTTR)

" Change failure rate
" How often changes require a fix or rollback
Step to CD success
" metrics: we suggest starting with deployment frequency

" empathy: focus on areas where team has passion or pain

" learning: while doing work and focused learning sessions
" have team identify and remove impediments
" start with managers or Scrum Masters helping
" over time teams own this

" small experiments: reflect and adjust
" keep asking “..will this take us closer to Continuous Deployment? ”
Improve Incrementally
“If an organization currently delivers to
production every 6 months, it is sadistic to
expect them to release in 2 weeks”
- paraphrased from Mary Poppendieck
Improve Incrementally - Experiments
Keep asking …
“Will this take us closer to
Continuous Deployment? ”
Continuous Deployment
Declan Whelan
Shawn Button
through technical excellence

Continuous Deployment Through Technical Excellence

  • 1.
    Continuous Deployment Declan Whelan ShawnButton through technical excellence
  • 2.
    Continuous Deployment Declan Whelan ShawnButton through technical excellence
  • 3.
    Who We Are DeclanWhelan and Shawn Button are developers and technical coaches. Find us at www.leanintuit.com
  • 4.
    Agenda • What ContinuousDeployment feels like. • What is necessary for CD. • What we often see as the missing pieces. • Aiming for CD. • Steps to CD success.
  • 6.
    What Is ContinuousDelivery “Continuous delivery is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time.” - Wikipedia
  • 7.
    What Is ContinuousDeployment “Continuous deployment is continuous delivery plus the code always goes to production.” - Us
  • 8.
    Make Continuous DeploymentYour Goal If there’s one thing to take from this today, we hope it be this: Make Continuous Deployment your goal.
 Every time you are faced with a decision ask yourselves: “Will this take us closer to Continuous Deployment?”
  • 9.
    What is requiredfor Continuous Deployment? Version Control Build/Deploy Pipelines Infrastructure as Code Frequent, safe code updates Separation of rollout and activation Good Observability
  • 10.
    What is requiredfor Continuous Deployment? Version Control Build/Deploy Pipelines Infrastructure as Code Frequent, safe code updates Separation of rollout and activation Good Observability A Lot of DevOps Initiatives Focus on These
  • 11.
    What is requiredfor Continuous Deployment? Version Control Build/Deploy Pipelines Infrastructure as Code Frequent, safe code updates Separation of rollout and activation Good Observability A Lot of DevOps Initiatives Focus on These This is Ignored
  • 12.
    “A Tool WillSolve Our Problem” - Developers, Always
  • 13.
    Frequent, Safe, SmallCode Updates Requires changes to how we: " Test " Code " Organize ourselves " Plan and execute " Learn
  • 14.
  • 15.
    Let’s focus onthe “dev” loop build end to end test integration test unit test code plan dev
  • 16.
    Shift quality left Movequality checks upstream build end to end test integration test unit test codeplan
  • 18.
    Planning: 3 amigosstory writing Product owner / BA Developer Tester hmmm … 
 what edge cases
 might there be? hmmm … 
 how I simplify this? hmmm … 
 how can I make
 my customers
 more awesome?
  • 19.
    Story writing isa team effort From User Story Mapping, by Jeff Patton (O’Reilly, 2014)
  • 20.
    Smaller stories, limitingWIP https://leankit.com//uploads/images/general/_large/WIPLimitsCauses.jpg
  • 21.
    Code Quality We seea lot of code from a lot of different contexts. We consider most of the code we see to be of insufficient quality to be safe in continuous deployment. It might have been fine when we were releasing bi-monthly. We had long manual integration and testing cycles. Not now. What do we need? A Tool!
  • 22.
  • 23.
    Code Quality You needa broad-based approach to improving code quality: " Don’t trade quality for short-term delivery speed. " Pair and mob " Adopt Test-Driven Development " Make time for refactoring, and re-design " Foster team code standards and conventions " Establish enterprise code standards " Hold technical training and bring in technical coaches (shameless plug) " Run coding/testing book/video clubs " Hold hack-a-thons " Foster diversity " Do regular root-cause analysis of failures and bugs " Use linters and static code analysis tools " …
  • 24.
    From https://nvie.com/posts/a-successful-git-branching-model/ Branches Complicated branching shenanigansslow you down, without improving safety. Developers always push to Master. Which always goes into production.
  • 25.
  • 26.
  • 27.
    Code Reviews Code reviewsdo improve safety, but slow you down. " Developers can mob or pair instead: " Problems are found and fixed immediately. " Learning is vastly increased. Team members help each other improve. " The team develops a shared code style. " etc. " (If you can’t mob or pair yet, please STILL DO CODE REVIEWS)
  • 28.
  • 29.
    Impediments to CD "existing technical debt
 " ineffective development practices
 " hand-offs
 " schedule pressure
  • 30.
    Key Metrics In thebook Accelerate by Forsgren, et al., they describe four key software delivery metrics: " Lead time for changes " Time from check-in to production
 " Deployment frequency " How often code is deployed to production
 " Time to restore service " Mean time to recover from failure (MTTR)
 " Change failure rate " How often changes require a fix or rollback
  • 31.
    Step to CDsuccess " metrics: we suggest starting with deployment frequency
 " empathy: focus on areas where team has passion or pain
 " learning: while doing work and focused learning sessions " have team identify and remove impediments " start with managers or Scrum Masters helping " over time teams own this
 " small experiments: reflect and adjust " keep asking “..will this take us closer to Continuous Deployment? ”
  • 32.
    Improve Incrementally “If anorganization currently delivers to production every 6 months, it is sadistic to expect them to release in 2 weeks” - paraphrased from Mary Poppendieck
  • 33.
  • 34.
    Keep asking … “Willthis take us closer to Continuous Deployment? ”
  • 35.
    Continuous Deployment Declan Whelan ShawnButton through technical excellence