By: Shriniwas Sathe
DevOps has evolved from its infancy into a mainstream focus area for a majority of CIOs and has been shaping the world of software and infrastructure engineering and operations for the last few years.
Some of the key DevOps trends include:
- DevOps assembly line automation
- Smart, actionable alerts from monitoring tools
- Monitor and orchestration infrastructure
Improved Collaboration
With the increase of DevOps adoption, organizations today face many challenges in the end-to-end service delivery life cycle:
- For applications with complex environment configurations, creating, setting up and deploying a new environment is costly, time-consuming and prone to errors
- Due to manual interventions, moving/promoting code across environments involves risks and may give rise to outages
- Development teams are looking to maximize change by writing new code or enhancing existing code, while operations teams are looking to minimize change to keep up with key performance indicators (KPIs) and service level agreements (SLAs). These goals are opposing in nature and create a culture of blame between dev and ops teams
- Organizations are unable to keep dev, test and production in synchronization due to process and tool gaps. A manual process cannot bridge this gap inconsistency; thus, outages in production are common
Various collaboration mechanisms let teams work and learn together to produce better results. The figure below depicts the end-to-end life cycle of DevOps. Collaboration across the phases is essential to the success of a enterprise DevOps transformation.
What are ChatOps and Bots?
ChatOps is a term coined by GitHub to describe “putting tools in the middle of a conversation.” In a typical CICD pipeline, there are multiple tools that you interact with that have varied functionalities, such as source code management (SCM), defect management, continuous integration, continuous deployment and others. These are all discrete tools, but there is nothing that bridges them together. This is where ChatOps comes into play. A bot is a bridge between the collaboration tool and the DevOps tools. The bot receives a request from the user in the form of a chat command through a collaboration tool, analyzes the request and executes a set of commands on the target DevOps tool.
The main components of ChatOps and bots are:
- Chat app/collaboration tool: This is the front-end chat system that connects the various stakeholders and enables them to interact between themselves and the systems around them
- The bot: This is the core of ChatOps. A bot is the glue between your collaboration tool and your systems. It facilitates a two-way communication channel where you can fetch relevant information from the systems and act on the information received. A bot fits in between your collaboration tool and the DevOps tools, e.g. Hubot, Lita, ErrBot or AWS Lex
- Target platform/infrastructure: Integration with the target platforms/DevOps tools is a key ingredient to a successful implementation of bots. These are the target tools and platforms on which the bot will execute the required commands. The tools integration allows your bot to communicate with tools and execute actions such as build, deploy, test, provision and scale infrastructure directly from the chat window
Where Bots Fit in the DevOps Pipeline
Bots can prove to be an accelerator in various stages of the CI/CD pipeline. Below are the details of the integration with various DevOps tools in each phase of the life cycle:
- Proactive planning – JIRA
- Requirements management – JIRA
- Continuous integration – Jenkins
- Continuous deployment – Ansible, Chef
- Continuous monitoring – Nagios, Grafana, Splunk
- Continuous feedback – JIRA
A chatbot plays a major role in bringing the different teams together into a single, persistent chat room to triage and resolve the issue at hand. In addition to just troubleshooting and triaging issues, bots can be used for various other business-as-usual jobs including:
- Cleaning up servers
- Kicking off build and deployment jobs
- Rotating server logs
- On-boarding application on the monitoring tools
- Collecting metrics from tools such as Nagios or AppDynamics
Bot Technical Blueprint
To achieve the aforesaid targets, we need to have a supportive bot platform in place. How closely the tools integrate with the bot ensures the quality of the implementation and opens new opportunities of automation.