Cheat notes · Module 10 · Ship it
Capstone: onboard team-payments
A five-minute review for when you have done this module and want it back in your head. Open the full module for the steps and the lab, or the full text to print.
The idea
Onboarding a team is what a portal is for: the platform adds a Group and a System by pull request, the team creates its service from the template, and the image proves it all works from Git alone.
Remember
- Platform: in
catalog/org.yamladd theteam-paymentsGroup (parentacme), add it toacme'schildren, add yourself viamemberOf; incatalog/systems.yamladd thepaymentsSystem (owner team-payments, domain commerce). - Team: Create → Node.js service, owner Team Payments, system payments. The template and discovery do the rest; the team needs nothing from the platform.
- Prove it: rebuild the image and run it against a fresh database;
payments-apimust showownedBy group:default/team-paymentsandpartOf system:default/payments. - Check acceptance criteria yourself before opening the solution.
Pitfalls
- Adding the Group but not the parent's
childrenor yourmemberOf: relations look half-built and you cannot pick the team as yours. - Typing people into YAML for every team: the next step is an org provider that imports teams and users.
Commands
curl -s -H "Authorization: Bearer $PORTAL_API_TOKEN" localhost:7007/api/catalog/entities/by-name/component/default/payments-api | jq -r '.relations[] | .type + " " + .targetRef' | The new service's relations |
docker rm -f portal-prod-db && docker network rm portal-net | Tear down |
Test yourself
Answer in your head first, then open the answer.
What did onboarding team-payments need from the platform team?
A Group, a System and a membership in org.yaml and systems.yaml, through a pull request.
What did team-payments need from the platform team to create a service?
Nothing: the template and discovery do the rest.
What would you automate next with a third team?
Importing teams and users with an org provider (GitHub or your identity provider).
Where module 10 leaves you: team-payments exists, owns payments-api and the payments system, and you are a member. The image runs it all.