Download pdf - ChatOps Unplugged

Transcript
Page 1: ChatOps Unplugged

@GoVictorOps #ChatOps

ChatOps… a beginner’s guide

~ $

Page 2: ChatOps Unplugged

@GoVictorOps #ChatOps

Jason [email protected]@jasonhand

Page 3: ChatOps Unplugged

@GoVictorOps #ChatOps

Agenda• Introduction to ChatOps

• Origins

• Tools

• Benefits

• Examples

• Limitations & Concerns

• Getting Started

• Q&A

@jasonhand

Page 4: ChatOps Unplugged

@GoVictorOps #ChatOps

What do you doover and over again?

Can I do that for you?

I’ll think about it.

@jasonhand

Page 5: ChatOps Unplugged

@GoVictorOps #ChatOps

“putting tools in the middle of the conversation”

ChatOps

- GitHub (2010)

@jasonhand

Page 6: ChatOps Unplugged

@GoVictorOps #ChatOps

DevOps

To move fast and maintain stability it’s important to have a culture of automation, measurement and sharing

CultureAutomationMeasurementSharing

@jasonhand

Page 7: ChatOps Unplugged

@GoVictorOps #ChatOps

Tools

Chat clients (with channels or rooms)

Bots

Scripts

@jasonhand

Page 8: ChatOps Unplugged

@GoVictorOps #ChatOps

HipChat

Campfire

Slack

Chat

@jasonhand

Page 9: ChatOps Unplugged

@GoVictorOps #ChatOps

Bots

@jasonhand

Page 10: ChatOps Unplugged

@GoVictorOps #ChatOps

Scripts

@jasonhand

Page 11: ChatOps Unplugged

@GoVictorOps #ChatOps

Benefits

•Sharing

•Learning

•Speed

@jasonhand

Page 12: ChatOps Unplugged

@GoVictorOps #ChatOps

Multi-user terminal

Share learning experiences

Sharing

Disseminate knowledge across everyone on the team

Share learning experiences@jasonhand

Page 13: ChatOps Unplugged

@GoVictorOps #ChatOps

Learning

“everyone is pairing all of the time”

- Jesse Newland (Ops – GitHub)

@jasonhand

Page 14: ChatOps Unplugged

@GoVictorOps #ChatOps

Speed

How many clicks

does it take you?

@jasonhand

Page 15: ChatOps Unplugged

@GoVictorOps #ChatOps

Jason: Hey Dan … did you see that spike in CPU usage on Prod1.. ~ 3 minutes ago?

Dan: No. Let me check. brb

Dan: Shit. Yeah, I see it. Looks ok now. I think :-/

Jason: Think we should let Mike know? He might want to dig in to it later.

Dan: Yeah, I’ll take a screenshot and email it to him.

Jason: Would anyone else need to know about it?

Dan: Prob. I’ll cc the DevOps team so everyone knows

Old methods

@jasonhand

Page 16: ChatOps Unplugged

@GoVictorOps #ChatOps

Jason: Hey Dan. My code is ready to push when you are.

Dan: Cool. I’ll commit it to the latest branch here in a minute.

Jason: Great. Also, we should probably sit down with Nick (new guy) and show him how to do that soon.

Dan: Yeah. Once I get some time, I’ll schedule something. :/

Jason: There’s probably a bunch more stuff to show him too, but I’m not sure I even know all of the steps for everything.

Dan: We’ve got a wiki for most things, but not everything. I’ll see what I can find and email him.

Old methods

@jasonhand

Page 17: ChatOps Unplugged

@GoVictorOps #ChatOps

Jason: Hey Dan. My code is ready to push when you are.

Dan: Cool. I’ll commit it to the latest branch here in a minute.

Jason: Great. Also, we should probably sit down with Nick (new guy) and show him how to do that soon.

Dan: Yeah. Once I get some time, I’ll schedule something. :/

Jason: There’s probably a bunch more stuff to show him too, but I’m not sure I even know all of the steps for everything.

Dan: We’ve got a wiki for most things, but not everything. I’ll see what I can find and email him.

Old methods

Chat with Jason & Dan

Who else can see this conversation?

Nobody !

If using a traditional chat clientSuch as Gchat …

Page 18: ChatOps Unplugged

@GoVictorOps #ChatOps

What do you doover and over again?

Can I do that for you?

Heck yeah! :D

@jasonhand

Page 19: ChatOps Unplugged

@GoVictorOps #ChatOps

• Run MySQL command (as read-only user)• Authorize users (assign and enforce user-based roles) • Take a server offline• Bring a server online• Deploy code to a repository• Displaying the status of a JIRA ticket• Adding comments and changing their status on tickets• Query the status of API's (internal & external)• VM interaction to see host health• Monitoring service interaction to trigger status checks• Hubot scripts can be written in CoffeeScript or Javascript• Notify people not present in a chatroom that they were mentioned• Fetch logs• Rebalance shards across its file servers• List currently running jobs/processes• Kill jobs/processes• Tail a job/process• Track Customer signups• Sharing graphs for context• Store static links, mapping those links to simple, easy to remember commands

Examples

In GitHubOpening issuesClosing issuesCommenting on issuesListing issuesMerge pull requests

jhand.ml/scripts

jhand.ml/heroku

@jasonhand

Page 20: ChatOps Unplugged

@GoVictorOps #ChatOps

Example script

Show current GitHub status and messages

jhand.ml/script1@jasonhand

Page 21: ChatOps Unplugged

@GoVictorOps #ChatOps

hubot github status - Returns the current system status and timestamp.

hubot github status last - Returns the last human communication, status, and timestamp.

hubot github status messages- Returns the most recent human communications with status and timestamp.

Hubot: github status: new file: Chatops.txt 116 seconds ago

Jason: hubot github status

@jasonhand

Page 22: ChatOps Unplugged

@GoVictorOps #ChatOps

Jason: Hey Dan. My code is ready to push when you are.

Dan: Cool. I’ll commit it to the latest branch here in a minute.

Jason: Great. Also, we should probably sit down with Nick (new guy) and show him how to do that soon.

Dan: Yeah. Once I get some time, I’ll schedule something. :/

Jason: There’s probably a bunch more stuff to show him too, but I’m not sure I even know all of the steps for everything.

Dan: We’ve got a wiki for most things, but not everything. I’ll see what I can find and email him.

New and improved!

Chat Room

Who else can see this conversation?

Everybody !

Jason

Members

Dan

Nick

Mike

Jeff

Doug

Tara

Page 23: ChatOps Unplugged

@GoVictorOps #ChatOps

Graphs or it didn’t happen

@jasonhand

Page 24: ChatOps Unplugged

@GoVictorOps #ChatOps

Jason: Hubot graphite load 1 min on serverABC

Jason: @Dan … you seeing this?

Dan: Yeah.

New method w/ bots

Hubot:

Mike: That was me. I was running a giant report. Should be fine now

Nick (new guy): Cool. Thanks for showing me how to do that. ;-)

@jasonhand

Page 25: ChatOps Unplugged

@GoVictorOps #ChatOps

Big Whoop

Why is this important?

@jasonhand

Page 26: ChatOps Unplugged

@GoVictorOps #ChatOps@ngrieb: hubot graphite load 1 min on serverABC

Page 27: ChatOps Unplugged

@GoVictorOps #ChatOps@jasonhand

Page 28: ChatOps Unplugged

@GoVictorOps #ChatOps

Getting Started

Install botjhand.ml/hubotjhand.ml/lita

Create repoDownload existing scripts

jhand.ml/scriptsCreate your own scriptsAsk others what needs to be automated

@jasonhand

Page 29: ChatOps Unplugged

@GoVictorOps #ChatOps

Concerns

@jasonhand

Page 30: ChatOps Unplugged

@GoVictorOps #ChatOps

Limitations

@jasonhand

Page 31: ChatOps Unplugged

@GoVictorOps #ChatOps

What I’d like to learn from you :

Are you doing ChatOps?

@jasonhand

Page 32: ChatOps Unplugged

@GoVictorOps #ChatOps

Page 33: ChatOps Unplugged

@GoVictorOps #ChatOps

Jason [email protected]@jasonhand

www.chatops.me