creating a pipeline - leanagilekc 2015

76
Aaron Blythe Continuous Delivery Pipeline Aaron Blythe 1

Upload: aaron-blythe

Post on 15-Apr-2017

202 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Creating a Pipeline - LeanAgileKC 2015

Aaron Blythe

Continuous Delivery Pipeline

Aaron Blythe

1

Page 2: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Aaron Blythe Sr. Automation and System Engineer - Hearst Business Media

http://aaronblythe.org/

Answering Questions

Writing Code

http://www.meetup.com/DevOps-Kansas-City/

Running Meetups

2

Page 3: Creating a Pipeline - LeanAgileKC 2015

@ablythe3

Page 4: Creating a Pipeline - LeanAgileKC 2015

@ablythe4

Page 5: Creating a Pipeline - LeanAgileKC 2015

@ablythe5

Page 6: Creating a Pipeline - LeanAgileKC 2015

@ablythe6

Page 7: Creating a Pipeline - LeanAgileKC 2015

@ablythe7

Page 8: Creating a Pipeline - LeanAgileKC 2015

@ablythe8

Page 9: Creating a Pipeline - LeanAgileKC 2015

@ablythe9

Page 10: Creating a Pipeline - LeanAgileKC 2015

@ablythe10

https://twitter.com/ablythe

Page 11: Creating a Pipeline - LeanAgileKC 2015

@ablythe

"Treat your delivery pipeline as the heartbeat of your organization." @DibbeEdwards #DOES15

11

Page 12: Creating a Pipeline - LeanAgileKC 2015

@ablythe

What is a Pipeline?

12

Page 13: Creating a Pipeline - LeanAgileKC 2015

@ablythe13

Page 14: Creating a Pipeline - LeanAgileKC 2015

@ablythe14

Page 15: Creating a Pipeline - LeanAgileKC 2015

@ablythe15

Page 16: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Mark Burgess

❖ “Every time someone logs into a system interactively, they compromise everyone’s knowledge of that system”

16

Page 17: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Pipeline Rules❖ Build binaries only once

❖ Separate environment specifics

❖ Deploy the same way in every environment

❖ Smoke test your deployments

❖ Deploy into a copy of production

❖ Each change should propagate through the pipeline instantly

❖ If any part fails, stop the line

17

Page 18: Creating a Pipeline - LeanAgileKC 2015

@ablythe18

Page 19: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Thoughtworks Continuous Integration Rules❖ How to Do It

❖ Developers check out code into their private workspaces.

❖ When done, the commit changes to the repository.

❖ The CI server monitors the repository and checks out changes when they occur.

❖ The CI server builds the system and runs unit and integration tests.

❖ The CI server releases deployable artifacts for testing.

❖ The CI server assigns a build label to the version of the code it just built.

❖ The CI server informs the team of the successful build.

❖ If the build or tests fail, the CI server alerts the team.

❖ The team fix the issue at the earliest opportunity.

❖ Continue to continually integrate and test throughout the project.

❖ Team Responsibilities

❖ Check in frequently

❖ Don’t check in broken code

❖ Don’t check in untested code

❖ Don’t check in when the build is broken

❖ Don’t go home after checking in until the system builds

19

Page 20: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Three Things to Get Right

•Culture •Workflow •Tooling

20

Page 21: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Part 1

Culture2. Workflow 3. Tooling

21

Page 22: Creating a Pipeline - LeanAgileKC 2015

@ablythe22

Page 23: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Fremont Assembly Plant

http://en.wikipedia.org/wiki/Fremont_Assembly23

Page 24: Creating a Pipeline - LeanAgileKC 2015

@ablythe

NUMMI plant

http://en.wikipedia.org/wiki/NUMMI

24

Page 25: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Tesla Factory

http://en.wikipedia.org/wiki/Tesla_Factory25

Page 26: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Netflix Culture Deck

26

Page 27: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Adrian Cockcroft - Formerly Netflix

27

Page 28: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Michael McGarr - Currently Netflix

28

Page 29: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Lean Enterprise

“The long-term value of an enterprise is not captured by the value of its products and intellectual property but rather by its ability to continuously increase the value it provides to customers-and to create new customers-through innovation.”

29

Page 30: Creating a Pipeline - LeanAgileKC 2015

@ablythe30

Page 31: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Mission Control vs. Command and Control

The Prussion Army lost to Napoleon in 1809

Picture courtesy: http://en.wikipedia.org/wiki/Prussian_Army 31

Page 32: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Auftragstaktik

32

Page 33: Creating a Pipeline - LeanAgileKC 2015

@ablythe

2014 State of DevOps Report

9,200 technologists

33

Page 34: Creating a Pipeline - LeanAgileKC 2015

@ablythe

❖ I would recommend this organization as a good place to work.

❖ I have the tools and resources to do my job well.

❖ I am satisfied with my job.

❖ My job makes good use of my skills and abilities.

34

Page 35: Creating a Pipeline - LeanAgileKC 2015

@ablythe35

Page 36: Creating a Pipeline - LeanAgileKC 2015

@ablythe36

Page 37: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Part 2

Workflow3. Tooling

1. Culture

37

Page 38: Creating a Pipeline - LeanAgileKC 2015

@ablythe38

Page 39: Creating a Pipeline - LeanAgileKC 2015

@ablythe39

Page 40: Creating a Pipeline - LeanAgileKC 2015

@ablythe40

Page 41: Creating a Pipeline - LeanAgileKC 2015

@ablythe41

Page 42: Creating a Pipeline - LeanAgileKC 2015

@ablythe42

Page 43: Creating a Pipeline - LeanAgileKC 2015

@ablythehttp://assets.en.oreilly.com/1/event/60/Velocity%20Culture%20Presentation.pdf43

Page 44: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Steve Yegge’s Rant - Summary of Jeff Bezos❖ 1) All teams will henceforth expose their data and functionality through service interfaces.

❖ 2) Teams must communicate with each other through these interfaces.

❖ 3) There will be no other form of interprocess communication allowed: no direct linking, no direct reads of another team's data store, no shared-memory model, no back-doors whatsoever. The only communication allowed is via service interface calls over the network.

❖ 4) It doesn't matter what technology they use. HTTP, Corba, Pubsub, custom protocols -- doesn't matter. Bezos doesn't care.

❖ 5) All service interfaces, without exception, must be designed from the ground up to be externalizable. That is to say, the team must plan and design to be able to expose the interface to developers in the outside world. No exceptions.

❖ 6) Anyone who doesn't do this will be fired.

44

Page 45: Creating a Pipeline - LeanAgileKC 2015

@ablythe

What does that last slide mean?

❖ API!!!!!!

45

Page 46: Creating a Pipeline - LeanAgileKC 2015

@ablythehttp://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment

46

Page 47: Creating a Pipeline - LeanAgileKC 2015

@ablythe

❖ So when can you say you’re doing continuous delivery? I’d say it’s when you could flip a switch to go to continuous deployment if you decided that was the best way to deliver value to your customers.

❖ http://continuousdelivery.com/2010/08/continuous-delivery-vs-continuous-deployment/ - Jez Humble

47

Page 48: Creating a Pipeline - LeanAgileKC 2015

@ablythehttp://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment

48

Page 49: Creating a Pipeline - LeanAgileKC 2015

@ablythe

294 Highlights – Kindle Version

❖ It should always be cheaper to create a new environment than to repair an old one.

Humble, Jez; Farley, David (2010-07-27). Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation (Addison-Wesley Signature Series (Fowler)) (Kindle Location 1633). Pearson Education. Kindle Edition.

49

Page 50: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Let’s Take a Test!!!!11!!

If your configuration management process is sound, you should be able to answer “yes” to the following questions: ❖ Could you completely re-create your production system, excluding

production data, from scratch from the version -controlled assets that you store?

❖ Could you regress to an earlier, known good state of your application? ❖ Can you be sure that each deployed environment in production, in

staging, and in test is set up in precisely the same way? If not, then your organization is at risk.

50

Page 51: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Gary Gruver - HP Transformation

51

https://medium.com/@aaronblythe/

Page 52: Creating a Pipeline - LeanAgileKC 2015

@ablythe52

Page 53: Creating a Pipeline - LeanAgileKC 2015

@ablythe53

Page 54: Creating a Pipeline - LeanAgileKC 2015

@ablythe54

Page 55: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Command and Control vs. Promise Theory

55

Page 56: Creating a Pipeline - LeanAgileKC 2015

@ablythe56

Page 57: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Value Stream Mapping

57

Page 58: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Red Mark

58

Page 59: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Kanban to Measure

59

Page 60: Creating a Pipeline - LeanAgileKC 2015

@ablythehttp://www.slideshare.net/dev2ops/dev-ops-kaizen-damon-edwards60

Page 61: Creating a Pipeline - LeanAgileKC 2015

@ablythehttp://www.slideshare.net/dev2ops/dev-ops-kaizen-damon-edwards61

Page 62: Creating a Pipeline - LeanAgileKC 2015

@ablythehttp://www.slideshare.net/dev2ops/dev-ops-kaizen-damon-edwards62

Page 63: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Strangler Pattern

https://en.wikipedia.org/wiki/Strangler_fig63

Page 64: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Part 3

Tooling

1. Culture2. Workflow

64

Page 65: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Continuous Delivery Tools

Workflow PluginDelivery

Many more over the next couple years…

65

Page 66: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Chef Delivery

66

Page 67: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Go (from ThoughtWorks)

67

Page 68: Creating a Pipeline - LeanAgileKC 2015

@ablythe68

Page 69: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Jenkins

69

Page 70: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Can this actually be done?

70

Page 71: Creating a Pipeline - LeanAgileKC 2015

@ablythe71

Page 72: Creating a Pipeline - LeanAgileKC 2015

@ablythe

If we delivery faster so what?

72

Page 73: Creating a Pipeline - LeanAgileKC 2015

@ablythe73

Page 74: Creating a Pipeline - LeanAgileKC 2015

@ablythe74

Page 75: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Key Takeaways

❖ Focus on culture first and continually

❖ Find largest outlier for lead time, automat that, repeat

❖ Use tooling the developers love and get out of their way

❖ Don’t use big bang; consider the strangler pattern

❖ Use master not branches

75

Page 76: Creating a Pipeline - LeanAgileKC 2015

@ablythe

Reading List

76