Writing Runbooks¶
A runbook is a directory of markdown files, or a single markdown file
whose ## headings are the steps. runsheets adds three things to ordinary
markdown:
- Front matter on
runbook.mdand on each step, carrying the metadata an operator needs before touching anything. - A fenced block convention: the info string's first word is the language, any following words are flags, and a block with no flag is display only.
- Inputs, declared once and exported as environment variables to every executed block.
Everything else is markdown you already know how to write, and the files remain readable on GitHub or in any editor.
-
runbook.md,steps/,verify.md,rollback.md,assets/, and how steps are ordered and named. -
Every key on the runbook and on a step, with defaults and validation.
-
run,destructive,terminal,expect,background, which languages execute, and theinterpretersmap. -
Declaring inputs, where values come from, secrets, and the variables runsheets sets for every block.
-
What makes a good step, converting an existing runbook, and checking your work.
The smallest runbook¶
runbook.md:
steps/010-say-hello.md:
Serve it with runsheets hello.