creating a pipeline - leanagilekc 2015
TRANSCRIPT
Aaron Blythe
Continuous Delivery Pipeline
Aaron Blythe
1
@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
@ablythe3
@ablythe4
@ablythe5
@ablythe6
@ablythe7
@ablythe8
@ablythe9
@ablythe10
https://twitter.com/ablythe
@ablythe
"Treat your delivery pipeline as the heartbeat of your organization." @DibbeEdwards #DOES15
11
@ablythe
What is a Pipeline?
12
@ablythe13
@ablythe14
@ablythe15
@ablythe
Mark Burgess
❖ “Every time someone logs into a system interactively, they compromise everyone’s knowledge of that system”
16
@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
@ablythe18
@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
@ablythe
Three Things to Get Right
•Culture •Workflow •Tooling
20
@ablythe
Part 1
Culture2. Workflow 3. Tooling
21
@ablythe22
@ablythe
Fremont Assembly Plant
http://en.wikipedia.org/wiki/Fremont_Assembly23
@ablythe
NUMMI plant
http://en.wikipedia.org/wiki/NUMMI
24
@ablythe
Tesla Factory
http://en.wikipedia.org/wiki/Tesla_Factory25
@ablythe
Netflix Culture Deck
26
@ablythe
Adrian Cockcroft - Formerly Netflix
27
@ablythe
Michael McGarr - Currently Netflix
28
@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
@ablythe30
@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
@ablythe
Auftragstaktik
32
@ablythe
2014 State of DevOps Report
9,200 technologists
33
@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
@ablythe35
@ablythe36
@ablythe
Part 2
Workflow3. Tooling
1. Culture
37
@ablythe38
@ablythe39
@ablythe40
@ablythe41
@ablythe42
@ablythehttp://assets.en.oreilly.com/1/event/60/Velocity%20Culture%20Presentation.pdf43
@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
@ablythe
What does that last slide mean?
❖ API!!!!!!
45
@ablythehttp://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment
46
@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
@ablythehttp://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment
48
@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
@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
@ablythe
Gary Gruver - HP Transformation
51
https://medium.com/@aaronblythe/
@ablythe52
@ablythe53
@ablythe54
@ablythe
Command and Control vs. Promise Theory
55
@ablythe56
@ablythe
Value Stream Mapping
57
@ablythe
Red Mark
58
@ablythe
Kanban to Measure
59
@ablythehttp://www.slideshare.net/dev2ops/dev-ops-kaizen-damon-edwards60
@ablythehttp://www.slideshare.net/dev2ops/dev-ops-kaizen-damon-edwards61
@ablythehttp://www.slideshare.net/dev2ops/dev-ops-kaizen-damon-edwards62
@ablythe
Strangler Pattern
https://en.wikipedia.org/wiki/Strangler_fig63
@ablythe
Part 3
Tooling
1. Culture2. Workflow
64
@ablythe
Continuous Delivery Tools
Workflow PluginDelivery
Many more over the next couple years…
65
@ablythe
Chef Delivery
66
@ablythe
Go (from ThoughtWorks)
67
@ablythe68
@ablythe
Jenkins
69
@ablythe
Can this actually be done?
70
@ablythe71
@ablythe
If we delivery faster so what?
72
@ablythe73
@ablythe74
@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
@ablythe
Reading List
76