continuous delivery - eclipsecon france2018 · continuous delivery tim brown eclipsecon 2012...

38
http://thoughtworks.com / Continuous Delivery Tim Brown EclipseCon 2012 [email protected] @tpbrown 1 Wednesday, March 28, 12

Upload: phamdiep

Post on 04-Aug-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

http://thoughtworks.com/

Continuous DeliveryTim BrownEclipseCon 2012

[email protected]@tpbrown

1Wednesday, March 28, 12

Page 2: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

agile 101

Iteration 0 1 2 3 4

Analysis + Design

Development

Testing + Showcase

Integration + QA Release and operation

Customer

Centralized QA IT Operations

"Agile" team

The "last mile"Iteration 0 1 2 3 4

Analysis + Design

Development

Testing + Showcase

Integration + QA Release and operation

Customer

Centralized QA IT Operations

"Agile" team

The "last mile"

2Wednesday, March 28, 12

Page 3: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

agile 101

Iteration 0 1 2 3 4

Analysis + Design

Development

Testing + Showcase

Integration + QA Release and operation

Customer

Centralized QA IT Operations

"Agile" team

The "last mile"

3Wednesday, March 28, 12

Page 4: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

web 2.0

disrupting traditional businesses

http://code.flickr.com/

4Wednesday, March 28, 12

Page 5: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

releasing frequently

feedback from users

5Wednesday, March 28, 12

Page 6: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

innovate

If I had asked people what they

wanted, they would have said

faster horses.

6Wednesday, March 28, 12

Page 7: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

scienti!c method

create hypothesis

deliver minimumviable product

get feedback

(repeat)Eric Ries, “The Lean Startup” http://bit.ly/8ZoX5F

Ideas

CodeData

Build

Measure

Learn

7Wednesday, March 28, 12

Page 8: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

releasing frequently

feedback from usersreduce risk of release

John Allspaw: “Ops Metametrics” http://slidesha.re/dsSZIr

8Wednesday, March 28, 12

Page 9: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

releasing frequently

feedback from usersreduce risk of releasereal project progress

9Wednesday, March 28, 12

Page 10: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

Fast, automated feedback on the production readiness of your applications every time there is a change - to code, infrastructure, or con!guration

10Wednesday, March 28, 12

Page 11: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

So"ware always production ready

Releases tied to business needs, not operational constraints

continuous delivery

Customer

Delivery teamConstant flow of new features into production

11Wednesday, March 28, 12

Page 12: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

automation

patterns and practices

collaboration

continuous delivery

12Wednesday, March 28, 12

Page 13: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

con!guration management

continuous integration

automated testing

ingredients

13Wednesday, March 28, 12

Page 14: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

visibility

an automated implementation of your end-to-end so"ware delivery process -- from source to live

control

feedback

deployment pipeline

14Wednesday, March 28, 12

Page 15: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

deployment pipelineDelivery team Version control Build & unit

testsAutomated

acceptance testsUser acceptance

testsRelease

Check in

Feedback

Trigger

Check in

Feedback

Trigger

Trigger

Check inTrigger

Trigger

ApprovalApproval

Feedback

Feedback

FeedbackFeedback

15Wednesday, March 28, 12

Page 16: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

build quality in“Cease dependence on mass inspection to achieve quality. Improve the process and build quality into the product in the !rst place”

W. Edwards Deming

16Wednesday, March 28, 12

Page 17: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

di#erent kinds of testing

Functional acceptance tests

ShowcasesUsability testing

Exploratory testing

Unit testsIntegration tests

System tests

Non-functional acceptance tests

(performance, scaling, ...)

Business facing

Technology facing

Critiq

ue p

roje

ct

Support

pro

gra

mm

ing

AUTOMATED

AUTOMATED

MANUAL

MANUAL / AUTOMATED

Diagram invented by Brian Marick

17Wednesday, March 28, 12

Page 18: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

deployment pipeline

18Wednesday, March 28, 12

Page 19: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

ask this question

“How long would it take your organization to deploy a change that involved just one single line of code? Do you do this on a repeatable, reliable basis?”

Mary and Tom Poppendieck, Implementing Lean Software Development, p59.

19Wednesday, March 28, 12

Page 20: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

automate provisioning and deployment

ensure devs, testers and ops collaborate throughout

reducing release risk

20Wednesday, March 28, 12

Page 21: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

incrementalism

devops

decoupling deployment and release

reducing release risk

21Wednesday, March 28, 12

Page 22: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

a cultural movement that patterns, practices, and tools

have sprung out of

devops

- automation- measurement- sharing

22Wednesday, March 28, 12

Page 23: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

low risk releases are incremental

blue-green deployments

canary releases

dark launching

production immune system

feature toggles

23Wednesday, March 28, 12

Page 24: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

STATIC CONTENT

/static/1.1

/static/1.0

DEPENDENT SERVICE

1.0 1.1

Abstraction layer Abstraction layer

APPLICATION

Database

Router /Load balancer

Interwebs

24Wednesday, March 28, 12

Page 25: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

blue-green deployments

25Wednesday, March 28, 12

Page 26: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

router

web server

app server

DB server

26Wednesday, March 28, 12

Page 27: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

router

v1.1 v1.1 v1.1

web server

app server

DB server

27Wednesday, March 28, 12

Page 28: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

router

v1.1 v1.1 v1.1

web server

app server

DB server

v1.2 v1.2 v1.2

28Wednesday, March 28, 12

Page 29: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

router

v1.1 v1.1 v1.1

web server

app server

DB server

v1.2 v1.2 v1.2

29Wednesday, March 28, 12

Page 30: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

decouple release from deployment

30Wednesday, March 28, 12

Page 31: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

feature toggles

[featureToggles]wobblyFoobars: trueflightyForkHandles: false

Config File

<?if ($wobblyFoobars) {?> ... various UI elements<?}?>

some.php

$fork_handle = ($featureConfig->isOn(‘flightlyForkHandles)) ? new flightyForkHander(aCandle) : new forkHandler(aCandle);

other.php

Stolen from Martin Fowler http://martinfowler.com/bliki/FeatureToggle.html

31Wednesday, March 28, 12

Page 32: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

what about my database?!

32Wednesday, March 28, 12

Page 33: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

Architectural choices- Expand/Contract- Event Sourcing- CQRS- NoSQL

Script DB changes delta by delta

Automate these changes using DB Deploy pattern

Managing Databases

33Wednesday, March 28, 12

Page 34: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

Dark Launching

34Wednesday, March 28, 12

Page 35: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

35Wednesday, March 28, 12

Page 36: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

36Wednesday, March 28, 12

Page 37: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

Make it easy for everyone to see what’s happening

Get everyone together at the beginning

Keep meeting

Continuous improvement

people are the key

37Wednesday, March 28, 12

Page 38: Continuous Delivery - EclipseCon France2018 ·  Continuous Delivery Tim Brown EclipseCon 2012 tpbrown@thoughtworks.com @tpbrown Wednesday, March 28, 12 1

Feedback [email protected]

Bright? Passionate about world-changing software? Want to do something amazing? http://join.thoughtworks.com/

thank you!

based on Dave & Jez’s award-winning book

38Wednesday, March 28, 12