Share
Embed
Transcript
16 slides
-
Invoke-ChatOps Level Up and Change Your Culture with Chat and
PowerShell Brandon Olin @devblackops -
Agenda • What Is ChatOps? • Problems/Opportunities • Benefits •
Frameworks • Examples • PoshBot Overview • Demos • Q&A -
What is ChatOps? "We're taking the things we're already doing
and putting them in line with the conversations we're already having." -James Fryman (StackStorm) -
The Problem Bob: Hey Sally, a user called me and
said hq-frodo1 fell over again. I’m not sure what’s wrong. Can you take a look? Sally: Ok, I don’t know much about that server but I think Brent does. I’ll try and track him down. 2 hours later… Sally: try it now. Brent said he fixed it. Bob: It works! Whatever you or Brent did fixed it. Thanks a bunch! -
Opportunities •Improve Context •Share Knowledge •Empower Team - why can’t
Bob (or Sally) do this? •Reduce Mean Time To Resolution (MTTR) •Fewer Brents -
Benefits Social •Knowledge Sharing •Team Empowerment •Situational Awareness •Faster Onboarding
•Enable Retrospectives Technical •Increased Automation •Reduced MTTR •Better History & Logging •Improved Safety -
ChatOps Frameworks •Hubot – JavaScript/CoffeeScript •Errbot - Python •Cog -
Elixir •Lita – Ruby •Microsoft Bot Framework (.Net, Node.js) •PoshBot - PowerShell •Bot in language of choice (pick your poison) -
Command Examples •Restart services •Get/resolve Service Desk tickets •Query APIs
•Modify AD group membership •Create VMs •Check status of automated processes •Get performance graphs •Query monitoring systems •Deploy code/kick off CI/CD pipeline •Slap people with a trout -
PoshBot - A PowerShell-based bot framework •Class-based •Modules => Commands
•RBAC •Triggers •Scheduled Commands •Command Approvals •Parameter injection •Stateful Data •Channel and Command whitelist/blacklist •Custom middleware •Multiple chat networks • Slack, Teams, GChat -
2 PoshBot receives messages over websocket connection 4 PoshBot sends
response via HTTP POST 3 PoshBot runs command and collects result 1 User enters: !createvm PoshBot & Slack Messaging Flow -
2 Teams sends message to Bot Framework 3 Bot Framework
POSTs HTTP message to Azure Function 4 Azure Function drops message On Service Bus 5 PoshBot consumes Service Bus Message over AMQP 7 PoshBot sends response to Teams 6 PoshBot runs command and collects result 1 User enters: @poshbot !createvm PoshBot & Teams Messaging Flow -
How To Get There •Start small (read-only) •Make it easy
to do the right thing •Gain acceptance by: §Getting a champion §Low friction onboarding §Focus on low hanging fruit §Make it fun! -
More From Me devblackops.io @devblackops github.com/devblackops github.com/poshbotio https://bit.ly/2wHbiQK https://bit.ly/2NN7PXB psake
POSHOrigin Watchmen PoshBot plugins NetScaler PasswordState PSHealthZ Operation Validation Framework PowerShellBuild.Common