58
@RealGeneKim, [email protected] “The DevOps Cookbook” Gene Kim IT Revolution Press DevOps/Kanban Meetup March 22, 2012

DevOps Kanban Meet Up 3/22/12

Embed Size (px)

Citation preview

Page 1: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

“The DevOps Cookbook”

Gene KimIT Revolution Press

DevOps/Kanban MeetupMarch 22, 2012

Page 2: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The Downward SpiralOperations Sees…• Fragile applications are prone to failure• Long time required to figure out “which

bit got flipped”• Detective control is a salesperson• Too much time required to restore

service• Too much firefighting and unplanned

work • Urgent security rework and remedation• Planned project work cannot complete• Frustrated customers leave• Market share goes down• Business misses Wall Street

commitments• Business makes even larger promises to

Wall Street

Dev Sees…• More urgent, date-driven projects put

into the queue• Even more fragile code (less secure)

put into production• More releases have increasingly

“turbulent installs”• Release cycles lengthen to amortize

“cost of deployments”• Failing bigger deployments more

difficult to diagnose• Most senior and constrained IT ops

resources have less time to fix underlying process problems

• Ever increasing backlog of work that cold help the business win

• Ever increasing amount of tension between IT Ops, Development, Design…

These aren’t IT or Design problems…These are business problems!

Page 3: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

My Mission: Figure Out How Break The IT Core Chronic Conflict

• Every IT organization is pressured to simultaneously:– Respond more quickly to urgent business needs– Provide stable, secure and predictable IT service

Source: The authors acknowledge Dr. Eliyahu Goldratt, creator of the Theory of Constraints and author of The Goal, has written extensively on the theory and practice of identifying and resolving core, chronic conflicts.

Words often used to describe process improvement:“hysterical, irrelevant, bureaucratic, bottleneck, difficult to understand, not aligned

with the business, immature, shrill, perpetually focused on irrelevant technical minutiae…”

Page 4: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Good News: It Can Be Done

Bad News: You Can’t Do It Alone

Page 5: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Ops

Page 6: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

QA And Test

Source: Flickr: vandyll

Page 7: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Development

Page 8: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Infosec

Page 9: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: Flickr: birdsandanchors

Product Management And Design

Page 10: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

DevOps:The Shining Beacon Of Hope

Page 11: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: John Allspaw

Page 12: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: John Allspaw

Page 13: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: John Allspaw

Page 14: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: Theo Schlossnagle

Page 15: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: Theo Schlossnagle

Page 16: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: Theo Schlossnagle

Page 17: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: John Jenkins, Amazon.com

Page 18: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: James Wickett

Page 19: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: James Wickett

Page 20: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The Prescriptive DevOps Cookbook

• “DevOps Cookbook” Authors– Patrick DeBois, Mike Orzen, John

Willis, Gene Kim

• Goals– Codify how to start and finish

DevOps transformations– How does Development, IT

Operations and Infosec become dependable partners

– Describe in detail how to replicate the transformations describe in “When IT Fails: The Novel”

Page 21: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Philosophies And Outcomes:The Three Ways

Page 22: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Page 23: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The First Way:Systems Thinking

Page 24: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The First Way:Systems Thinking (Left To Right)

• Never pass defects to downstream work centers

• Never allow local optimization to create global degradation

• Increase flow: elevate bottlenecks, reduce WIP, throttle release of work, reduce batch sizes

Page 25: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The First Way:Outcomes

• Determinism in the release process• Continuation of the Agile and CI/CR processes• Creating single repository for code and environments• Packaging responsibility moves to development• Consistent Dev, QA, Int, and Staging environments, all

properly built before deployment begins• Decrease cycle time

– Reduce deployment times from 6 hours to 45 minutes– Refactor deployment process that had 1300+ steps

spanning 4 weeks• Faster release cadence

Page 26: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The Second Way:Amplify Feedback Loops

Page 27: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The Second Way:Amplify Feedback Loops (Right to Left)

• Protect the integrity of the entire system of work, versus completion of tasks

• Expose visual data so everyone can see how their decisions affect the entire system

Page 28: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The Second Way:Outcomes

• Andon cords that stop the production line• Kanban to control work• Project freeze to reduce work in process• Eradicating “quick fixes” that circumvent the process• Ops user stories are part of the Agile planning process• Better build and deployment systems• More stable environment• Happier and more productive staff

Page 29: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The Third Way:Culture Of Continual Experimentation And Learning

Page 30: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The Third Way:Culture Of Continual Experimentation And Learning

• Foster a culture that rewards:– Experimentation (taking risks) and learning from failure– Repetition is the prerequisite to mastery

• Why?– You need a culture that keeps pushing into the danger

zone– And have the habits that enable you to survive in the

danger zone

Page 31: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

The Third Way:Outcomes

• 15 minutes/daily spent on improving daily work• Continual reduction of unplanned work• More cycles for planned work• Projects completed to pay down technical debt and increase

flow• Elimination of needless complexity• More resilient code and environments• Balancing nimbleness and practiced repetition• Enabling wider range of risk/reward balance

Page 32: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Some Prescriptive Steps

Page 33: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Phase 1: Extend the Agile CI/CR Processes

• Assign Ops person into Dev team• Create one-step Dev, Test and Production

environment creation procedure• Create the one-step automated code

deployment procedure• Define roles of Dev, QA, Prod Mgmt and

Infosec

Page 34: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Phase 2: Extend Release Process And Create Right -> Left Feedback Loops

• Embed Dev into Ops escalation process• Invite Dev to post-mortems/root cause analysis

meeting• Create necessary rollback procedures (instead of

fixing forward)• Create application monitoring/metrics to aid in

Ops work (e.g., incident/problem management)• Actively manage flow of work across org

boundaries

Page 35: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Phase 3: Organize Dev and Ops To Achieve Organizational Goals

• Allocate 20% of Dev cycles to non-functional requirements

• Build Ops user stories and environments in Dev that can be reused across all projects (e.g., deployment, capacity, security)

• Integrate fault injection and resilience into design, development and production (e.g., Chaos Monkey)

• Prioritize backlog to manage technical debt

Page 36: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Phase 4: Reflection, Introspection, Continually Improvement?

• Create improvement cycles (2 week: improve something)

• Create rituals to reward taking risks and learning from failure: Ensure proper balance of risk and reward

• Find bottlenecks and increase capacity when needed

• Reflection: given where the Organization needs to go, where do we need to be going

Page 37: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

When IT Fails: The Novel and The DevOps Cookbook

• Coming in July 2012

• “In the tradition of the best MBA case studies, this book should be mandatory reading for business and IT graduates alike.” -Paul Muller, VP Software Marketing, Hewlett-Packard

• “The greatest IT management book of our generation.” –Branden Williams, CTO Marketing, RSAGene Kim, Tripwire founder,

Visible Ops co-author

Page 38: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

When IT Fails: The Novel and The DevOps Cookbook

• Coming in July 2012

• If you would like the “Top 10 Things You Need To Know About DevOps,” sample chapters and updates on the book:

Sign up at http://itrevolution.com Email [email protected] me your business card

Gene Kim, Tripwire founder, Visible Ops co-author

Page 39: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

To Join The Movement

• If you would like the “Top 10 Things You Need To Know About DevOps,” sample chapters and updates on the book:

Sign up at http://itrevolution.com Email [email protected] me your business card

Page 40: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Page 41: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Other Resources

• From the IT Process Institute www.itpi.org– Both Visible Ops Handbooks– ITPI IT Controls Performance Study

• Rugged Software by Corman, et al: http://ruggedsoftware.org

• “Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation” by Humble, Farley

• Follow us…– @JoshCorman, @RealGeneKim– mailto:[email protected] – http://realgenekim.me/blog

Page 42: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Page 43: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Meeting The DevOps Leadership Team

• Typically led by Dev, QA, IT Operations and Product Management/Design

• Our ultimate goal is to add value at every step in the flow of work– See the end-to-end value flow– Shorten and amplify feedback loops– Help break silos (e.g., server, networking,

database)

Page 44: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Definition: Agile Sprints

• The basic unit of development in Agile Scrums, typically between one week and one month

• At the end of each sprint, team should have potentially deliverable product

46Aha Moment: shipping product implies not just code –

it’s the environment, too!

Page 45: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Help Dev And Ops Build Code And Environments

• Dev and Ops work together in Sprint 0 and 1 to create code and environments– Create environment that Dev deploys into– Create downstream environments: QA, Staging,

Production– Create testable migration procedures from Dev all

the way to production• Integrate Infosec and QA into daily sprint

activities

Page 46: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Definition: Andon Cord

48

Page 47: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Integrate Ops Into Dev

• Embed Ops person into Dev structure– Describes non-functional requirements, use cases

and stories from Ops– Responsible for improving “quality at the source”

(e.g., reducing technical debt, fix known problems, etc.)

– Has special responsibility for pulling the Andon cord

• No ability to restart service without rebooting• Configuration settings impossible to find

Page 48: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Integrate Dev Into Ops

• MobBrowser case study: “Waking up developers at 3am is a great feedback loop: defects get fixed very quickly”

• Goal is to get Dev closer to the customer– Infosec can help determine when it’s too close

(and when SOD is a requirement)

Page 49: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Keep Shrinking Batch Sizes

• Waterfall projects often have cycle time of one year

• Sprints have cycle time of 1 or 2 weeks• When IT Operations work is sufficiently fast

and capable, we may decide to decouple deployments from sprint boundaries (e.g., Kanbans)

Page 50: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Definition: Kanban Board

• Signaling tool to reduce WIP and increase flow

52

Page 51: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

IT Operations Increases Process Rigor

• Standardize deployment• Standardize how unplanned work is

prosecuted: make it repeatable• Modify first response: ensure constrained

resources have all data at hand to diagnose• Elevate preventive activities to reduce

incidents

Page 52: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Letter to Development

• Seek the downstream effects of your actions– Unplanned work comes at the expense of planned

work– Technical debt retards feature throughput– Environment matters as much as the code

• Allocate time for fault modeling, asking “what could go wrong?” and implementing countermeasures

Page 53: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Letter To QA

• Ensure test plans cover not only code functionality, but also:– Suitability of the environment the code runs in– The end-to-end deployment process

• Help find variance…– Functionality, performance, configuration– Duration, wait time and handoff errors, rework, …

Page 54: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Letter To IT Operations

• “The best way to avoid failure is to fail constantly”

• Harden the production environment

• Have scheduled drills to “crash the data center”

• Create your “chaos monkeys” to introduce faults into the system (e.g., randomly kill processes, take out servers, etc.)

• Rehearse and improve responding to unplanned work

– NetFlix: Hardened AWS service

– StackOverflow– Amazon firedrills (Jesse Allspaw)– The Monkey (Mac)

Page 55: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

You Don’t Choose Chaos Monkey…Chaos Monkey Chooses You

Page 56: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

Letter To Product Management

Lesson: Allocate 20% of Dev cycles to paying down technical debt

Page 57: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]

To Designers

• Help IT Operations codify their work and requirements into great and ever increasing library of user stories

• Realize that IT processes are likely the largest impediment preventing your great ideas from making it to market

Page 58: DevOps Kanban Meet Up 3/22/12

@RealGeneKim, [email protected]: James Wickett