Presentation is loading. Please wait.

Presentation is loading. Please wait.

StackStorm: DevOps to ChatOps

Similar presentations


Presentation on theme: "StackStorm: DevOps to ChatOps"— Presentation transcript:

1 StackStorm: DevOps to ChatOps
By Porokh Sergii Github: sporokh

2 ChatOps - сonversations, put to work
ChatOps, a term widely credited to GitHub, is all about conversation-driven development. By bringing your tools into your conversations and using a chat-bot modified to work with main plugins and scripts, teams can automate tasks and collaborate, working better, cheaper and faster ChatOps is a collaboration model that connects people, tools, process, and automation into a transparent workflow using chat conversation.  ChatOps is a rather new operational paradigm where work that is already happening in the background today is brought into a common chat-room

3 From a keyword to production
Hubot: GitHub’s bot written in CoffeeScript and Node.js Lita: Written in Ruby Err: Written in Python

4 From a keyword to production
“StackStorm is a powerful automation tool that wires together all of your apps, services and workflows. It’s extendable, flexible, and built with love for DevOps and ChatOps” Common problems with Chat bots: Tying oneself too closely to a single chat vendor Needing a little more smarts in processing what is happening before alerting, and often interrupting, the humans Spending significant effort to integrate and then update integrations with underlying systems Requiring human sign off and wanting that sign off to address an entire workflow, as opposed to a single step action

5 From a keyword to production
The reason that StackStorm is getting rapid adoption for ChatOps is that underneath your ChatOps — you need an event-driven automation platform.

6 From DevOps to ChatOps If you have your environment up and running, your company has a run-books for every event, than ChatOps would be the next step for you. To use ChatOps, we need some additional tools above the existing system. Slack hubot plugin An Ubuntu LTS server (vagrant may be used) StackStorm StackStorm AWS/Linux/Core packs

7 Installing StackStorm
1 ST2 Services st2 services provide the main StackStorm functionality. They are located at /opt/stackstorm/st2, share a dedicated Python virtualenv, and are configured by /etc/st2/st2.conf

8 Installing StackStorm
2 ST2 Client st2 client is the CLI and Python bindings for StackStorm API. St2client is packaged with st2, or can be installed independently.

9 Installing StackStorm
3 ST2 Mistral Mistral is a workflow service component that StackStorm uses for long-running workflows. Installed under /opt/stackstorm/mistral, runs in a dedicated Python virtualenv, and is configured by /etc/mistral/mistral.conf. Mistral server runs workflow logic and calling actions, reaching out to st2api for action execution requests. Mistral-api is an internal end-point accessed by st2actionrunner and st2notifier.

10 Installing StackStorm
4 Web UI and SSL termination Nginx provides SSL termination, redirects HTTP to HTTPS, serves WebUI as static HTML, and reverse-proxies REST API endpoints to st2* web services.

11 Installing StackStorm
5 ST2 ChatOps StackStorm Chatops components are Hubot, StackStorm’s Hubot adapter, and plugins for connecting to different Chat services. They are installed at /opt/stackstorm/chatops/ and configured in /opt/stackstorm/chatops/st2chatops.env

12 Installing Packs and Configuring Rules
StackStorm packs are connection modules between StackStorm and a 3rd party development software. On this step, we have a connection between Slack bot and Stackstorm server, but we didn’t set up any commands for the bot (it uses default ones) as well as didn’t configure any notification rules.

13 Installing Packs and Configuring Rules
The problem is that I didn’t receive any notification from the bot, it just gives me the link to WebUI, with the current action. That’s because we don’t have any st2 rules applied. If you check WebUI tab “Rules”, you’ll see that it's empty (“st2 rule list” works as well in the console).

14 Installing Packs and Configuring Rules
The rule should be a trigger, and when this trigger executed it should post the result to the Slack channel. The trigger could be found in default core.st2.generic.actiontrigger, and action is chatops.post_result which is part of chatops pack. In my case it matches the criteria action_name by the next rule: (st2|packs|core|aws|linux).*

15 Creating Aliases You’d probably already have a question like: “Why do I have 7 packs installed but only 10 useless commands on Hubot?”. The reason for that is every Hubot command is represented with its alias. It’s used to connect Hubot command with the pack action. The problem is, those packs that you’ve downloaded do not have any aliases preconfigured. Aliases yaml file has quite a simple format: name (the name of the aliases) action_ref (which command it will execute) description (the brief description of the command) formats (command format in chat) result (a result format in chat)

16 Troubleshooting a Server in 5 min. ChatOps way

17 Troubleshooting a Server in 5 min. ChatOps way

18 Troubleshooting a Server in 5 min. ChatOps way

19 Troubleshooting a Server in 5 min. ChatOps way

20 Thanks for watching Contact information: Github: sporokh


Download ppt "StackStorm: DevOps to ChatOps"

Similar presentations


Ads by Google