What is a PlayBook and what is core components of a playbook?

Karan SirohiKaran Sirohi
2 min read

Table of contents

A playbook is a set of instructions that a Doctor Droid bot or an on-call engineer follows during a production incident.

A playbook consists of tasks. A task is an instruction that's executed through the portal. Let's create a task.

A task could involve fetching a metric from CloudWatch or running a kubectl command on a server. Let's create a new task to fetch logs from CloudWatch.

Add notes to the playbook. A note is a custom guideline for the user, related to the playbook or a specific step. Add a note indicating that this task fetches logs.

Hover over a step to view the note. It's also possible to add multiple tasks in a step. For instance, fetch a Datadog metric. After adding the task, check the metric.

Add variables to the playbook. For example, add a service as a variable. To use the variable, enter a dollar sign followed by the variable name.

Add a step with conditions. A condition is a rule that determines whether a certain action should be taken. For example, check logs from CloudWatch and check if the row count equals six. Then add a task. Add a metric and run the task.

Save the playbook. Execute the playbook and observe the results with the condition. If the condition isn't met, the step isn't recommended and the next step is executed.

These are all the core components of a playbook.

0
Subscribe to my newsletter

Read articles from Karan Sirohi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Karan Sirohi
Karan Sirohi