Continuous Delivery was never about faster

A presentation at DevOpsDays Stockholm in September 2019 in Stockholm, Sweden by Ken Mugrage

Slide 1

Slide 1

Slide 2

Slide 2

Slide 3

Slide 3

The Discovery of Penicillin  Alexander Fleming discovered it in 1928, by accident  First shown to be effective on bacterial infection in mice in 1940  First human treatment in 1941  United States produced 2.3 million doses in time for the WWII Normandy invasion @kmugrage

Slide 4

Slide 4

Other Great Accidents  Microwave Oven  Quinine  X-rays  Velcro  Insulin  Continuous Delivery @kmugrage

Slide 5

Slide 5

15 years ago we knew everything  Defined Continuous Integration  Created the first (or second) CI server  Created Selenium @kmugrage

Slide 6

Slide 6

Java – Write once, run anywhere  Developed a system on Windows laptops to be deployed to a Solaris cluster  Did all of the right Continuous Integration things  One small issue… @kmugrage

Slide 7

Slide 7

It didn’t work in production @kmugrage

Slide 8

Slide 8

Conan The Deployer  Massive shell script  Automated deployment to a cluster after every successful CI run  Deployment became a non-issue @kmugrage

Slide 9

Slide 9

Results of the Accident  The Deployment Production Line  The Continuous Delivery Book  GoCD @kmugrage

Slide 10

Slide 10

@kmugrage

Slide 11

Slide 11

@kmugrage

Slide 12

Slide 12

Frontend Edge Load Balancer Web Application Web Application Application Servers Web Application Web Application Web Application MSMQ Web Application Biztalk Customer Service Application Customer Service Application Business Servers Business Servers Business Servers Distributed Cache Session DB Transactional DB Biztalk DB

Slide 13

Slide 13

Build Test Deploy Get Package git pull Artifact Repository Deploy Test Environment Get Package Artifact Repository Deploy Environment Version Build UI Artifact Repository Unit Test Service Package Component Smoke Tests

Slide 14

Slide 14

It was automated now  It worked in production (yay!)  It was hard to scale the applications  It was hard to work on complicated applications @kmugrage

Slide 15

Slide 15

Image by @lizparody23 https://nodesource.com/blog/microservices-in-nodejs

Slide 16

Slide 16

Edge Load Balancer Product Domain Apply Domain Service Service Repository Repository Command Handlers Event Handlers Event Store Account Domain Service Repository Command Handlers Event Handlers Event Store E V E N T B U S Command Handlers Event Handlers Event Store Customer Domain Service Repository Command Handlers Event Handlers Event Store

Slide 17

Slide 17

Service A Functional Tests Build Deploy to Stage Deploy to Production Deploy to Stage Deploy to Production Regression Tests Service B Functional Tests Build Regression Tests

Slide 18

Slide 18

Service A Functional Tests Build Regression Tests Deploy to Stage Service B Functional Tests Build Regression Tests Deploy to Production

Slide 19

Slide 19

@kmugrage

Slide 20

Slide 20

@kmugrage

Slide 21

Slide 21

Write the code @kmugrage Run the build Show the feature Merge the code Done

Slide 22

Slide 22

@kmugrage Create feature flag Write unit test Write the functional test Show the feature Write the code Merge to master CI server builds Release (flip the flag) Customer uses feature This includes any infrastructure, pipeline, data model or other changes required to support the feature! Deploy

Slide 23

Slide 23

Write the code @kmugrage Run the build Show the feature Merge the code Done

Slide 24

Slide 24

“Dev” Team “QA”, Security, Compliance @kmugrage Write the code Run the build Show the feature Merge the code Done Write Tests Run Tests Send back to dev Wait… Repeat

Slide 25

Slide 25

“Dev” Team “QA”, Security, Compliance “DevOps” Team @kmugrage Write the code Run the build Show the feature Merge the code Done Write Tests Run Tests Send back to dev Wait… Repeat Provision Machines Automate Deployment Send back to dev Wait… Repeat

Slide 26

Slide 26

@kmugrage

Slide 27

Slide 27

“ ” @kmugrage

Slide 28

Slide 28

“ ” @kmugrage

Slide 29

Slide 29

Create feature flag Write the functional test @kmugrage Write unit test Show the feature Write the code Deploy Merge to master Release (flip the flag) Write the code Run the build Show the feature Merge the code Done Write Tests Run Tests Send back to dev Wait… Repeat Provision Machines Automate Deployment Send back to dev Wait… Repeat CI server builds Customer uses feature

Slide 30

Slide 30

Create feature flag Write the functional test @kmugrage Write unit test Show the feature Write the code Deploy Merge to master Release (flip the flag) Write the code Run the build Show the feature Merge the code Done Write Tests Run Tests Send back to dev Wait… Repeat Provision Machines Automate Deployment Send back to dev Wait… Repeat CI server builds Customer uses feature

Slide 31

Slide 31

@kmugrage

Slide 32

Slide 32

“ ” @kmugrage

Slide 33

Slide 33

@kmugrage

Slide 34

Slide 34

“ ” @kmugrage

Slide 35

Slide 35

@kmugrage

Slide 36

Slide 36

You will now be measured on deploys per day YAY!!! I deploy am deploy working deploy on deploy this deploy @kmugrage

Slide 37

Slide 37

Our Pipeline @kmugrage

Slide 38

Slide 38

Our Pipeline @kmugrage

Slide 39

Slide 39

Accelerate State of DevOps @kmugrage

Slide 40

Slide 40

Elite Performers Aspect of Software Delivery Performance Deployment frequency On-demand (multiple deploys per day) Lead time for changes Less than one day Time to restore services Less than one hour Change failure rate 0-15% @kmugrage

Slide 41

Slide 41

Summary  CD isn’t about faster.  CD in a DevOps culture is!  Deployment goals should be business driven.  Metrics drive behaviors. @kmugrage

Slide 42

Slide 42

@kmugrage