Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

Automation & toolingMixed 22 series

Scaffolding a new service from a template

A template is not scaffolding because it saves typing. It saves the decisions you would otherwise make at 6 pm on a Friday.

Quick reference

Nine moves from a template to a service you can page on.

Generate: Three choices before the commit

  • Pick the smallest template — One that builds, tests and deploys before you edit it.
  • Name it once, everywhere — Repo, service, DNS and queue read the same string.
  • Commit the lockfiles — A template that floats is a future incident.

Wire: Three things it cannot do for you

  • Own the pipeline — CI in the repo, not a shared job someone else controls.
  • Add a real health check — /healthz returns the build sha, not just a 200.
  • Set the first alert — One SLO and one page route before the first deploy.

Prove: Three runs that earn the name

  • Deploy to an empty account — Same pipeline, no manual step, no exceptions.
  • Run the smoke test — One request through the real path, not a mock.
  • Write the five-line runbook — What it does, who owns it, how to roll back.

In one line: A template is a starting line. The first deploy is the only test that counts.

Start from the template:

cookiecutter gh:acme/service-template

Explained

Generate. Pick the smallest template that already builds, tests and deploys. Then name the thing once: repository, service, DNS record, queue and dashboard read the same string, because the first rename is where a scaffold shows its seams. Commit the lockfiles, since a template that floats is a future incident.

Wire. The pipeline belongs in the repository, not in a shared job that another team can change without you. Add a health endpoint that returns the build sha, so a deploy can prove which artefact is live. Set one alert and one page route before the first deploy, because a service with no alert has no owner.

Prove. Deploy into an empty account with the same pipeline, no manual step. Send one request through the real path, then write the five-line runbook: what it does, who owns it, how to roll back.

The honest caveat: templates rot. One that is not rebuilt weekly ships last year's base image and this year's confidence.

The lesson: a template is a starting line, not a finish.

Your turn: Which of the nine moves does your last service skip?

More notes: Automation & tooling

Open in the notes app: search, filters, copy This note on GitHub