Free tool · no account
DevOps runbook template generator
Start from a worked example - a deploy, a database migration, a stuck service, a full disk, a Kubernetes rollout - and make it yours. Every step is checked as you type, including for pasted credentials, and the result exports as a Markdown runbook, a list of steps, or a shell script.
Each example is a complete runbook you can edit. Choosing one replaces what is below.
One precondition per line. They become a checklist.
One instruction per line, or say it cannot be undone.
Every step passes Shortspan’s runbook checks
The same rules the product applies when a runbook is saved, plus a scan for pasted credentials.
# Runbook: Deploy API | | | |---|---| | Service | api | | Environment | Production | | Owner | Platform team | | Runs on | SSH target `web-1` as `deploy` | | Approval | Required - Any project admin other than the person deploying | ## When to run A release has been merged to main and passed CI, and needs to go to production. ## Before you start - [ ] CI is green on the commit being deployed - [ ] No incident is in progress - [ ] The previous release tag is noted for rollback ## Steps Run the steps in order and stop at the first failure. ### 1. Pull the reviewed release ```bash /usr/bin/git -C /var/www/app pull --ff-only ``` **Expect:** Prints the new commit range, or "Already up to date." ### 2. Install PHP dependencies ```bash /usr/local/bin/composer --working-dir=/var/www/app install --no-dev --no-interaction ``` **Expect:** Ends with "Generating optimized autoload files" and no errors. ### 3. Install front-end dependencies ```bash /usr/bin/npm --prefix /var/www/app ci ``` **Expect:** Ends with "added N packages" and no ERR! lines. ### 4. Build front-end assets ```bash /usr/bin/npm --prefix /var/www/app run build ``` **Expect:** Ends with "built in …" and exits 0. ### 5. Run database migrations ```bash /usr/bin/php /var/www/app/artisan migrate --force ``` **Expect:** Lists each migration as DONE, or "Nothing to migrate." ### 6. Restart queue workers on the new code ```bash /usr/bin/php /var/www/app/artisan queue:restart ``` **Expect:** Prints "Broadcasting queue restart signal." ### 7. Confirm the app is healthy ```bash /usr/bin/curl -fsS https://app.example.com/up ``` **Expect:** Exits 0. A non-2xx response fails the step and stops the runbook. ## Roll back 1. Check out the previous release: /usr/bin/git -C /var/www/app checkout <previous-tag> 2. Re-run the dependency, build, and queue restart steps 3. If a migration must be undone, run it back only if it was written to be reversible ## If it goes wrong Post in #incidents and page the on-call engineer if the health check fails twice. ## Change log | Date | Change | By | |---|---|---| | | Created | Platform team |
Commit it next to the code it operates, so a change to the procedure is reviewed like any other change.
Runs entirely in your browser. Nothing you enter is sent to Shortspan or saved, and no account is needed.
Next step
Run it, approve it, and keep the record
In Shortspan a runbook is a versioned project resource. shortspan runbook check verifies the server before you commit to a run, a runbook can require a second person’s approval for each execution, and every run records who ran which version and how each step ended.
What goes in a runbook
A runbook is the written procedure for one recurring operational task. The template has the parts a runbook needs to be usable by someone who did not write it: an owner and the situation it is for, the preconditions to check before starting, each step as an exact command with what success looks like, who must approve it, how to roll it back, and who to call when it goes wrong.
The success check is the part most runbooks leave out and the part that matters most at 3 a.m. "Run the migration" is an instruction; "each migration is listed as DONE" tells the person running it whether to continue.
What the checks look for
Each step is checked against the rules a Shortspan runbook step must follow, which are good rules for any runbook that will be executed rather than read. A step is one program with its arguments, run directly rather than through a shell, so cd, export, NAME=value prefixes, &&, pipes, and redirects are flagged with what to write instead - usually pointing the tool at a directory, such as git -C /var/www/app pull, or moving the commands into a script.
On a server, a step needs the program’s absolute path, and a leading sudo is unnecessary because each step already runs as the configured account. Steps that look destructive - rm -rf, DROP, a forced migration, kubectl delete - prompt you to require approval. And every step is scanned for credentials with the same rules as the secret scanner, because a password pasted into a runbook is readable by everyone who can read the runbook.
Document, steps, or script
The document is Markdown, ready to commit beside the code it operates so that a change to the procedure is reviewed like any other change. The steps output is one command per line, ready to paste into a Shortspan runbook, with the list of executables the server’s allow-list needs. The script output wraps the steps in a strict bash script (set -euo pipefail) that announces each step and stops at the first failure.
Common questions
- What is a runbook in DevOps?
- A written, step-by-step procedure for a recurring operational task, such as deploying a release, running a migration, or recovering a service. A good one names its owner and trigger, gives exact commands with what success looks like, and says how to roll back.
- What is the difference between a runbook and a playbook?
- A runbook executes one specific procedure, step by step. A playbook coordinates the response to a situation - who decides what, who communicates, and which runbooks to run.
- Why can a step not use `cd` or `&&`?
- Steps are executed directly, not by a shell, so shell syntax reaches the program as literal text. It also makes each step one explicit, reviewable command. Point tools at directories (
git -C,npm --prefix) or put a longer sequence in a script. - Is anything I type sent anywhere?
- No. The runbook is built and checked in your browser, and the downloads are created on your machine. Nothing is uploaded or stored.
More free tools