Top Banner
Understanding DevOps Core Concepts Nitin Bhide http://thinkingcraftsman.in [email protected] Aug 2017
53

DevOps - Understanding Core Concepts (Old)

Jan 21, 2018

Download

Software

Nitin Bhide
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DevOps - Understanding Core Concepts (Old)

Understanding DevOps Core Concepts

Nitin Bhidehttp://thinkingcraftsman.in

[email protected]

Aug 2017

Page 2: DevOps - Understanding Core Concepts (Old)

Some basic guidelines

This is a ‘Learning Program’ and not a ‘training program’.◦ Hence your Active Participation is needed.

◦ Participate in discussions

◦ Ask questions/doubts.

◦ If you have not understood some point/concept, Raise your hand and ASK

Avoid side conversations

Avoid phone calls/emails.

8/21/2017 Commercial in confidence. (C) Nitin Bhide 2

Page 3: DevOps - Understanding Core Concepts (Old)

Some basic guidelines

Understand that there are no 'absolute truths' in software development. Hence We may disagree with some points/ ideas. And THAT IS OK.

In dealing with disagreements, focus on the technical merits.

◦ And not on who said it. (Somebody’s guidelines, some books etc etc)

8/21/2017 Commercial in confidence. (C) Nitin Bhide 3

Page 4: DevOps - Understanding Core Concepts (Old)

WHAT IS DEVOPS ?

Page 5: DevOps - Understanding Core Concepts (Old)

Some History

DevOps movement really started with a Session in Velocity Conference in 2009

Session was “10+ Deploys Per Day: Dev and Ops Cooperation at Flickr”by John Allspaw and Paul Hammand

Video

Page 6: DevOps - Understanding Core Concepts (Old)

Dev Vs Ops Conflict

Its Not my Code, its your

machines

Its not my machine, its your code.

Page 7: DevOps - Understanding Core Concepts (Old)

Traditional Thinking

Dev’s job is to add new features

Op’s job is to keep site

stable and fast

Page 8: DevOps - Understanding Core Concepts (Old)

But something’s wrong here.

Ops Job is to ‘Enable’ business

That’s Dev’s Job too.

Page 9: DevOps - Understanding Core Concepts (Old)

But

Business Requires CHANGE

But Change is root cause of most outages

Page 10: DevOps - Understanding Core Concepts (Old)

Discourage change in the interest of stability

OR

Allow change to happen as often as it needs to

Is there way to achieve stability and still allow change ?

Choice !!!

Page 11: DevOps - Understanding Core Concepts (Old)

Enter ‘DevOps’

DevOps

is a way to lower the risk of ‘Change’

with TOOLS and CULTURE

Page 12: DevOps - Understanding Core Concepts (Old)

DEVOPS – KEY PRACTICES AND CULTURE

Page 13: DevOps - Understanding Core Concepts (Old)

Key DevOps Practices

1. Automated Infrastructure2. Shared Version Control (between Dev and Ops)3. One Step Build4. One Step Build and Deploy5. Change Tracking – Who, When, What ?6. Small Frequent Changes and Deploy7. Feature Flags8. Shared Metrics9. ChatBots – IRC/IM Robots

-- John Allspaw and Paul Hammand, Velocity Conf. 2009

Page 14: DevOps - Understanding Core Concepts (Old)

Culture

Respect for One Another (Dev, QA, Ops)

Trust

Shared Runbook and Escalation Plans

Healthy Attitude About Failure

◦ Fail Fast

◦ Assume Operation Failures will occur and plan for fast recovery

Avoid Blame

Page 15: DevOps - Understanding Core Concepts (Old)

DevOps is NOT EASY

Its easier to continue shouting at each other

However, DevOps is much more rewarding

Page 16: DevOps - Understanding Core Concepts (Old)

Fast Changing World of DevOps

• 10+ Deploys per Day in Flickr2009

• Amazon – 23,000 deploys/day

• Google – 5,500 deploys/day

• Netflix – 500 deploys/day

• Typical Enterprise – ONCE every Nine Months

2012

Page 17: DevOps - Understanding Core Concepts (Old)

Business Value of DevOps

Why Companies are suddenly SO interested in DevOps ????

Data shows that Companies who use DevOps have

30X more frequent code deploys 8000x faster code deployment lead times 2x change success rate 12x faster MTTR (Mean Time to Repair) 2x more likely to succeed in profitability, market

share and productivity goals

Page 18: DevOps - Understanding Core Concepts (Old)

Let me ask you a Question

How long it takes for your team to deploy a change

that involves one single line of code ??

(rephrasing the quote from Mary Poppendiek, Lean Software Deveopment Guru)

Page 19: DevOps - Understanding Core Concepts (Old)

DEVOPS - CONFUSIONS

Page 20: DevOps - Understanding Core Concepts (Old)

Projects

We are doing ‘project’, our customer’s operations team (or another vendor) does a deploy. Now

Customer wants all vendors to do DevOps

We claim that we are doing DevOps.

Are we ??

Page 21: DevOps - Understanding Core Concepts (Old)

Desktop Applications

We develop a desktop app and release it to our Customers/End Users.

So we are the ‘Devs’ but then who is our ‘Ops’ ?

How do we do DevOps then ?

Page 22: DevOps - Understanding Core Concepts (Old)

TWO KEY DEVOPS INSIGHTS

Page 23: DevOps - Understanding Core Concepts (Old)

DevOps Insight -1

SDLC is slightly different from DevOps perspective

Page 24: DevOps - Understanding Core Concepts (Old)

Traditional SDLC

Design Code Build

TestDeploy

(?)

Page 25: DevOps - Understanding Core Concepts (Old)

DevOps Perspective of SDLC

Design Code Build Test

DeployMonitor/Track in Operation

AnalyzeFeedback

Dev

Ops

Page 26: DevOps - Understanding Core Concepts (Old)

What are you doing to ‘lower the risk of change’ ? Are your tools practices ‘lowering the risk of change’

DevOps Insight - 2

DevOps is a way to

LOWER the risk of ‘Change’ with

TOOLS and CULTURE

Page 27: DevOps - Understanding Core Concepts (Old)

TIP - How to lower the ‘risk’ of change ?

KEY – Find out what kind of change you are afraid of

THEN Just do the kind of ‘change’ more often.

For example, deploy everyday rather than holding up a list of features for end of month deploy

Develop tools to roll back a deploy if things go wrong

Page 28: DevOps - Understanding Core Concepts (Old)

Key DevOps Practices

1. Automated Infrastructure2. Shared Version Control (between Dev and Ops)3. One Step Build4. One Step Build and Deploy5. Change Tracking – Who, When, What ?6. Small Frequent Changes and Deploy7. Feature Flags8. Shared Metrics9. ChatBots – IRC/IM Robots

-- John Allspaw and Paul Hammand, Velocity Conf. 2009

Page 29: DevOps - Understanding Core Concepts (Old)

What are you doing to ‘Lower the Risk of Change’ ??

If you are , then you are following ‘spirit’ of DevOps

Lets list some of these practices/tools that you are using ?

Page 30: DevOps - Understanding Core Concepts (Old)

BEING AGILEBY FOLLOWING DEVOPS

Page 31: DevOps - Understanding Core Concepts (Old)

Agile/DevOps/Kanban/LEAN

Agile/DevOps are applying Concepts of ‘FLOW’ from Toyota Production System /TQM /LEAN to Software

Reduce Batchsize to reduce WIP

‘Push’ vs ‘Pull’ production systems

Left to Right Flow

Page 32: DevOps - Understanding Core Concepts (Old)

Reduce the ‘batch size’ and do more batches/releases/deployments with smaller

number of features/changes/bug fixes

Just do the same kind of ‘change’ more often.

Page 33: DevOps - Understanding Core Concepts (Old)

Reduce WIP by reducing batch sizes

Page 34: DevOps - Understanding Core Concepts (Old)

Reduce WIP by reducing batch sizes

Timeboxed short sprints

◦ Remember 1 month Sprint has 2x ‘WIP’ than 2 week sprint and hence can double the ‘overall cost’.

Ultimately leading to continuous delivery (or Single Piece Flow)

WIP – Work In Progress Inventory

Page 35: DevOps - Understanding Core Concepts (Old)

Achieving Early ROI

Monthly/Quarterly Releases - Worst

ROI

• Integrated build prepared on developer desktop and tested.

• Manual work.

Daily Shippable Build – Better ROI

• Automated binary creation

• Automation of static analysis, unit tests, etc

Continuous Integration – Even

Better ROI

• Prepare binaries and run tests on every commits

• Really low regression bugs

Continuous Delivery – BEST

ROI

• Best releases are in end users hands immediately

• No more Periodic Major releases.

36

Page 36: DevOps - Understanding Core Concepts (Old)

Visual Control

Current status of Project is Visible to EVERYONE

HOW ?

◦ Burndown charts

◦ Daily Build Status

◦ Status of Automated Tests (Success/Failures)

Page 37: DevOps - Understanding Core Concepts (Old)

Continuous Improvements and Automation

Always Ask

◦ What can I automate ?

◦ What can be improved (in quality, in speed/performance, etc etc)

◦ What mistakes can be prevented by automation ?

Page 38: DevOps - Understanding Core Concepts (Old)

Automation - Remember

If you Automate a ‘mess’, you get ‘automated mess’ – Rod Michael

Most powerful tool that we have as developers is “Automation”

– Scott Hanselman

Page 39: DevOps - Understanding Core Concepts (Old)

Mistakes WILL Happen – Hence Fail Fast

Same as Toyota’s Principle of “Anyone Can Stop Assembly Line”.

Mistakes WILL Happen◦ How to reduce the impact of mistakes ?◦ How to detect mistakes early ?

How ??◦ Static Code Analysis◦ Zero Warnings Code◦ QA Picks up installable ONLY after all Automated Tests Pass

Page 40: DevOps - Understanding Core Concepts (Old)

PRACTICES FOR LOWERING RISK OF CHANGE IN PROJECTS

Page 41: DevOps - Understanding Core Concepts (Old)

Few Key Practices in DevOpsThere are few key practices you have to have.

Excellent Configuration Management Practices◦ This is more than just I know ‘commit/update’ and Hence I am an expert of ‘version control’

A Build Server◦ A Build Server is a ‘center of the universe’ for software development team.

◦ Daily Build, Continuous Integrations, Automated Tests, static analysis, build packaging etcetc. ALL happens on Build Server

Continuously Develop tools/features to Help Ops◦ Add Monitoring and Tracking from Day 1 (e.g. centralized logging, crash monitoring etc)

Automate the Deploy

Page 42: DevOps - Understanding Core Concepts (Old)

Excellent Configuration Management Practices Do you have separate branches for baseline, release, bug fixes in

past releases ?

Do you have ‘documented/defined’ branching strategy ? Is every member of the team know this document ‘by heart’ ?

Do you merge code bases regularly across branches using ‘svnmerge’ or other version control merge tools and NOT WinMergeor Araxis Merge ?

Do you tag every release sent to customer ?

Do you have ‘defined’ tagging convention ?

Do you regularly review and delete ‘dead branches’ ?

Do you take ‘update’ and ‘commit’ at least twice a day ?

Page 43: DevOps - Understanding Core Concepts (Old)

Build Server Do you have a ‘build server’ ?

Does your QA Engineer Pickup Build ONLY from Build Server ?

Every release package sent to customer is ‘compiled/prepared’ on build server and NOT on developer machine.

Do you have a ‘one click’ build (and a scheduled daily build)

Do you have automated tests running on the build ?

Can you prepare a ‘complete’ release package in one click ?◦ Checkout and compile

◦ Release tagging

◦ Installer creation

◦ Deploy/upload to FTP etc

◦ Notify to users that a new build is available

◦ Fully or partially auto generated ‘release notes’

Does developers give HIGHEST priority to ‘build break’ ?◦ Do team check every day for Build Success And Target 99.9% build success rate ?

Page 44: DevOps - Understanding Core Concepts (Old)

Tools for monitoring

1. Do you have centralized ‘crash logging’ ?

2. Do you have centralized event logging ?

1. Do you use operating system logging facilities like syslog or windows event log ?

3. Do you have a way of collecting operational metrics ?

4. Do you have a way of visualizing operational metrics ?

5. Do your Ops regularly use your monitoring and analysis tools ?

Page 45: DevOps - Understanding Core Concepts (Old)

Automatic Deploy

Can you do a ‘one click’ deploy ?

What is your deploy strategy ?

◦ You push the deploy to server/user OR

◦ User/Server pulls a new update when available?

Can you deploy multiple times a day if required?

Can you deploy without user being aware of it ?

Page 46: DevOps - Understanding Core Concepts (Old)

PRACTICES FOR LOWERING RISK OF CHANGE IN DESKTOP APPS

Page 47: DevOps - Understanding Core Concepts (Old)

DEVOPS FOR PLM (AND OTHER ENTERPRISE APPS)

Page 48: DevOps - Understanding Core Concepts (Old)

PLM Upgrades

Page 49: DevOps - Understanding Core Concepts (Old)

THANK YOU !!!

Page 50: DevOps - Understanding Core Concepts (Old)
Page 51: DevOps - Understanding Core Concepts (Old)

REFERENCES

Page 52: DevOps - Understanding Core Concepts (Old)

References

Slides of 10+ Deploys Per Day: Dev and Ops Cooperation at Flickr

Practical Science of Batch size (https://yow.eventer.com/yow-2012-1012/the-practical-science-

of-batch-size-by-don-reinertsen-1269)

http://www.innolution.com/blog/agile-documentation-and-the-economics-of-batch-size

Page 53: DevOps - Understanding Core Concepts (Old)

Unix Philosophy1. Make each program do one thing well. To do a new job, build afresh rather

than complicate old programs by adding new features.2. Expect the output of every program to become the input to another, as yet

unknown, program. Don’t clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don’t insist on interactive input.

3. Design and build software, even operating systems, to be tried early, ideally within weeks. Don’t hesitate to throw away the clumsy parts and rebuild them.

4. Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you’ve finished using them.

Doug McIlroy, [McIlroy78] The Bell System Technical Journal. Bell Laboratories. M. D. McIlroy, E. N. Pinson, and B. A. Tague. “Unix Time-Sharing System Forward”. 1978. 57 (6, part 2). p. 1902.