In the last post on Cloud Computing for Beginners Series, we have covered techniques and best practices for releasing applications with automated tests. The DevOps culture is centered on the precepts of easy knowledge transfer between the Dev and Ops areas, with fast and continuous release of new versions of features and apps, but with frequent feedback from the teams involved in all phases of the project life cycle. In this post, we will deal with the concepts of ChatOps, GitOps, and GitFlow, indispensable so that DevOps teams can develop each phase of the project according to a very well-designed pipeline.
ChatOps: Conversation-Driven DevOps
ChatOps, for instance, allows operations and engineering teams to work in a multifunctional way and execute operations and commands directly through chat. Very simple, isn’t it? It can be defined as a collaboration model that connects people, tools, processes and automation in a transparent workflow. In a ChatOps environment, the chat client acts as the main communication channel for the work in progress.
The tools that developers and operations managers already use are integrated into a collaborative communication environment to improve ticket tracking and automated incident response. The reasoning is simple and the approach is very practical: by being in a chat room, members of the DevOps teams can type commands to execute in the chatbot via custom scripts and plugins.
These commands can cover from code deployments to team member notifications and responses to events related to system security. This creates a real-time system for managing production incidents while automatically maintaining detailed documentation of all communication and processes during an incident.
Transparency strengthens the feedback cycle, improves data sharing and collaboration between teams – one of the reasons why ChatOps is popularly called “conversation-driven collaboration” or “conversation-driven DevOps. Not to mention the multidisciplinary culture and training among development teams.
In fact, ChatOps is a branch of DevOps with a focus on communication between DevOps teams. The ChatOps environment encompasses the communication and collaboration tools used by the team: notifications, chat servers, bots, problem tracking systems, etc., and can be divided into 3 main categories of tools to deploy a ChatOps work environment:
- Notification systems, such as the one provided in the One Platform solution.
- Chatbots, such as Qbot or Hubot.
- Chatroom integration tools, such as Slack, Atlassian HipChat and CA Flowdock.
For the motivation of the deployment, it is interesting to know what kind of operational tasks can be automated in a convenient way using ChatOps. We have many possibilities, but some of the highlights are:
- Automation of the deployment of a new application version in any environment;
- Complete status check of a Product’s applications and services;
- Automation of manual diagnostic processes that may involve VPNs, database queries, APIs and other data sources;
- Obtaining engineering or product indicators;
- Download large volumes of files from a remote source;
- Reclassify the criticality of an incident and notify people involved;
GitOps: DevOps applied to Git
Before talking about GitOps, it is important to talk about Git, which is a distributed version control system designed to coordinate work between programmers and track changes to any set of files in the code during software development. By covering the best DevOps practices and applying them to infrastructure automation, we have GitOps, which works as an operational structure centered on Git to host all data and documentation; When using Git, IT teams can handle configuration and deployment management more easily, as the GitOps approach aims to bring the deployment workflow closer to developers.
The GitOps approach concentrates some benefits to be considered:
- Enables collaboration on infrastructure changes
- Improved access control
- Faster time to market
- Less risks
- Reduced costs
- Less error-prone
GitFlow: collaboration and scaling between DevOps teams
In the same way as in GitOps, GitFlow is also related to Git, functioning as a working model with branches for this distributed version control system. GitFlow allows you to “freeze” the code even if a team member is working on it, without preventing other members from working on the next version. For this reason, GitFlow ends up being highly recommended for the collaboration and scaling of development teams – two basic and fundamental principles of DevOps.
One of the main benefits of GitFlow is precisely to make parallel development much easier, by isolating the new development from the finished work. The new development (such as features and non-emergency bug fixes) is done in “Feature Branches” and is only merged into the Main branch of the code when the responsible developer evaluates that the code is ready for release.
If the developer switches from one task to another, all they need to do is commit their changes and then create a new Feature branch for their new task. When this task is complete, just check the Feature branch and continue where they left off.
Feature branches also make it easier for two or more developers to collaborate on the development of the same feature, because each Feature branch is a sandbox which the only changes are needed to make the new feature work – in other words, an isolated test environment that allows users to run programs or files without affecting the application as a whole. This makes it much easier to see and track what each employee is doing.
Gitflow is ideal as a development approach involving a number of people that already involves some deployments carried out simultaneously and that need to be integrated for later availability to final customers.
The techniques described in this article are complementary to those described in the previous post, on Deployment Strategies, and very powerful when used together.