Slide 1

Slide 1 text

Fast Deployment and Monitoring Why continuous integration and ChatOps are crucial to every application Brent Beer GitHub Trainer @brntbeer

Slide 2

Slide 2 text

Fast Deployment and Monitoring Why continuous integration and ChatOps are crucial to every application

Slide 3

Slide 3 text

Agenda Who am I? Testing Hooks / Services ChapOps

Slide 4

Slide 4 text

Who am I?

Slide 5

Slide 5 text

Trainer

Slide 6

Slide 6 text

Developer

Slide 7

Slide 7 text

From the midwest

Slide 8

Slide 8 text

From the midwest of the US

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

In San Francisco now

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Who even writes tests?

Slide 14

Slide 14 text

Who even writes tests first ?

Slide 15

Slide 15 text

I never did while in school

Slide 16

Slide 16 text

I still don't

Slide 17

Slide 17 text

I still don't

Slide 18

Slide 18 text

I'm geing beer!

Slide 19

Slide 19 text

Tests

Slide 20

Slide 20 text

"They take too long to write!"

Slide 21

Slide 21 text

"They take too long to write!" "I don't know how to write them"

Slide 22

Slide 22 text

"They take too long to write!" "I don't know how to write them" "My code is perfect"

Slide 23

Slide 23 text

"They take too long to write!" "I don't know how to write them" "My code is perfect" Lies! Lies! Lies!

Slide 24

Slide 24 text

Make it easy to write tests

Slide 25

Slide 25 text

script/cibuild

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Sometimes running tests takes too long

Slide 29

Slide 29 text

Sometimes running tests takes too long

Slide 30

Slide 30 text

Not just for your Enterprise Applications

Slide 31

Slide 31 text

"Well older things still pass tests"

Slide 32

Slide 32 text

Share burden and responsibility

Slide 33

Slide 33 text

Never work alone

Slide 34

Slide 34 text

Never work alone

Slide 35

Slide 35 text

Pull Requests

Slide 36

Slide 36 text

Send yourself Pull Requests

Slide 37

Slide 37 text

Get others to do the work for you!

Slide 38

Slide 38 text

@mentions

Slide 39

Slide 39 text

@mentions

Slide 40

Slide 40 text

What if others could see if your tests were passing without running the code?

Slide 41

Slide 41 text

Hooks and Services

Slide 42

Slide 42 text

Make tests run easily for services

Slide 43

Slide 43 text

script/cibuild

Slide 44

Slide 44 text

Many third party services can be hooked into GitHub

Slide 45

Slide 45 text

Status API

Slide 46

Slide 46 text

Now someone visiting the Pull Request can know what's going on

Slide 47

Slide 47 text

Status Types

Slide 48

Slide 48 text

History of timeline statuses

Slide 49

Slide 49 text

Details

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

So many CI services

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

Self Configuration

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

Manual Configuration

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

Services can do more than just send data to the API

Slide 61

Slide 61 text

ChatOps

Slide 62

Slide 62 text

Context of the current state of things

Slide 63

Slide 63 text

Why Chat?

Slide 64

Slide 64 text

Hubot

Slide 65

Slide 65 text

Hubot

Slide 66

Slide 66 text

hubot.github.com

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

Hubot's Domain

Slide 76

Slide 76 text

Who does the things? Service? Hook? Robot?

Slide 77

Slide 77 text

Hubot: deploy all the things

Slide 78

Slide 78 text

Make it fast

Slide 79

Slide 79 text

Hubot: Make it fast

Slide 80

Slide 80 text

Deploys

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

"Hello @user, your deploy was successful, keep an eye on Haystack"

Slide 83

Slide 83 text

"Hello @user, your deploy was successful, keep an eye on Haystack"

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

Digging Deeper

Slide 86

Slide 86 text

Going beyond an exception

Slide 87

Slide 87 text

Graphite

Slide 88

Slide 88 text

Graphite

Slide 89

Slide 89 text

statsd and collectd

Slide 90

Slide 90 text

Now we have things reporting

Slide 91

Slide 91 text

Now we have things reporting

Slide 92

Slide 92 text

Who should fetch these graphs?

Slide 93

Slide 93 text

Maybe just a dashboard view?

Slide 94

Slide 94 text

Dashing

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

Dashboards

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

Group understanding

Slide 99

Slide 99 text

Group understanding

Slide 100

Slide 100 text

Useful commands

Slide 101

Slide 101 text

Hubot: help pager

Slide 102

Slide 102 text

Hubot: graph me -12h @network.border.cp1.bgp

Slide 103

Slide 103 text

Hubot: graph me -4h @browser.frontend

Slide 104

Slide 104 text

Hubot: deploy training- app/chronological to production

Slide 105

Slide 105 text

Teach by doing

Slide 106

Slide 106 text

This was always my main motivation with Hubot - teaching by doing by making this visible. It's an extremely powerful teaching technique. - @rtomayko

Slide 107

Slide 107 text

Signal vs Noise

Slide 108

Slide 108 text

Next Steps

Slide 109

Slide 109 text

Take a deep breath

Slide 110

Slide 110 text

Easy to run tests

Slide 111

Slide 111 text

More tests get wrien

Slide 112

Slide 112 text

Or collaborate

Slide 113

Slide 113 text

What's the state of the Pull Request?

Slide 114

Slide 114 text

What has been happening on the Pull Request

Slide 115

Slide 115 text

Your chatroom could be your office

Slide 116

Slide 116 text

Use robots

Slide 117

Slide 117 text

Use robots more

Slide 118

Slide 118 text

How do things look?

Slide 119

Slide 119 text

Don't bother me

Slide 120

Slide 120 text

Keep Deploying. Keep Building. Do it Faster & Safer.

Slide 121

Slide 121 text

Thank you! Brent Beer GitHub Trainer @brntbeer

Slide 122

Slide 122 text

References: hps://hubot.github.com hps://github.com/shopify/dashing hps://github.com/graphite-project hps://github.com/etsy/statsd/ hps://developer.github.com/v3/ hps://github.com/collectd hps://developer.github.com/v3/ hps://circleci.com/ hps://travis-ci.org/ hps://github.com/github/janky