Making Easy = Right (DevOps @ Wotif)

71
DevOps @ Wotif Making Easy = Right Alexandra Spillane • @ajbw Matt Callanan • @mcallana Right Easy

description

DevOps @ Wotif: Making Easy = Right Video: https://vimeo.com/102211796 Abstract: We know the “right thing” to do is to work together, to remove bottlenecks, to automate, automate, automate. But when the status quo is finger-pointing, mistrust, blame, and over-exhaustion from increasingly complex manual releases, it seems impossible to find a way to climb out of the downward spiral. How did an IT department turn this around to become a harmonious department with common goals and over 10x faster cycle times? Winning the hearts and minds needed for lasting DevOps change requires something more than just great automation. This is the story of how local Brisbane success story, Wotif Group, found a way to incentivise a DevOps transformation across an entire IT department, resulting in cycle times measured in hours instead of weeks/months. While this journey involved tools such as Puppet, Hiera, Fabric & ZooKeeper, Matt (dev) and Alexandra (ops) extract principles that they hope can be applied to any organisation at grassroots and leadership levels using existing toolchains to support not only the best ideas of the present but also the legacy of the past and the unknown innovation of the future. Speakers: Alexandra Spillane (@ajbw) is a systems administrator with more than ten years experience administering Linux and Unix systems. She has been a member of Wotif Group's Continuous Delivery team since its inception in 2013. She loves using tools like Puppet to solve thorny problems in creative ways and will be speaking at PuppetConf 2014. Matt Callanan (@mcallana) is a senior software developer in the Continuous Delivery team at Wotif Group. He has over 14 years development experience including DevOps implementation and agile mentoring in small teams and large enterprises. He is most passionate about helping companies realise their potential through automation and reducing feedback cycles to quickly deliver value to customers. Matt has spoken internationally on DevOps, is a well-received presenter to IT departments and executive teams, and co-organises the DevOps Brisbane Meetup. http://devopsdays.org/events/2014-brisbane/proposals/devops_at_wotif_making_easy_equals_right/

Transcript of Making Easy = Right (DevOps @ Wotif)

Page 1: Making Easy = Right (DevOps @ Wotif)

DevOps @ Wotif Making Easy = Right

Alexandra Spillane • @ajbw Matt Callanan • @mcallana

Right

Easy

Page 2: Making Easy = Right (DevOps @ Wotif)

Outline

•  What is “The Right Thing”? •  How do we Make it Easy? •  Lessons Learned

Making Easy = Right 2

Page 3: Making Easy = Right (DevOps @ Wotif)

What is “The Right Thing”? DevOps @ Wotif: Making Easy = Right

Making Easy = Right 3

Page 4: Making Easy = Right (DevOps @ Wotif)

“The Right Thing”

Making Easy = Right 4

Collaborate!  

Automate!  

Page 5: Making Easy = Right (DevOps @ Wotif)

But… The Dev<->Ops Chasm

Making Easy = Right 5

Page 6: Making Easy = Right (DevOps @ Wotif)

What Were we Doing Wrong?

Making Easy = Right 6

Page 7: Making Easy = Right (DevOps @ Wotif)

Downward Spiral of Manual Activity

Making Easy = Right 7

Page 8: Making Easy = Right (DevOps @ Wotif)

Entrenched Silos

Making Easy = Right 8

Page 9: Making Easy = Right (DevOps @ Wotif)

High Release Overheads

Making Easy = Right 9

Page 10: Making Easy = Right (DevOps @ Wotif)

Huge Batch Sizes

Making Easy = Right 10

Page 11: Making Easy = Right (DevOps @ Wotif)

Calendar of Doom

Making Easy = Right 11

Page 12: Making Easy = Right (DevOps @ Wotif)

Unpredictable Prioritisation

Making Easy = Right 12

Page 13: Making Easy = Right (DevOps @ Wotif)

Superstitious Gatekeeping

Making Easy = Right 13

just in case

Page 14: Making Easy = Right (DevOps @ Wotif)

Stagnating Applications

Making Easy = Right 14

Page 15: Making Easy = Right (DevOps @ Wotif)

Release Anti-Patterns

Making Easy = Right 15

Extensive, detailed release documentation

Reliance on manual testing to confirm app is correct

Explaining why deployment is going wrong on release day

Frequent corrections to release process during release

Environments that differ in their configuration

Releases that take more than a few minutes to perform

Releases that are unpredictable in their outcome

Page 16: Making Easy = Right (DevOps @ Wotif)

16

Application Pipelines Ops

Days

Weeks!

Days

Staging Load Test Production

Days

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Prio

ritis

ed R

elea

se Q

ueue

Cycle Time measured in

weeks/months  

Page 17: Making Easy = Right (DevOps @ Wotif)

Plus… Migrating to MSA

•  Explosion of manual effort

Making Easy = Right 17

A B

C D

E F

A

B1 C1 G C2 H I

B2 D1 J

D2 K L1 M L2 N

E F1 O P

F2 Q R S T

Page 18: Making Easy = Right (DevOps @ Wotif)

HeavyWeight to LightWeight

Glassfish •  Feature overhead •  Encouraged manual config •  Complex/Slow deployment

DropWizard •  Trimmed down to basics •  Standard config files •  Simple/Fast deployment

Making Easy = Right 18

Page 19: Making Easy = Right (DevOps @ Wotif)

But… Combinatorial Explosion

Making Easy = Right 19

Page 20: Making Easy = Right (DevOps @ Wotif)

Unpredictability Slows You Down

Making Easy = Right 20

Page 21: Making Easy = Right (DevOps @ Wotif)

Moving from wrong to right

Making Easy = Right 21

Wrong

Right

Page 22: Making Easy = Right (DevOps @ Wotif)

Flexibility vs Predictability

•  Freedom is Great for Innovation •  Consistency is Essential For Speed •  How do we promote a culture of freedom

and responsibility but still provide predictability?

Flexible Predictable

Making Easy = Right 22

Page 23: Making Easy = Right (DevOps @ Wotif)

Standardisation

Making Easy = Right 23

Standardised

Freedom

•  Standardise on how services are deployed and how they communicate.

•  Be flexible about their contents.

Page 24: Making Easy = Right (DevOps @ Wotif)

Defining Standards

•  Discussions –  One-on-one –  IM –  Emails –  Meetings

•  Incentivise input •  Confluence

–  Application Deployment Standards 1.0

Making Easy = Right 24

Page 25: Making Easy = Right (DevOps @ Wotif)

Example Standards

Making Easy = Right 25

Logging •  Log file locations, filenames

Log rotate Directories/Files •  Ownership,

permissions

Puppet

Supervisord config.yaml •  Filename, location

Metrics JVM settings

Network •  Ports •  Firewall rules

Cron Endpoints •  Healthchecks, status,

metrics

SSL •  Certs, keystores

RPM •  Versioning •  Packaging

init.d scripts •  Sub-commands

Versioning Migration Notes

Page 26: Making Easy = Right (DevOps @ Wotif)

Example Standards

Making Easy = Right 26

Page 27: Making Easy = Right (DevOps @ Wotif)

Future Considerations

Making Easy = Right 27

Page 28: Making Easy = Right (DevOps @ Wotif)

Standards Lifecycle

Making Easy = Right 28

Page 29: Making Easy = Right (DevOps @ Wotif)

Common Ground

Making Easy = Right 29

Page 30: Making Easy = Right (DevOps @ Wotif)

How do we Make it Easy? DevOps @ Wotif: Making Easy = Right

Making Easy = Right 30

Page 31: Making Easy = Right (DevOps @ Wotif)

Automated Verification

Making Easy = Right 31

Page 32: Making Easy = Right (DevOps @ Wotif)

Compliance Test Suite

Making Easy = Right 32

Page 33: Making Easy = Right (DevOps @ Wotif)

Brought Ops into Dev

Making Easy = Right 33

Page 34: Making Easy = Right (DevOps @ Wotif)

Fast Operational Feedback

Making Easy = Right 34

Page 35: Making Easy = Right (DevOps @ Wotif)

Test-Driven Ops Compatibility

Making Easy = Right 35

Page 36: Making Easy = Right (DevOps @ Wotif)

Backwards Compatible Tests

Making Easy = Right 36

Page 37: Making Easy = Right (DevOps @ Wotif)

Reference Implementation

•  “helloworld-service” •  Deployed to production

Making Easy = Right 37

Page 38: Making Easy = Right (DevOps @ Wotif)

Ops Testing with Fabric

Making Easy = Right 38

• Does rpm have correct metadata linking to git repo? Check existence/absence of files rpm • Is correct version actually installed? yum • Check existence/absence of files. Check file permissions/ownership ls • Is correct version actually running? lsof • Check correct ports exposed netstat • Is correct log format in use? tail • Check cron config grep • Check contents of standalone jar file – e.g. metadata, library versions unzip • Check standard endpoints for e.g. content, status code, response time curl • Check JVM options jps • Check 1 and only 1 process running ps

Page 39: Making Easy = Right (DevOps @ Wotif)

Compliance Test Example

Making Easy = Right 39

Page 40: Making Easy = Right (DevOps @ Wotif)

Rolling Upgrade

•  Safely automate cluster upgrades •  Orchestrated with Fabric

Making Easy = Right 40

• Check Load Balancer

Exit Pool

• Orchestrate Puppet

Upgrade

• Compliance Test •  Smoke Test •  Feature Test

Test

• Check Load Balancer

Enter Pool

•  exitpool •  stop •  yum remove •  yum install • Wait for manual

testing! •  enterpool

Manual Release

Page 41: Making Easy = Right (DevOps @ Wotif)

SLIPway

Making Easy = Right 41

•  Big review of old release processes

•  Simple Lightweight Independent Path Way

•  Simple rules for release process

•  Keep changes independent

•  Focus on reducing cycle time

Page 42: Making Easy = Right (DevOps @ Wotif)

42

Application Pipelines Ops

Days

Weeks!

Days

Staging Load Test Production

Days

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Prio

ritis

ed R

elea

se Q

ueue

Page 43: Making Easy = Right (DevOps @ Wotif)

43

Application Pipelines Ops

Prio

ritis

ed R

elea

se Q

ueue

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Dev QA

Staging Load Test Production

Staging Load Test Production

Staging Load Test Production

Staging Load Test Production

Staging Load Test Production

Staging Load Test Production

Staging Load Test Production

Staging Load Test Production

Staging Load Test Production

Hours Hours

Sim

ple

Rule

s  

Page 44: Making Easy = Right (DevOps @ Wotif)

Simple Rules for SLIPWay

44 Making Easy = Right

Page 45: Making Easy = Right (DevOps @ Wotif)

Simple Rules for SLIPWay

45 Making Easy = Right

Page 46: Making Easy = Right (DevOps @ Wotif)

Making Easy = Right 46

Page 47: Making Easy = Right (DevOps @ Wotif)

Making Easy = Right 47

Page 48: Making Easy = Right (DevOps @ Wotif)

SLIPway Chat Room

Making Easy = Right 48

Page 49: Making Easy = Right (DevOps @ Wotif)

SLIPway Example Release

Making Easy = Right 49

Page 50: Making Easy = Right (DevOps @ Wotif)

Releases Per Month

Making Easy = Right 50

Page 51: Making Easy = Right (DevOps @ Wotif)

4x Less Effort with 2x Releases

Making Easy = Right 51

Page 52: Making Easy = Right (DevOps @ Wotif)

Release Cycle Time Comparison

Making Easy = Right 52

7x lower Avg. Cycle Time

Page 53: Making Easy = Right (DevOps @ Wotif)

Lessons Learned DevOps @ Wotif: Making Easy = Right

53

Page 54: Making Easy = Right (DevOps @ Wotif)

Lessons Learned

Making Easy = Right 54

Get the Balance Right Chip Away At The Iceberg Migration Notes The Carrot, Not The Stick Strongly Type Your Discussions Use Semantic Versioning Warranty Period Small Batch Size for Standards Embrace Legacy

Page 55: Making Easy = Right (DevOps @ Wotif)

Get the Balance Right

No Standards Too Many Checkpoints

Making Easy = Right 55

Page 56: Making Easy = Right (DevOps @ Wotif)

Chip Away at the Iceberg

Making Easy = Right 56

Page 57: Making Easy = Right (DevOps @ Wotif)

Migration Notes

•  Annotate changes since previous standards – E.g. “(since v2.3)”

•  Each standard version has migration notes from previous version

•  Can upgrade between several versions by following migration notes nav bar

Making Easy = Right 57

1.0 2.0 2.1 2.2 2.3

Page 58: Making Easy = Right (DevOps @ Wotif)

The Carrot, Not The Stick

•  We tried the stick approach for years –  You’re doing it wrong! –  (But we won’t tell you how

to do it right)

•  Blame games, anger •  No business impetus to

improve things

•  Now we’re trying the carrot approach –  Offer a great new

alternative –  It’s optional! –  You know you want it…

•  Business invested in the process

Making Easy = Right 58

Page 59: Making Easy = Right (DevOps @ Wotif)

Strongly Type Your Discussions

•  Choose catchy names – Helps make decisions – Helps climb out of muck

•  Use State Transition tables – State -> Action -> New State – Visualise problems – Decide what to support

Making Easy = Right 59

Page 60: Making Easy = Right (DevOps @ Wotif)

E.g. Glassfish Service States

Making Easy = Right 60

Page 61: Making Easy = Right (DevOps @ Wotif)

E.g. Lightweight Service States

Making Easy = Right 61

Page 62: Making Easy = Right (DevOps @ Wotif)

Be Opinionated – Not Arrogant

•  Strong decisions are important •  But you’ll never get it 100% up front

Making Easy = Right 62

I’m kind of a big

deal

Page 63: Making Easy = Right (DevOps @ Wotif)

Use Semantic Versioning

•  Especially for shared libraries

Making Easy = Right 63

1 . 2 . 3  Major   Minor   Patch  

semver.org  

Page 64: Making Easy = Right (DevOps @ Wotif)

Warranty Period

•  Can’t get standards 100% right

•  But need to lock them down

•  Two-week warranty period

•  Trial in range of different applications

Making Easy = Right 64

Page 65: Making Easy = Right (DevOps @ Wotif)

Small Batch Size for Standards

•  Minor updates every 1-2 months

•  Fast feedback •  Enable innovation •  Easier to update

Making Easy = Right 65

Page 66: Making Easy = Right (DevOps @ Wotif)

Embrace Legacy

•  You’re creating legacy •  Make migration easy •  Incentivise catch-up

Making Easy = Right 66

Page 67: Making Easy = Right (DevOps @ Wotif)

Building Blocks SLIPway •  Simple Rules, Independence

Rolling Upgrade •  Automated Deploy & Test

Compliance Tests •  Test-driven Ops Compatibility

Standards •  The Agreed “Right Thing”

Making Easy = Right 67

The Right Thing

Making It Easy

Page 68: Making Easy = Right (DevOps @ Wotif)

Making Easy = Right 68

Right

Easy

Page 69: Making Easy = Right (DevOps @ Wotif)

Making Easy = Right 69

Right

Easy

Page 70: Making Easy = Right (DevOps @ Wotif)

Thanks for listening! Any questions?

Alexandra Spillane • @ajbw Matt Callanan • @mcallana

P.S.– we’re hiring! à

Page 71: Making Easy = Right (DevOps @ Wotif)

Image Attribution •  Creative Commons:

–  Downward Spiral: http://flic.kr/p/67Giiz –  Chasm: https://flic.kr/p/abuWHt –  Wrong way: https://flic.kr/p/cRjc6q –  Silos: https://flic.kr/p/6WueVm –  Testing Ice-cream: http://watirmelon.files.wordpress.com/2012/01/softwaretestingicecreamconeantipattern.png –  Lifting boat: https://flic.kr/p/ddUf4S –  Batch Size: http://dev2ops.org/2012/03/devops-lessons-from-lean-small-batches-improve-flow/ –  Changed Priorities: https://flic.kr/p/debvm –  Stop: https://flic.kr/p/aUEW1D –  Stagnant: https://flic.kr/p/3MvvsH –  Thinking: https://flic.kr/p/6wdLat –  Rubber Bands: https://flic.kr/p/a2XZDB –  Climbing: https://flic.kr/p/4U2BB1 –  Indian Traffic: http://frrl.files.wordpress.com/2012/07/logo_indiatraffic.png –  Red Tape: https://flic.kr/p/b7T3JD –  Slipway: https://flic.kr/p/9oQVh8 –  Iceberg: https://flic.kr/p/hV1vwH –  River: https://flic.kr/p/7EMs4T

•  Additional Stock photos: –  iPhotoStock –  Shutterstock

•  Standardisation Theory –  Diagram inspired by: http://www.slideshare.net/spnewman/practical-microservices-yow-2013/56

Making Easy = Right 71