PlatformEngr® Backstage course

Backstage: printable course notes

Create a Backstage app and run it: how to think about Backstage, config and secrets, Postgres, the catalog model, GitHub discovery and rules, GitHub sign-in, software templates, a custom scaffolder action, TechDocs, a production image and upgrades, and a capstone.

These pages are the same content as the interactive course, on one page per module, for reading and printing.

Four pieces

PieceWhat it is
See the end resultNot the first step: a 30-minute preview of the finished portal (catalog, sign-in, a template, docs) with few explanations. Useful to know where you are heading.
Full course11 modules from create-app to a shipped image: config, catalog, discovery, sign-in, templates, a custom action, TechDocs, upgrades and a capstone.
Reference repoThe finished portal and the checkout repo, plus one-page summaries of the docs. You copy from it.
Your two reposportal (platform team) and checkout (team-checkout). You create them in modules 01 and 03.

Your setup

Commands in these notes use these values (shared with the interactive course, stored only in this browser).

Outline

ModulePartTimeYou areYou will
00 Orientation: how to think about BackstageOrientation20 minPlatform and productKnow what Backstage is (a framework you build an app with), its main parts, who owns what, and what you will build. Tell the course who you are so every command is yours.
01 Create the app and find your way aroundThe portal and its catalog45 minPlatform teamGenerate a Backstage app with a pinned version, push it to your own repo, run it, and find the same four things in the UI and in the code.
02 Configuration, secrets and PostgresThe portal and its catalog45 minPlatform teamName the portal, move it to Postgres, keep secrets out of Git with environment variables, and give scripts an API token.
03 The catalog: teams, systems and a real serviceThe portal and its catalog60 minPlatform and productReplace the example data with Acme's teams and systems, describe the checkout service in its own repo, and read the relations the catalog builds from it.
04 Catalog at scale: let it find the reposThe portal and its catalog45 minPlatform teamReplace hand-registered URLs with GitHub discovery, so every repo with a catalog-info.yaml on main shows up on its own, and limit what a team repo may add.
05 Sign in with GitHubThe portal and its catalog45 minPlatform teamReplace guest sign-in with GitHub, so every person in the portal is a User entity with real team memberships.
06 Golden paths with software templatesGolden paths and docs60 minPlatform teamPublish a node-service template that creates a repo with code, docs and a catalog-info.yaml, test it with a dry run, and use it as team-checkout.
07 Your own scaffolder actionGolden paths and docs60 minPlatform teamWrite, test and use an acme:team:lookup action that checks the owner is a real team and gives the template its display name.
08 Docs next to the code with TechDocsGolden paths and docs30 minPlatform and productShow checkout's and cart's docs in the portal, update them from Git, and know how they are built.
09 Ship it: an image, production config and an upgradeShip it60 minPlatform teamBuild the portal as a Docker image with its catalog, templates and MkDocs, run it with production config and Postgres, and upgrade Backstage.
10 Capstone: onboard team-paymentsShip it60 minPlatform and productOnboard a new team, team-payments, end to end without the steps: catalog, sign-in, a new service from the template, docs, and a new image.

Where the portal runs

Everything runs on your laptop with Node, Yarn and Docker.

Between you and production