Continuous Deployment

The good, the bad, and the ugly


Viktor Farcic


@vfarcic

TechnologyConversations.com

CloudBees.com

Viktor Farcic

Facing the truth

How long would it take your organization to deploy a change that involves just one single line of code?

Do you do this on a repeatable, reliable basis?

Why Continuous Delivery or Deployment?

  • Because it is modern?
  • Because it is popular?
  • Because everyone talks about it?

Because...

  • Earlier feedback to business
  • Faster development
  • Fewer merge conflicts
  • Lower deployment risk
  • Changes done faster

Continuous

Integration

vs

Delivery

vs

Deployment

Continuous Integration

  • Automated integration flow
  • Merge to main branch often (at least once a day)
  • Fixing failed flow has the highest priority
  • Unclear status
  • Not a "production ready" process

Continuous Integration

Are you doing CI today?

If not, so long and thanks for all the fish

Continuous Delivery

You're doing it when...

  • you are already doing continuous integration
  • your software is deployable throughout its life-cycle
  • your team prioritizes keeping the software deployable
  • anybody can get fast, automated feedback on the production readiness
  • you can perform push-button deployments

Continuous Delivery

Means that...

  • every commit to VCS that passed the flow can be deployed to production
  • pressing the button to deploy to production is the only manual action

Continuous Deployment

You're doing it when...

  • you are already doing continuous delivery
  • there are no buttons to push

Continuous Deployment

Means that...

  • every commit to VCS that passed the flow is deployed to production
  • there are no manual actions of any kind

CD

  • Tasks are reordered
  • Proactive approach
  • Cannot be "faked"

Benefits

  • Faster time-to-market
  • Building the right product
  • Improved productivity and efficiency
  • Reliable releases
  • Improved product quality
  • Visibility
  • Feedback

Benefits

Where are the case studies?

Successful CD implementations are not projects nor they have an end

Benefits

HP LaserJet Firmware

  • Overall development costs reduced by ~40%
  • Programs under development increased by ~140%
  • Development costs per program reduced by 78%
  • Resources driving innovation increased by 5x

Benefits

  • ARTstor: provisioning a new server from days to 15 minutes
  • Group Adeo: one week of development productivity gained, each month
  • jClouds: 33% increase in developer productivity.
  • Neustar: build frequency increased by a factor of 4x.
  • Orbitz: release cycles cut by more than 75%
  • Service-Flow: development time reduced by 50%

Problems

  • It's hard to get there
  • Very hard
  • Harder than you think
  • Requires changes on all levels
    • Technology
    • Architecture
    • Culture
    • Organization structure
    • ...

Problems

Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations - M. Conway

What is CD?

What is CD?

It is vertical

  • It's not another process
  • It's not another layer
  • It does not belong to a single department
  • It spans the whole organization and the project vertically
  • It affects the whole SDLC
  • From business and requirements, through development and testing, all the way until operations and maintainance... is a single, continuous process without delays.
  • There can be no hand-offs

What is CD?

Single, repeatable, and reliable

  • The same artifacts
  • The same process
  • The same release

What is CD?

Fully automated

  • No manual steps
    (except clicking the "deploy to production" button)
  • Right tool for a task

What is CD?

Everything must be in VCS

  • Code
  • Configuration
  • Scripts
  • Database deltas
  • Documentation
  • Delivery flow
Everything related to a single project in single repository

What is CD?

Short feedback loops

  • Continuous != monthly != weekly
  • Continuous == (at least) daily
  • Fix of a delivery flow failure == priority
  • Time to fix the problem ∝ time it was detected
  • Delivery flow must be fast

What is CD?

No branching

  • Branches prevent CD
  • ... unless they are short lived (a day or less)

What is CD?

Generates everything

  • Environments
  • Binaries
  • DB changes
  • Documentation
  • ...

Dos & Don'ts

Do Not

  • form a CD team
  • task one department to create a CD flow
  • automate inside a CD tool

Do

  • form a multifunctional and autonomous team capable of delivering a service
  • include someone with CD experience inside the team
  • choose an easy target
  • trust the team
  • short iterations

How to start?

  • Do dos and don't do don'ts
  • Don't trust do-it-all processes and tools
  • A feature/story is done when it is ready for (or deployed to) production
  • It's a learning experience
  • The team will fail, learn from failure, improve, repeat
  • Support the team in failure

Viktor Farcic


@vfarcic


TechnologyConversations.com

Amazon
LeanPub

 
LeanPub