Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ChatOps .. a beginner's guide

j.hand
January 27, 2015

ChatOps .. a beginner's guide

An intro discussion on the benefits and necessary tools of ChatOps, as well as some Getting Started Tips.

j.hand

January 27, 2015
Tweet

More Decks by j.hand

Other Decks in Technology

Transcript

  1. Poll   What  is  your  current  level  of  knowledge  

    Regarding  ChatOps?   A. Currently  using  to  some  degree   B. Some  knowledge  but  haven’t  implemented   C. LiIle  to  no  knowledge  
  2. Agenda   • Introduc)on  to  ChatOps   • Origins     • Tools

      • Benefits   • Examples   • Limita)ons  &  Concerns   • Ge>ng  Started   • Q&A  
  3. What  do  you  do   over  and  over  again?  

      Can  I  do  that  for  you?       I’ll  think  about  it.   @jasonhand    #ChatOps  
  4. DevOps   To  move  fast  and  maintain  stability  it’s  important

      to  have  a  culture  of  automa)on,  measurement   and  sharing   Culture  of   AutomaMon   Measurement   Sharing   @jasonhand    #ChatOps  
  5. Tools   Chat  clients     (with  channels  or  rooms)

      Bots   Scripts  *     @jasonhand    #ChatOps   *  Scripts  apply  to  Hubot  (coffee  scripts)  
  6. Poll   What  chat  client  do  you  and  your  team

     currently  use?   A. Gchat   B. HipChat   C. Skype   D. Slack   E. Other  
  7. Benefits   • Sharing   • Learning   • Speed   • Security  

    • Fun   @jasonhand    #ChatOps   ChatOps  all  the   things!        
  8. MulM-­‐user  terminal   Share  learning  experiences   Sharing   Disseminate

     knowledge  across  everyone  on  the  team   Share  learning  experiences   @jasonhand    #ChatOps  
  9. “We’re  bringing  in  the  work  that  you’re   already  doing,

     in  line  with  the  context  of   the  conversaMons  you’re  already  having.”   -­‐  James  Fryman     jhand.ml/fryman  
  10. Poll   Does  your  organizaMon  have  updated  documentaMon   On

     your  infrastructure  and  processes?   A. Yes   B. No  
  11. Learning   @jasonhand    #ChatOps   “everyone  is  pairing  all

     of  the  Mme”   -­‐  Jesse  Newland  (Ops  –  GitHub)  
  12. 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  
  13. 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  so  I  can  ping  him  when  you’re  busy.   Dan:    Yeah.    Once  I  get  some  Mme,  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  
  14. 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  Mme,  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  conversaMon?   Nobody  !     If  using  a  tradiMonal  chat  client   Such  as  Gchat  …   @jasonhand    #ChatOps  
  15. What  do  you  do   over  and  over  again?  

      Can  I  do  that  for  you?       Heck  yeah!    :D   @jasonhand    #ChatOps  
  16. •      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  Mcket   •  Adding  comments  and  changing  their  status  on  Mckets   •  Query  the  status  of  API's  (internal  &  external)   •  VM  interacMon  to  see  host  health   •  Monitoring  service  interacMon  to  trigger  status  checks   •  NoMfy  people  not  present  in  a  chatroom  that  they  were  menMoned   •  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  staMc  links,  mapping  those  links  to  simple,  easy  to  remember  commands   Examples   In  GitHub   Opening  issues   Closing  issues   CommenMng  on  issues   LisMng  issues   Merge  pull  requests   jhand.ml/scripts   jhand.ml/heroku   @jasonhand    #ChatOps  
  17. Example  script   Show  current  GitHub  status  and  messages  

    jhand.ml/script1   @jasonhand    #ChatOps  
  18. hubot  github  status      -­‐  Returns  the  current  system

     status  and  Mmestamp.   hubot  github  status  last      -­‐  Returns  the  last  human  communicaMon,  status,  and  Mmestamp.   hubot  github  status  messages      -­‐  Returns  the  most  recent  human  communicaMons  with  status  and  Mmestamp.   Hubot:    github  status:  new  file:  Chatops.txt   116  seconds  ago   Jason:    hubot  github  status   @jasonhand    #ChatOps   Usage  
  19. 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  Mme,  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  conversaMon?   Erybody  !   Jason   Members   Dan   Nick   Mike   Jeff   Doug   Tara   @jasonhand    #ChatOps  
  20. 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.    ;-­‐)  
  21. GeLng  Started   Research   Install  bot    jhand.ml/hubot  

     jhand.ml/lita   Create  repo   Download  exisMng  scripts    jhand.ml/scripts   Create  your  own  scripts   Ask  others  what  needs  to  be  automated     @jasonhand    #ChatOps  
  22. Final  Tips   •  Keep  it  small   •  Do

     passive  things   •  Automate  things  you  do  ALL  OF  THE  TIME   •  Make  it  safe  -­‐>  develop  in  confidence   •  Make  it  fun.    Give  it  character   •  It’s  not  just  for  Ops   •  Enable  other  teams     @jasonhand    #ChatOps  
  23. What  I’d  like  to  learn  from  you  :    

    Are  you  doing  ChatOps?     @jasonhand    #ChatOps   [email protected]