Home Analytics Introduction to ChatOps with Acquia BLT and Slack

Introduction to ChatOps with Acquia BLT and Slack

by datatabloid_difmmk

In the modern DevOps world, deployment pipelines are largely automated across multiple tools. Most DevOps pipelines validate, test, build, and deploy code all automatically. It may be tempting to believe that the system just handles these steps for you. If something goes wrong, how long does it take to find it? QA teams often wonder why tickets marked for testing actually appear to be unavailable. Often? This is where ChatOps comes into play. ChatOps turns your chat messenger into a communication hub for your team and your automated DevOps pipeline. Acquia Build & Launch Tools has Slack messaging built in. This guide covers basic ChatOps set up using BLT and Slack.

Preparing Slack

To use Slack as a hub for automated messaging, you need a channel that can receive messages via webhooks. There are two ways of thinking. Some people prefer to use a separate channel dedicated to devops messaging. Other teams like to see devops messages alongside other team chats. Which one suits your team is largely a matter of taste.

Teams that prefer to do their DevOps messaging in a separate channel typically do this. This is because DevOps messaging can become repetitive, cluttering general chat with messages and obscuring real discussions between developers. Placing DevOps messages in dedicated channels allows team members to set the right level of notification without interfering with normal team discussions.

On the other hand, some teams prefer to put DevOps in the middle of everything. Knowing what is happening in your repository and when a deployment is in progress is important. Display DevOps messages in the main team chat so everyone knows what’s going on in case of an emergency.
Regardless of your decision, you have to Set up webhooks Receive a message. Slack makes this very easy.

  1. Create a new Slack app or open the settings of an existing Slack app.
  2. choose incoming webhooks in the left navigation Activate an incoming webhook if not already enabled.
  3. click Add new webhook to the workspace. Select the channel where you want to send your DevOps messages, approve.
  4. Receive a unique webhook URL. I will keep this for later.

Connect Slack to Acquia BLT

BLT is a great way to automate much of your Drupal maintenance on Acquia. It’s easily configurable via YAML files, requires little to no setup, and has a number of built-in scripts that offer great benefits. Even better, Acquia BLT has a Slack connection built in, so all you have to do is specify the webhook URL in your config file!

Adding Slack communication to BLT operations is blt.yml File.this configuration blt.yml Push your code to Acquia. Use the unique webhook URL from the previous section.

slack:
  webhook-url: “https://my.slack.webhook.url/########”

Once this configuration is deployed to Acquia, you should start seeing messages similar to the following in your Slack channel.

"graphic"

Bonus: Connecting Code Repositories

Acquia BLT provides chatops for an important part of the devops pipeline. Helps cover the “last mile” where code is actually deployed to Acquia. What about the rest of the pipeline?Chatops can also capture the rest of the code operations, making Slack the true hub of his DevOps pipeline for the team.
Git is the most commonly used version control system and most of the major Git remote providers already have Slack apps. This list includes Bitbucket, GitHub, and GitLab. Connecting each of these apps is usually pretty straightforward.

bit bucket

Bitbucket makes this incredibly easy.First, install Bitbucket Cloud Slack appOnce the app is installed, you can subscribe any channel to any repository with a simple slash command.

/bitbucket connect <リポジトリ URL>

This will connect the channel to the repository and open a browser tab where you can select the relevant event in Bitbucket. Nearly all are selected by default, providing a robust view of repository activity.

Github

GitHub also has a helpful Slack app.installation of GitHub for Slack app provides slash commands to subscribe channels to repository activity.

/github subscribe [repository name]

The GitHub for Slack app posts with repository activity to subscribed Slack channels. This keeps the development team aware of necessary changes and actions.

GitLab

GitLab doesn’t provide an app integration for notifications, but you can use a previously generated webhook! To set it up Slack notification serviceperform the following steps:

  1. Go to project settings and select integration.
  2. select Slack notifications.
  3. choose Active check box Enable integration section.
  4. Select the triggers for which you want notifications.
  5. Enter the webhook URL you created earlier.
  6. select Save changes.

GitLab now sends notifications to the same channel Acquia BLT does!

That’s how it was done!

Setting up ChatOps with Acquia BLT is very easy. This message is displayed for database copies and backups, deployments, and code switches. If you’re also connecting your code repositories, you need to get a complete picture of your code and deployment activity. Now your team can stay up to date on his Acquia application status!

You may also like

Leave a Comment

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

About Us

We're a provider of Data IT News and we focus to provide best Data IT News and Tutorials for all its users, we are free and provide tutorials for free. We promise to tell you what's new in the parts of modern life Data professional and we will share lessons to improve knowledge in data science and data analysis field.

Facebook Twitter Youtube Linkedin Instagram

5 Strategies To Reduce IT Support Tickets – Ultimate Guide

Recent Articles

Redefining the Role of IT in a Modern BI World What (Really) Are Issues Faced by Data Scientist in 2022 How I start Data Science Projects | What to do when you're stuck

Featured

5 Strategies To Reduce IT Support Tickets – Ultimate Guide Redefining the Role of IT in a Modern BI World What (Really) Are Issues Faced by Data Scientist in 2022

Copyright ©️ All rights reserved. | Data Tabloid