Chat ops .. a beginner's guide

Embed Size (px)

Text of Chat ops .. a beginner's guide

  • ChatOps a beginners guide

    ~ $

  • Jason Hand VictorOps jason@victorops.com @jasonhand

  • Agenda Introduc)on to ChatOps Origins Tools Benets Examples Limita)ons & Concerns Ge>ng Started Q&A

  • What do you do over and over again?

    Can I do that for you?

    Ill think about it.

    @jasonhand #ChatOps

  • puCng tools in the middle of the conversaFon

    ChatOps

    - GitHub (2010)

    everyone is pairing all of the Fme - Jesse Newland (Ops GitHub)

  • DevOps

    To move fast and maintain stability its important to have a culture of automaFon, measurement and sharing

    Culture AutomaFon Measurement Sharing

    @jasonhand #ChatOps

  • Tools

    Chat clients (with channels or rooms)

    Bots Scripts

    @jasonhand #ChatOps

  • HipChat

    Campre

    Slack

    Chat

    @jasonhand #ChatOps

  • Bots

    @jasonhand #ChatOps

  • Scripts

    @jasonhand #ChatOps

  • Benets

    Sharing Learning Speed

    @jasonhand #ChatOps

  • MulF-user terminal

    Share learning experiences

    Sharing

    Disseminate knowledge across everyone on the team Share learning experiences

    @jasonhand #ChatOps

  • Learning

    @jasonhand #ChatOps

  • Speed

    How many clicks

    does it take you?

  • 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, Ill take a screenshot and email it to him.

    Jason: Would anyone else need to know about it?

    Dan: Prob. Ill cc the DevOps team so everyone knows

    Old methods

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

    Dan: Cool. Ill 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 Fme, Ill schedule something. :/

    Jason: Theres probably a bunch more stu to show him too, but Im not sure I even know all of the steps for everything.

    Dan: Weve got a wiki for most things, but not everything. Ill see what I can nd and email him.

    Old methods

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

    Dan: Cool. Ill 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 Fme, Ill schedule something. :/

    Jason: Theres probably a bunch more stu to show him too, but Im not sure I even know all of the steps for everything.

    Dan: Weve got a wiki for most things, but not everything. Ill see what I can nd and email him.

    Old methods Chat with Jason & Dan

    Who else can see this conversaFon?

    Nobody !

    If using a tradiFonal chat client Such as Gchat

    @jasonhand #ChatOps

  • What do you do over and over again?

    Can I do that for you?

    Heck yeah! :D

    @jasonhand #ChatOps

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

    Examples

    In GitHub Opening issues Closing issues CommenFng on issues LisFng issues Merge pull requests

    jhand.ml/scripts jhand.ml/heroku

    @jasonhand #ChatOps

  • Example script

    Show current GitHub status and messages

    jhand.ml/script1

    @jasonhand #ChatOps

  • hubot github status - Returns the current system status and Fmestamp.

    hubot github status last - Returns the last human communicaFon, status, and Fmestamp.

    hubot github status messages - Returns the most recent human communicaFons with status and Fmestamp.

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

    Jason: hubot github status

    @jasonhand #ChatOps

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

    Dan: Cool. Ill 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 Fme, Ill schedule something. :/

    Jason: Theres probably a bunch more stu to show him too, but Im not sure I even know all of the steps for everything.

    Dan: Weve got a wiki for most things, but not everything. Ill see what I can nd and email him.

    New and improved! Chat Room

    Who else can see this conversaFon?

    Erybody !

    Jason Members

    Dan Nick Mike Je Doug Tara

    @jasonhand #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 ne now

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

  • Big Whoop

    Why is this important?

  • Graphs or it didnt happen

    @jasonhand #ChatOps

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

  • @jasonhand #ChatOps

  • GeCng Started

    Install bot jhand.ml/installhubot

    Create repo Download exisFng scripts

    jhand.ml/scripts Create your own scripts Ask others what needs to be automated

    @jasonhand #ChatOps

  • Concerns

  • LimitaFons

    @jasonhand #ChatOps

  • jhand.ml/SOoncall

    What Id like to learn from you :

    Are you doing ChatOps?

    @jasonhand #ChatOps

    Are you on-call?

  • Automate !

    @jasonhand #ChatOps

  • Jason Hand VictorOps jason@victorops.com @jasonhand