Continuous delivery from the trenches

121
CONTINOUS DELIVERY

Transcript of Continuous delivery from the trenches

Page 1: Continuous delivery from the trenches

CONTINOUSDELIVERY

Page 2: Continuous delivery from the trenches
Page 3: Continuous delivery from the trenches

Community

Learning & fun

Once per month

Page 4: Continuous delivery from the trenches

Platform X

Broadcast

Selling Things

Page 5: Continuous delivery from the trenches
Page 6: Continuous delivery from the trenches

What can I contribute with

to the group

Which Topic (1) is the most interesting

Page 7: Continuous delivery from the trenches

#1:The history

Page 8: Continuous delivery from the trenches

waterfallRequirements

Specification

Build

Test

Deliver

Done

Page 9: Continuous delivery from the trenches

AGILE

RESCUEto the

Page 10: Continuous delivery from the trenches

Gather Requirements

Write Specification

Build softwareTest software

Deliver Software

Acceptance Test

Agile

Page 11: Continuous delivery from the trenches

Frontend

Business logic

Backend

3-tier

Page 12: Continuous delivery from the trenches

Gather Requirements

Write Specification

Build softwareTest software

Deliver Software

Acceptance Test

…but how?

Page 13: Continuous delivery from the trenches

Frontend

Business logic

Backend

waterfalls

Page 14: Continuous delivery from the trenches

Gather Requirements

Write Specification

Build softwareTest software

Deliver Software

Acceptance Test

projects

not code

Automation for

Page 15: Continuous delivery from the trenches

INTEGRATIONCONTINUOUS

RESCUEto the

Page 16: Continuous delivery from the trenches

Code

IntegrateBuild

Test

INTEGRATIONCONTINUOUS

Page 17: Continuous delivery from the trenches

complexity++

WEB/APP

DB

WEB/APP WEB/APP

LB

APPESB

Page 18: Continuous delivery from the trenches

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

Page 19: Continuous delivery from the trenches

Code

IntegrateBuild

Test

…but how?

Page 20: Continuous delivery from the trenches

Development

Installation

Testing

waterfalls

Page 21: Continuous delivery from the trenches

Code

IntegrateBuild

Test

code

not systems

Automation for

Page 22: Continuous delivery from the trenches

DELIVERYCONTINUOUS

RESCUEto the

Page 23: Continuous delivery from the trenches

Code

Integrate

Build

Unit-test

Deploy

Acceptance/Integration

test

Release

DELIVERYCONTINUOUS

Page 24: Continuous delivery from the trenches

SAP

.NET Oracle

Java

distributed

Page 25: Continuous delivery from the trenches

Code

Integrate

Build

Unit-test

Deploy

Acceptance/Integration

test

Release

…but how?

Page 26: Continuous delivery from the trenches

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

Page 27: Continuous delivery from the trenches

Code

Integrate

Build

Unit-test

Deploy

Acceptance/Integration

test

Release

systems

not enterprise

Automation for

Page 28: Continuous delivery from the trenches

Why do we love waterfalls?

Are waterfalls bad?

Page 29: Continuous delivery from the trenches

#2:The light

Page 30: Continuous delivery from the trenches

reproducibilityis key

Page 31: Continuous delivery from the trenches

humans=

failure

Page 32: Continuous delivery from the trenches

robots=

success

Page 33: Continuous delivery from the trenches

pirates!

Page 34: Continuous delivery from the trenches

Tools centric

Page 35: Continuous delivery from the trenches

Jenkins

Page 36: Continuous delivery from the trenches

Deploy button

Page 37: Continuous delivery from the trenches

500 services

Page 38: Continuous delivery from the trenches

500 buttons

Page 39: Continuous delivery from the trenches

JenkinsAutomation

Page 40: Continuous delivery from the trenches

Jenkins a.k.a. Hudson © 2005

Subversion 1.0: 2004-02-23

Page 41: Continuous delivery from the trenches

Jenkins:cron + web

in 2005

Page 42: Continuous delivery from the trenches

everything!Automation

Not just deploy and test

Page 43: Continuous delivery from the trenches

There are many tools

But the tool isirrelevant

Page 44: Continuous delivery from the trenches

CD is not a tool

Page 45: Continuous delivery from the trenches

CD is areligion

Page 46: Continuous delivery from the trenches

automationis the light

Page 47: Continuous delivery from the trenches

there is no toolSO…

there is a recipe

Page 48: Continuous delivery from the trenches

find your pain

#1

Page 49: Continuous delivery from the trenches

fix the pain

#2

Page 50: Continuous delivery from the trenches

reach enlightened

#3

Page 51: Continuous delivery from the trenches

goto #1

#4

Page 52: Continuous delivery from the trenches

1:find the pain

2:fix the pain

3:reach enlightenment

4:goto #1

The recipe

Page 53: Continuous delivery from the trenches

give me a tool%&!#¤?$%&

Page 54: Continuous delivery from the trenches

Jenkinsis fine…

Page 55: Continuous delivery from the trenches

Many modern options

Page 56: Continuous delivery from the trenches

But remember the glue

Page 57: Continuous delivery from the trenches

Deploy button

Page 58: Continuous delivery from the trenches

Start small

Page 59: Continuous delivery from the trenches

1:find the pain

2:fix the pain

3:reach enlightenment

4:goto #1

The recipe

Page 60: Continuous delivery from the trenches

That really really hurts

Page 61: Continuous delivery from the trenches

no big bangs

Page 62: Continuous delivery from the trenches

riskyDon’t fix what’s not broken

Page 63: Continuous delivery from the trenches

expensiveIf you are not saving money:

your spending it

Page 64: Continuous delivery from the trenches

stupidremember waterfalls?

Page 65: Continuous delivery from the trenches

Easy: right?

Page 66: Continuous delivery from the trenches
Page 67: Continuous delivery from the trenches

What is the real problem?

Is CI/CD a religion?

Page 68: Continuous delivery from the trenches

#3:The People

Page 69: Continuous delivery from the trenches

Placeholder for Mats Slides

Page 70: Continuous delivery from the trenches

#4:The Map

Page 71: Continuous delivery from the trenches

ARTIFACTS

CONFIG

DEVELOP TEST/VER/PROD

• The world changes• Separate build from deploy• Archive• Write once only (immutable)

Page 72: Continuous delivery from the trenches

ARTIFACTS

CONFIG

DEVELOP TEST/VER/PROD

• First class citizens• History• Audit• Roll back/revert• Public knowledge

Page 73: Continuous delivery from the trenches

ARTIFACTS

CONFIG

DEVELOP

Page 74: Continuous delivery from the trenches

ARTIFACTS

CONFIG

FrameworksGenerate Code

• Enforce standard patterns• From zero to “done” instantly• Quick on boarding• Easy refactoring• Quick development

Page 75: Continuous delivery from the trenches

ARTIFACTS

CONFIG

FrameworksGenerate Code

VERSION CONTROL

• Branching strategy (gitflow)• Version strategy (maven)• Easy access (web-ui)• Distributed (git)• Feature commits

Page 76: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Build CodeFrameworksGenerate Code

VERSION CONTROL

• Standard tools (maven/ant)• Convention over configuration (the maven way)• Command Line• No configuration• No “installation”

Page 77: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Test CodeBuild CodeFrameworksGenerate Code

VERSION CONTROL

• Unit test• Whenever possible• Black-box testing• Some “online testing”• Remember usability (auto update)

Page 78: Continuous delivery from the trenches

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)

Page 79: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Release Code

Test CodeBuild CodeFrameworksGenerate Code

Edit Code

VERSION CONTROL

• Editor agnostic• No configuration• No magic

Page 80: Continuous delivery from the trenches

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”

Page 81: Continuous delivery from the trenches

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

Page 82: Continuous delivery from the trenches

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

Page 83: Continuous delivery from the trenches

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

Page 84: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Release Code

Update Config

Test CodeBuild CodeFrameworksGenerate Code

Create BOM

Create Ticket

Edit Code

VERSION CONTROL

Review CodeAUTOMATED

Page 85: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Release Code

Update Config

Test CodeBuild CodeFrameworksGenerate Code

Create BOM

Create Ticket

Edit Code

VERSION CONTROL

Review CodeAUTOMATED

SELF SERVICE PORTAL

Page 86: Continuous delivery from the trenches

ARTIFACTS

CONFIG

TEST/VER/PROD

Page 87: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify Code

• Dependency mismatches• Accidental global changes• Invalid changes

Page 88: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify CodeTest

Releases

• Regression test• Acceptance test• Performance test

Page 89: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify CodeTest

ReleasesDocument

Code

• Think java doc• Generated from code• But focus is maintenance

Page 90: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify CodeTest

ReleasesDocument

Code

• See live metrics• Changes over time

Monitoring

Page 91: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify CodeTest

ReleasesDocument

Code

Manage Config

• Make sure “prod” is correct• Update when life changes• Does not require development

Monitoring

Page 92: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify CodeTest

ReleasesDocument

Code

Manage Config

Deploy

• Apply configuration• Push to environment• Record logs• Update “state”

Monitoring

Page 93: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify CodeTest

ReleasesDocument

Code

Manage Config

Deploy

Approve Tickets

• Configuration management• Coordinate projects• Coordinate deploys

Monitoring

Page 94: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify CodeTest

ReleasesDocument

Code

Manage Config

Deploy

Approve Tickets

AUTOMATED

Monitoring

Page 95: Continuous delivery from the trenches

ARTIFACTS

CONFIG

Verify CodeTest

ReleasesDocument

Code

Manage Config

Deploy

Approve Tickets

AUTOMATED

SELF SERVICE PORTAL

Page 96: Continuous delivery from the trenches

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

Page 97: Continuous delivery from the trenches

ARTIFACTS

CONFIG

FrameworksGenerate Code

Edit Code

VERSION CONTROL

Review Code

Automation

Self Service UI

Automation

Ticket workflow

Automation

Page 98: Continuous delivery from the trenches

What's your CI/CD Vision?

Should everything be automated?

Page 99: Continuous delivery from the trenches

#5:The Tech

Page 100: Continuous delivery from the trenches

Placeholder for Mats Slides

Page 101: Continuous delivery from the trenches

Acceptance testsoapUI

citrusfitnesse jMeter

java“diff”

Page 102: Continuous delivery from the trenches

Unified Buildpackage

mavendocker

zip

Page 103: Continuous delivery from the trenches

Iterative CD

Page 104: Continuous delivery from the trenches

DB Artifacts

Page 105: Continuous delivery from the trenches

Static, never changesAssessment:

Cost: ?, Benefit: noneCost/Benefit:

Scripted during installRecommendation:

#1

Page 106: Continuous delivery from the trenches

Changes infrequentlyAssessment:

Cost: low, Benefit: lowCost/Benefit:

Package as jar, run scriptsRecommendation:

#2

Page 107: Continuous delivery from the trenches

Changes frequentlyAssessment:

Cost: med., Benefit: med.Cost/Benefit:

Package as jar, auto deployRecommendation:

#3

Page 108: Continuous delivery from the trenches

Changes very frequentlyAssessment:

Cost: high., Benefit: high.Cost/Benefit:

DB version tool, auto deployRecommendation:

#4

Page 109: Continuous delivery from the trenches

What's your best CI/CD

experience?

What's your worst?

Page 110: Continuous delivery from the trenches

#6:The Religion

Page 111: Continuous delivery from the trenches
Page 112: Continuous delivery from the trenches

Enlightenment

Page 113: Continuous delivery from the trenches

Helping People

Page 114: Continuous delivery from the trenches

The biggest hat

Page 115: Continuous delivery from the trenches

Your Religionnot mine...

Page 116: Continuous delivery from the trenches

Your commandmentsnot mine...

Page 117: Continuous delivery from the trenches

Your processnot mine...

Page 118: Continuous delivery from the trenches

make love

not war

Page 119: Continuous delivery from the trenches

Improvements

not crusades

Page 120: Continuous delivery from the trenches

Thank you

Page 121: Continuous delivery from the trenches

? !