Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

181
Effective Devops: Collaboration and Tools Jennifer Davis & Katherine Daniels 1

Transcript of Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Page 1: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Effective Devops:Collaboration and Tools

Jennifer Davis & Katherine Daniels

1

Page 2: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Jennifer Davis• Automation Engineer, Chef

• Co-author of "Effective Devops"

• DevOpsDays SV Organizer

• Sparkly Devops Princess

• CoffeeOps Organizer

2

Page 3: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Katherine Daniels• Web Operations Engineer, Etsy

• Co-author of "Effective Devops"

• DevopsDays NYC Organizer

• Ladies Who Linux NYC Organizer

• Ship Show Podcast Co-host

3

Page 4: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Communication• Jennifer Davis

Twitter: @sigje Email: [email protected]

• Katherine Daniels Twitter: @beerops Email: [email protected]

#EffectiveDevops4

Page 5: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Feedback• Constructive feedback

• What did you find helpful?

• What would you like to see more/less of?

• Was there anything you found unclear?

5

Page 6: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Schedule• Introduction to teams, devops principles

• 10:30-11am Morning Break

• Visualization of work, Git, Infrastructure automation

• 12:30-1:30pm Lunch

6

Page 7: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Schedule• Testing infrastucture automation and other changes

• 3-3:30pm Afternoon Break

• Measuring, monitoring, and wrap-up

7

Page 8: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Network ConnectivityNetwork Name: Conference_PrivateAccess Code: velocity2015

8

Page 9: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Expectations• Safe space to share experiences, learn from each other

• Code of Conduct

• Learn effective workflows for using and testing source control and configuration management

9

Page 10: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Team Introductions• Meet your team!

• Identify your team's...

• Speaker

• Gatekeeper

• Notetaker

Time: 10 minutes

10

Page 11: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

11

Page 12: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

What is Devops• Technical cultural weave that shapes how we work, and why

12

Page 13: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Folk Models• general popularly understood meaning particular to a

socio-cultural grouping but which has not been formally defined or standardized.

13

Page 14: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Why Devops?

14

Page 15: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

High Performing Devops Teamsare more agile30X more frequent deployments8000X faster lead times than peers

2014 PuppetLabs State of DevOps Survey

15

Page 16: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

High Performing Devops Teamsare more reliable2X change success rate12X faster mean time to recovery (MTTR)

2014 PuppetLabs State of DevOps Survey

16

Page 17: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Five Pillars of Effective Devops• Collaboration

• Hiring

• Affinity

• Tools

• Scaling

17

Page 18: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Collaboration• Individuals Working Together

18

Page 19: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Hiring• Choosing Individuals

19

Page 20: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Affinity• From Individuals to Teams

20

Page 21: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Tools• Choosing and Using them

21

Page 22: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Scaling• Growing and Decreasing

22

Page 23: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Collaboration and Tools

23

Page 24: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Recognizing your Devops Narrative

24

Page 25: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

The Devops Compact• shared mutual understanding

• established boundaries

25

Page 26: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Stormtrooper Syndrome• Agency

• Adaptability: Role adherence

26

Page 27: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Learned Helplessness

27

Page 28: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

A life becomes meaningful when one sees himself or herself as an actor within the context of a story.

-- George Howard

28

Page 29: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Swift Trust• Skillful self disclosure

• What you share, how you share it

• Collective tasks vs personal agendas

29

Page 30: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Team• Common purpose

• Defined beliefs

• Empowered

30

Page 31: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Small vs Large teams• Large teams - roles may be highly segregated

• Small teams - one person may be responsible for many roles

31

Page 32: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Cultivating Empathy• Collect stories

• Listen

• Circle back

32

Page 33: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Smarter Teams Build Better Value1

• Lots of Communication

• Contribute equally to team's discussions

• Theory of Mind

• Increased diversity

1 Engel, David et al. 'Reading The Mind In The Eyes Or Reading Between The Lines? Theory Of Mind Predicts Collective Intelligence Equally Well Online And Face-To-Face'. PLoS ONE 9.12 (2014): e115212. Web. 26 May 2015.

33

Page 34: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Critical Habits for Teams• Code Review

• Pairing

34

Page 35: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Code Review• Max 90 minutes in one setting

35

Page 36: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Pairing• Agile software development

• 2 people work together on 1 workstation

• Driver - writes code

• Observer - reviews each line

• Roles switch frequently

36

Page 37: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Types of Pairing• Expert-expert

• Expert-novice

• Novice-novice

37

Page 38: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Discussion: Team Intro• What are motivations?

• What are current beliefs?

• What are current skills? Gaps in skills?Time: 15 minutes

38

Page 39: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Share: Team Intro• Team Name:

• Common Motivations?

• Skills? Gaps?

39

Page 40: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Fluxx• Game about change.

• Rules change as you play.

• Goal changes frequently.

40

Page 41: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Fluxx• Starts out with 1 Rule - Draw 1, Play 1

• Find this card (white backing)

• Place card in the middle of table

41

Page 42: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Fluxx• Shuffle deck

• Deal 3 cards to each player

42

Page 43: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Fluxx• First player is the person to left of Dealer.

• Start out following the Draw 1, Play 1 rule until overridden by new rules.

43

Page 44: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Fluxx4 types of cards

• Goal - pink

• Keeper - green played in front of you

• Action - blue used once and discarded

• Rule - yellow

44

Page 45: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Fluxx - On your turn• Draw the number of cards currently required.

• Play the number of cards currently required.

• Discard down to hand limit (if any hand limit).

• Discard down to keeper limit (if any keeper limit).

45

Page 46: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Fluxx• Winner is the first to meet the current Goal condition.

Time: 15 minutes

46

Page 47: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

RetrospectiveChange is inevitable.

47

Page 48: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Importance of Games• Build resilience

• Build collaboration (or competition)

• Roles change

48

Page 49: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Specific to Fluxx• Frustration of constant changing goals

• Completed "work", lost value

• Visualization of goals, everyone in alignment

49

Page 50: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Visualization of Work• Bug/issue queue• Kanban

50

Page 51: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Kanban• Start with what you do now

• Agree to incremental, evolutionary change

• Respect

• Everyone is a leader

51

Page 52: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Kanban Practices• Visualize

• Limit WIP

• Manage flow

• Make policies explicit

• Implement feedback loops

52

Page 53: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Visualize• Intent

• Alignment

• Coherence

53

Page 54: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Limit WIP• Pull (don't push)

54

Page 55: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Manage Flow• Monitor/measure/report

• Incremental change

55

Page 56: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Make Policies Explicit• Document processes

• Group signoff

56

Page 57: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Implement Feedback Loops• Collaboration

• Retrospectives

57

Page 58: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Intro JoeNGo

58

Page 59: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Application Deployment PlanningDeming Cycle• Plan: Identify and Analyze problem

• Do: Develop and Test potential solution

• Check: Measuring effectiveness

• Act: Implement solution

59

Page 60: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Application Deployment Planning• (L)inux

• (A)pache

• (M)ySQL

• (P)HP, Perl, or Python

60

Page 61: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Group DiscussionTime: 15 minutes

61

Page 62: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Devops Tools• Establish local development environment

• Version control

• Manual -> Automation -> Continuous

• Artifacts

• Infrastructure

• Sandbox

62

Page 63: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Local Development Environment (LDE)• Consistent set of tools across the team

• Ability to quickly onboard new engineers

63

Page 64: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Provisioned Node - LDE• AWS instance node

• Chef DK

• Test Kitchen

• Ruby

• ChefSpec, ServerSpec

• Git

64

Page 65: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

NodesCountoff

http://bit.ly/1Fg9rxs

65

Page 66: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Configuration Management• Process of identifying, managing, monitoring, and auditing a

product through its entire life including the processes, documentation, people, tools, software, and systems.

66

Page 67: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Version Control• Records changes to files or sets of files stored within the

system

• Enable revisions

• Integrity checking

• Collaboration

67

Page 68: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Artifact Repository• Secure

• Trusted

• Stable

• Accessible

• Versioned

68

Page 69: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Introduction to Git and Workflows

69

Page 70: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Isolated Development Environments• Not automatically updated

• Manually pull upstream commits

70

Page 71: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Workspace Environment$ git init$ git add .

adds all files and directories to version control

71

Page 72: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Commit$ git commit -m "message about commit" -a

72

Page 73: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

All these changes are local! How do you collaborate?

73

Page 74: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Show all remotes$ git remote -v

74

Page 75: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Add remote server$ git remote add NAME URL

75

Page 76: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Update changes to remote directory$ git push REPONAME BRANCH

76

Page 77: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

View the branches$ git branch -a

77

Page 78: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Creating the branches$ git checkout -b BRANCHNAME

78

Page 79: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Merging branches$ git merge BRANCH

79

Page 80: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

git fetch• import commits, from remote to local

git checkout mastergit log origin/mastergit merge origin/master

80

Page 81: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Different workflows• feature branch

• gitflow

• forking

• centralized

81

Page 82: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Pull Requests• collaboration prior to integration

• discussion

• follow up commits

• selfie gifs3

3 https://github.com/thieman/github-selfies

82

Page 83: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

git pullgit pull REMOTE

83

Page 84: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

git pull --rebase• ensure linear history by preventing unnecessary merge

commits

84

Page 85: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

git push remote branch• transfer commits from a local repo to a remote repo.

• counterpart to git fetch

85

Page 86: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

86

Page 87: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Assignment 1Effective Devops

http://bit.ly/1JVuLh4Time: 15 minutes

87

Page 88: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

88

Page 89: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Infrastructure• Aggregate of applications, configurations, access control,

data, compute nodes, network, storage, processes, and people.

89

Page 90: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Infrastructure Automation• Systems that reduce the burden on people to manage

services and increase the quality, accuracy and precision of a service to the consumers of a service

90

Page 91: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Infrastructure Automation Tools• Chef• Puppet• Ansible• Salt• CFEngine

91

Page 92: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Introduction to Chef

92

Page 93: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Resources• Ingredients of infrastructure

• Basic building blocks

93

Page 94: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Resource DeclarationRESOURCETYPE "RESOURCE_NAME" do PARAMETER PARAMETER_VALUEend

94

Page 95: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Example Resource Type - packageA package to be installed:

package "httpd" do action :installend

95

Page 96: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Example Resource Type - serviceA service that should be started:

service "httpd" do supports :restart => :true action [:enable, :start]end

96

Page 97: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

ResourcesA resource is a statement of policy that:

• Describes the desired state for an element

• Specifies a resource type---such as package, template, or service

• Lists additional details (also known as parameters), as necessary

• Are grouped into recipes97

Page 98: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Recipes• Collection of ordered resources

• Combination of ruby and Chef DSL

98

Page 99: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Cookbooks• Thematic

• Collection of recipes and other supporting files

99

Page 100: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Roles• Abstraction describing function of system

• Name

• Description

• Run list (ordered list of recipes and roles)

100

Page 101: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Run List• Ordered list of recipes and roles

• Specific to a node

101

Page 102: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Nodes• Machine (virtual, physical, cloud server, or other device) that

is managed by Chef

102

Page 103: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Environments• Abstraction models workflow

• Name

• Description

• Cookbook version pinning

103

Page 104: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Supermarket• Community site with a number of cookbooks

• Read before using in your environment

104

Page 105: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Chef DK• Chef development kit

• Includes a number of utilities and software to facilitate cookbook creation

• Free download off of the website

105

Page 106: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Berkshelf• Dependency management• Included with Chef DK

106

Page 107: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Test Kitchen• Included with Chef DK

• Sandbox automation

• Test harness

107

Page 108: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Test Kitchen• Execute code on one or more platforms

• Driver plugins supporting various cloud and virtualization providers

108

Page 109: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

.kitchen.yml• driver

• provisioner

• platforms

• suites

109

Page 110: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

.kitchen.yml driver• virtualization or cloud provider

Example: vagrant, docker

110

Page 111: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

.kitchen.yml provisioner• application to configure the node

Example: chef_zero

111

Page 112: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

.kitchen.yml platforms• target operating systems

Example: centos-6.5

112

Page 113: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

.kitchen.yml suites• target configurations

Example:

name:default run_list: - recipe[apache::default] attributes:

113

Page 114: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Kitchen commands (1/2)• kitchen init

• kitchen list

• kitchen create

• kitchen converge

114

Page 115: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Kitchen commands (2/2)• kitchen verify

• kitchen destroy

• kitchen test

115

Page 116: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Docker• Images

• Registries

• Containers

116

Page 117: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

117

Page 118: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Assignment 2Time: 20 minutes

118

Page 119: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

119

Page 120: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Managing Risk• Test• Small frequent releases

120

Page 121: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Linting• Ensure code adheres to styles and conventions

• Weave expectations into development

• Encourages collaboration

121

Page 122: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Testing• Documenting objectives and intent

• Measuring "done"

122

Page 123: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Code Correctness• foodcritic

• rubocop

123

Page 124: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Integration Tests• ServerSpec

124

Page 125: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Rubocop• Ruby linter• Ruby style guide• Included with ChefDK

125

Page 126: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Rubocop Example$ rubocop cookbooks/COOKBOOK1 cookbooks/COOKBOOK2 cookbooks/COOKBOOK4

126

Page 127: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Reading Rubocop OutputInspecting 8 filesCWCWCCCC

• . means that the file contains no issues

• C means a issue with convention

• W means a warning

• E means an error

• F means an fatal error127

Page 128: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Disabling Rubocop copsAny configuration in .rubocop.yml is disabled.

To disable string literals:

StringLiterals: Enabled: false

128

Page 129: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Foodcritic• Chef linter• Chef style guide• Included with ChefDK

129

Page 130: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Foodcritic Example$ foodcritic cookbooks/setup

130

Page 131: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Reading Foodcritic OutputFC008: Generated cookbook metadata needs updating: ./metadata.rb:2

131

Page 132: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

ServerSpec• Tests to verify servers functionality

• Resource types

• Package, service, user, and many others

• Integrates with Test Kitchen

• http://serverspec.org

132

Page 133: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

ServerSpec Generic Formdescribe "<subject>" do it "<description>" do expect(thing).to eq result endend

133

Page 134: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

ServerSpec Potential Tests• Is the service running?

• Is the port accessible?

• Is the expected content being served?

134

Page 135: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

ServerSpec Exampledescribe 'apache' do it "is installed" do expect(package 'httpd').to be_installed end it "is running" do expect(service 'httpd').to be_running endend

135

Page 136: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Reading ServerSpec Outputapp::default httpd service is running

Finished in 0.26429 seconds (files took 0.7166 seconds to load)1 example, 0 failures

136

Page 137: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

137

Page 138: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Assignment 3Time: 10 minutes

138

Page 139: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

139

Page 140: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Retrospective on Assignment 3Time: 15 minutes

140

Page 141: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

141

Page 142: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Assignment 4Time: 20 minutes

142

Page 143: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

143

Page 144: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Automated Test and Build

144

Page 145: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Test, Monitor, or Diagnostic2

1. Where is it going to run?

2. When is it going to run?

3. How often will it run?

4. Who is going to consume the result?

5. What is the entity going to do with it?

2 Lam, Yvonne. 'Sysadvent: Day 5 - How To Talk About Monitors, Tests, And Diagnostics'. Sysadvent.blogspot.com. N.p., 2014. Web. 26 May 2015.

145

Page 146: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Measuring Impact and Value of Change

146

Page 147: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Impact of Change

147

Page 148: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Impact on Availability

• Overall site/app availability

• Individual service availability

148

Page 149: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Availability Monitoring

• Uptime:

• Pingdom, Monitis, Uptrends, etc

• Vertical Line Technology:

• Availability after deploys/changes

149

Page 150: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

150

Page 151: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Eventinator

151

Page 152: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

152

Page 153: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Service Availability

• Nagios: Service-level monitoring and alerting

• Nagios-herald: Alert context

• OpsWeekly: Historical alert data

153

Page 154: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Nagios

154

Page 155: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

define command { command_name check_mongodb_query command_line $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -q $ARG5$}

define service { use generic-service hostgroup_name Mongo Servers service_description Mongo Connect Check check_command check_mongodb!connect!27017!2!4}

155

Page 156: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

define servicedependency{ host_name WWW1 service_description Apache Web Server dependent_host_name WWW1 dependent_service_description Main Web Site execution_failure_criteria n notification_failure_criteria w,u,c}

156

Page 157: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Nagios-herald

157

Page 158: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

158

Page 159: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

OpsWeekly

159

Page 160: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

160

Page 161: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

161

Page 162: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

162

Page 163: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

163

Page 164: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Impact on Quality

• Service quality (SLAs)

• Visibility of quality

164

Page 165: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Statsd

165

Page 166: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

>>> import statsd>>>>>> timer = statsd.Timer('MyApplication')>>>>>> timer.start()>>> # do something here>>> timer.stop('SomeTimer')

166

Page 167: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

>>> import statsd>>>>>> counter = statsd.Counter('MyApplication')>>> # do something here>>> counter += 1

167

Page 168: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

>>> import statsd>>>>>> average = statsd.Average('MyApplication', connection)>>> # do something here>>> average.send('SomeName', 'somekey:%d'.format(value))

168

Page 169: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Graphite

169

Page 170: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Value of Change

170

Page 171: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Value of Availability

• Better for customers

• Better for employees (internal services)

• Fewer pages

171

Page 172: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Value of Quality

• Deploys take less time

• Also better for customers

• More visibility into issues

172

Page 173: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

173

Page 174: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Assignment 5Time: 20 minutes

174

Page 175: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

175

Page 176: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Retrospective !

176

Page 177: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Review• Recognizing your Devops Narrative

• Application Deployment Planning

• Infrastructure as code

• Introducing repeatable, testable change

• Measuring impact and value of change

177

Page 178: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Next Steps• Manual, Automation to Continuous "X"

• Be the storylistener and storyteller in your org

• Effective Devops available in Early Release

178

Page 179: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Slides

179

Page 180: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

Thank you! ❤@sigje

@beerops

180

Page 181: Effective Devops - Collaboration and Tools - Velocity Santa Clara 2015

181