ChatOps and Self-Service Release Bots

Operations in a shared channel, where the transcript is the audit log. The Slack platform mechanics a platform engineer actually needs, how to design a release bot that maps a chat identity to a real authorization decision, and why a bot that can deploy is a production credential living inside a chat application.

Overview

The one real idea behind ChatOps

ChatOps has one real idea and a lot of demo-ware around it. When operations happen in a shared channel, the conversation and the action share a timeline: the observation, the diagnostic output, the fix and the deploy confirmation land next to each other. Six weeks later the postmortem writes itself from the transcript.

The alternative, one person on a laptop with a VPN and private shell history, produces incidents that are hard to reconstruct and knowledge that stays with one engineer.

A release bot that keeps operations in the channel has the same few parts wherever it runs. The engineer types /deploy in the channel. The bot verifies the request, acks it and resolves who is asking. An authorization service decides whether that person may deploy. The bot posts a plan in the channel with Approve and Cancel buttons, then calls the deployment API with the bot's own credential, and the audit log is written outside Slack.

Key concepts

  • Slash command payload
  • The three-second acknowledgement
  • response_url
  • Request signing
  • Block Kit and trigger_id
  • Socket Mode
  • Bot token versus user token
  • Identity mapping

Interview questions

  • Walk me through everything that happens between a user typing /deploy checkout to production and the deploy starting.
  • A Slack payload tells you user U024BE7LH ran the command. How do you turn that into an authorization decision?
  • Design the approval workflow for a production release bot. What are the failure modes?
  • Socket Mode or a public HTTP Request URL? Argue both sides.
  • A bot that can deploy is a production credential inside a chat application. What is the security model?
  • Where does ChatOps stop being the right interface and an internal developer portal start?

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio