This content is part of the Essential Guide: How to create a successful DevOps organizational structure

Evaluate ChatOps tools and bots for the right fit

ChatOps is still a niche in IT operations and DevOps shops, but organizations that have set it up love it. That means you should join the fun and give it a try. Here's what you need to know about ChatOps tools.

With voice assistants, like Amazon Echo, invading living rooms everywhere, conversational UIs are now mainstream. Similarly, ChatOps tools combine chat interfaces -- typically text rather than voice -- with pseudointelligent bots to help businesses accomplish IT tasks.

What is ChatOps? 

ChatOps melds DevOps automation with chat-based collaboration software. In real time, tools interact with developers, operations and support teams to resolve software outages, plan a code release or accomplish other tasks via what ideally feels more like a conversation than a set of commands and requests.

ChatOps originated at GitHub in the early 2010s. Hubot, GitHub's first chatbot, was tasked to automate any repetitive, scriptable task, such as image or code deployment, via a conversational chat interface. This concept became popular with software development teams communicating over tools such as Slack, Atlassian Hipchat and Rocket.Chat.

Increasingly, ChatOps tools provide an alternative command interface for a broad set of IT infrastructure and application administration tasks. The central technology for ChatOps is a chat client that integrates with the IT environment and management systems.

Chatbot frameworks and services

The ChatOps tool environment comprises a chat or collaboration service, a chatbot framework and, optionally, an asynchronous external notification system.

Chat clients, chatbots and real-time communication tools facilitate not just how software development and operation tasks are communicated, but also their execution.

ChatOps works if developers, IT admins and DevOps teams share the same collaboration or chat platform for discussions, status updates and messaging. It's augmented with a chatbot framework that can respond to inline commands. The framework interprets a text statement, such as "update the VM image for the Tribble project development system with the latest version;" translates it into the correct command, whether a script, API call or bot framework plug-in; and sends it on to the relevant infrastructure or code management system. The chatbot then issues a response back to the chatroom, indicating the job status and any error conditions.

Chatbot frameworks, such as Hubot, Lita for Ruby and Cog from Operable already provide both group and text message notifications through a collaboration platform of choice. However, many IT organizations already rely on alerting incident management systems, such as PagerDuty and VictorOps. Some organizations simply set up webhooks to trigger based on information from the ChatOps tools.

ChatOps structure
Figure 1. ChatOps is a way for developers and IT administrators to control IT infrastructure via a communications interface, integrated with discussions.

ChatOps tools and vendor choices

The first step to build a ChatOps system is to get IT, developers and other DevOps team members onto and using a chat-based real-time collaboration platform. And it should not be difficult. Slack, for example, has already infiltrated many organizations as a replacement for directed communications, like email and text messages, and many technical teams find it an efficient way to share project and workgroup information.

Half the Fortune 100 and 6 million daily active chatters use Slack, although it's doubtful that many of them dig into workflow automation. The Slack user interface organizes messages into different groups:

  • Teams, which are workgroups;
  • Workspaces dedicated to a Team; and
  • Channels dedicated to a specific conversation within a Workspace, such as for a particular project, office location or work function. Channels are where shared messages appear and where chatbot interactions occur.

Slack is just one example; other chat tools popular with developers include the SaaS project manager Basecamp, CA Flowdock's team inbox with chat in real time and the Gitter social network targeted at developers. Atlassian's Stride, in early release at the time of publication, will eventually replace Hipchat.

In addition to commercial ChatOps tools, consider using Internet Relay Chat, an open internet chat protocol that hosts millions of targeted groups; Freenode, a common server hosting software-related channels; or open source Mattermost and Rocket.Chat.

Other choices in this evolving space include ChatWork, Flock, Ryver and Zulip.

Frameworks and plug-ins

The chatbot is what turns a collaboration tool such as Slack into a conversational command-line interface (CLI) environment. There are dozens of bot frameworks, with several focused on ChatOps implementation. The right choice comes down to three primary factors.

Make sure the collaborators are comfortable working in the framework's language. For example, if your DevOps team mostly works in Python, the Err framework, written in the same language, will be most attractive.

Examine the included integrations to chat or collaboration platforms for a good match. For example, if your organization used Hipchat but a framework doesn't support it now that Hipchat is transitioning to Stride, you'd better look elsewhere.

Finally, envision how easily the organization will be able to extend the chatbot with new commands and plug-ins. Check out the prebuilt extensions and the size of the framework's developer ecosystem and community code library before settling on a choice.

Work with your new bot collaborator

The collaborators on a team activate the bot in a chat window via a keyword, such as hubot, and the chatbot interprets whatever follows that keyword as a command.

ChatOps looks like a fun way to improve DevOps efficiency and collaboration, potentially eliminating mistakes or duplicated effort since everyone in the workgroup can see commands and responses sent via the bot.

Each framework has a library of scripts and plug-ins that understand various commands, much like the Alexa Skills Kit that Amazon offers for consumers. For example, within Hubot's extensive repository of scripts is one to manage the continuous integration and delivery platform CircleCI and respond to commands. This script enables Hubot to retry all projects in which the last build failed, among other tasks. The user simply enters the keyword then the command into the chat box: "hubot circle retry all failed."

To control or monitor a development environment, infrastructure management platform or other piece of the IT puzzle via ChatOps, the vendors must expose command interfaces via a REST HTTP API. The chatbot framework's scripting/extensions environment relies on these APIs to issue remote commands and collect responses. For example, Tintri offers chatbot APIs that use Slackbot, Slack's native bot framework, to control Tintri storage servers via the collaboration platform (see Figure 2). VMware vSphere and Git are additional examples.

Tintri and Slack
Figure 2. Tintri is one of many technology vendors that supply ChatOps integration options.

Bots can also use CLIs, such as PowerShell for Windows, usually via another extension that translates between command script and HTTP. For example, Hubot's Edge.js and Edge-PS packages enable it to call .NET and PowerShell from Hubot Node.js scripts.

If the technology vendor does not already offer integrations for its software, turn to other users for homegrown options.

Benefits and investment

ChatOps is an intriguing management interface because of its ability to be seamlessly inserted into existing DevOps collaboration environments and workflows. However, chatbots aren't magic, and they simply give a friendly face to traditional software and infrastructure automation techniques, like CLI scripts, API calls and webhooks. ChatOps looks like a fun way to improve DevOps efficiency and collaboration, potentially eliminating mistakes or duplicated effort since everyone in the workgroup can see commands and responses sent via the bot.

To make ChatOps successful, follow these nontrivial requirements. Teams must use a shared chat/group collaboration environment. Administrators must demonstrate experience in task automation via scripts and API calls. They should be fluent in a scripting language, such as Node.js, Python or Ruby. The team must know how to install, configure and extend open source software; it's likely that ChatOps users will also need to engage with an open source project community to make the most of the deployment.

Since many of the ChatOps tools are free, there's no cost to picking up hands-on experience with the chatbots and software integrations available today before selecting technologies for an entire team, department or business.

Dig Deeper on DevOps

Software Quality
App Architecture
Cloud Computing
Data Center