Overcoming the fear of deployments

50
Overcoming the fear of deployments by @andreitognolo

Transcript of Overcoming the fear of deployments

Page 1: Overcoming the fear of deployments

Overcoming the fear of deployments

by @andreitognolo

Page 2: Overcoming the fear of deployments
Page 3: Overcoming the fear of deployments

As we grow up, we're often encouraged to think of fear as a weakness,

just another childish thing to discard (…)

Karen Thompson Walker [1]

Page 4: Overcoming the fear of deployments

Shelly Kagan [2]

SOMETHING BAD

3 Conditions

Page 5: Overcoming the fear of deployments

SOMETHING BAD

3 Conditions

NON-NEGLIGIBLECHANCE

0% 100%

Shelly Kagan [2]

Page 6: Overcoming the fear of deployments

SOMETHING BAD

3 Conditions

NON-NEGLIGIBLECHANCE

SOMEUNCERTAINTY

0% 100%

Shelly Kagan [2]

Page 7: Overcoming the fear of deployments

SOMETHING BAD

3 Conditions

NON-NEGLIGIBLECHANCE

SOMEUNCERTAINTY

0% 100%

(something that you care)

(something unpredictable)

Shelly Kagan [2]

Page 8: Overcoming the fear of deployments

(un)predictability

Is it possible to have a completely predictabledeployment process?

Page 9: Overcoming the fear of deployments

(un)predictability

Page 10: Overcoming the fear of deployments

(un)predictability

Page 11: Overcoming the fear of deployments

Construct a house

(un)predictability

Cynefin Framework [3]

(COMPLICATED)

cause and effect requires analysis

Page 12: Overcoming the fear of deployments

Construct a house Create software

(un)predictability

(COMPLICATED) (COMPLEX) (*)

cause and effect can only be perceived in retrospect, but not in

advance

cause and effect requires analysis

Cynefin Framework [3](*) Software development is not only made of complex activities

Page 13: Overcoming the fear of deployments

Construct a house Create software

(un)predictability

(COMPLICATED)

Require tests after!

cause and effect can only be perceived in retrospect, but not in

advance

cause and effect requires analysis

Cynefin Framework [3](*) Software development is not only made of complex activities

(COMPLEX) (*)

Page 14: Overcoming the fear of deployments

(un)predictability

Is it possible to have a completely predictabledeployment process?

Page 15: Overcoming the fear of deployments

(un)predictability

Is it possible to have a completely predictabledeployment process?

Not completely predictable

Page 16: Overcoming the fear of deployments

(un)predictability

Is it possible to have a completely predictabledeployment process?

Not completely predictable

Some fear makes sense

Page 17: Overcoming the fear of deployments

The amount of fear should be appropriate to the size of "the bad"

How much fear?

Page 18: Overcoming the fear of deployments

Worst thing possibleR

eque

sts

per s

econ

d

Page 19: Overcoming the fear of deployments

Worst thing possibleR

eque

sts

per s

econ

d

Deploy

Page 20: Overcoming the fear of deployments

Req

uest

s pe

r sec

ond

Worst thing possible

Deploy

Page 21: Overcoming the fear of deployments

Worst thing possible

deploy new version

Make it available

(avoiding)

Page 22: Overcoming the fear of deployments

Worst thing possible

deploy new version

Make it available

smoke test

(avoiding)

Page 23: Overcoming the fear of deployments

A really bad thing

run builds

Page 24: Overcoming the fear of deployments

A really bad thing

run builds

Page 25: Overcoming the fear of deployments

A really bad thing

run builds

build logs

Page 26: Overcoming the fear of deployments

A really bad thing

run builds

build logs

tail logs

Page 27: Overcoming the fear of deployments

A really bad thing

TestPyramid

Martin Fowler [4]

(avoiding)

Page 28: Overcoming the fear of deployments

You can’t predict everything

ps: I don’t like gambling

+ > 5

Page 29: Overcoming the fear of deployments

You can’t predict everything

ps: I don’t like gambling

Are you afraid of betting € 10,000?

+ > 5

Page 30: Overcoming the fear of deployments

You can’t predict everything

One after the

After the first result, you can give up and lose € 1,000

ps: I don’t like gambling

(avoiding)

Page 31: Overcoming the fear of deployments

You can’t predict everything(avoiding)

Page 32: Overcoming the fear of deployments

You can’t predict everything

FEATURE TOGGLE

if toggle on { new code

} else { old code

}

(avoiding)

Page 33: Overcoming the fear of deployments

You can’t predict everything

FEATURE TOGGLE

(avoiding)

if toggle on { new code

} else { old code

}

Page 34: Overcoming the fear of deployments

What is the cause?

Create software(COMPLEX)

cause and effect can only be perceived in retrospect, but not in

advance

Page 35: Overcoming the fear of deployments

What is the cause?

07fc5cb Add ability to ... 1c6a8fb Refactor database 79b83c6 Remove unused ... 657fdea Add migration ... 07537c2 Change signature ... 6b7a12d Improve ajax ... 7bffaa4 Add stylesheet ... ce9676d Add dependency ... cb9b60b Change nginx ... 3311736 Remove duplicated ...

Page 36: Overcoming the fear of deployments

What is the cause?

May 2015 [5]

Page 37: Overcoming the fear of deployments

What is the cause?

master

my-branchmerge

deploy

Page 38: Overcoming the fear of deployments

What is the cause?

master

deploys

(avoiding)

TRUNK BASED DEVELOPMENT

Page 39: Overcoming the fear of deployments

What is the cause?

master

deploys

Feature Toggle

(avoiding)

TRUNK BASED DEVELOPMENT

deployment != release

Page 40: Overcoming the fear of deployments

What is the cause?

79b83c6 Remove unused ...

master

(avoiding)

Page 41: Overcoming the fear of deployments

What is the cause?

master

deploys

If it hurts, do it more often

If you are afraid, do it more often

(avoiding)

Page 42: Overcoming the fear of deployments

Culture

Page 43: Overcoming the fear of deployments

Culture

If people are afraid to get blamed, they will usually hide problems, at the risk of creating even bigger problems.

Highly unhealthy.

Blog post link [6]

Page 44: Overcoming the fear of deployments

Culture

Development Team

Operations Team

It’s your fault!

No, it’s your fault!

Page 45: Overcoming the fear of deployments

Culture

It’s our responsibility!

DevOps Culture

Page 46: Overcoming the fear of deployments

Takeaway List

Page 47: Overcoming the fear of deployments

Takeaway List

Page 48: Overcoming the fear of deployments

Don’t be afraid to be afraid :)

Takeaway List

Page 49: Overcoming the fear of deployments

Thank you!@andreitognolo

github.com/andreitognolo

[email protected]

Page 50: Overcoming the fear of deployments

[1] https://www.ted.com/talks/karen_thompson_walker_what_fear_can_teach_us

[2] http://oyc.yale.edu/philosophy/phil-176/lecture-22

[3] https://en.wikipedia.org/wiki/Cynefin_Framework

[4] http://martinfowler.com/bliki/TestPyramid.html

[5] https://www.thoughtworks.com/radar/techniques/long-lived-branches-with-gitflow

[6] http://tech.transferwise.com/blameless-postmortems/

References