Know whose each thing is¶
Build the installation's tenancy tree, Organizations with Projects under them, so every Workload, Environment and database names who it belongs to.
Before you start¶
- A cluster from Prepare the cluster, in any profile:
nereus initinstalls the tenancy reef, its admission policy and the tree intenancy/. The reef has no Nereid. - Tenancy and access explains the tree and what an
ownerpoints at.
Steps¶
1. Create an Organization¶
nereus tenancy organization create makes the top of a tree, its boundary.
nereus tenancy organization create example
✓ tenancy/organizations/example created
Next steps:
nereus tenancy organization list
2. Add a Project under it¶
nereus tenancy project create needs a parent that exists; the line shows the full path. --dry-run --output yaml prints the object as apply takes it.
nereus tenancy project create shop \
--parent organization/example \
--repository https://github.com/example/shop
✓ tenancy/organizations/example/projects/shop created
Next steps:
nereus tenancy project list
3. Nest a Project¶
A Project can sit under another Project. A parent that does not exist is refused, and nothing is written.
nereus tenancy project create checkout --parent project/shop
✓ tenancy/organizations/example/projects/shop/projects/checkout created
Next steps:
nereus tenancy project list
4. Make a Project your default owner¶
nereus config set owner names the owner the next commands use when you give none.
nereus config set owner project/checkout
The kinds come from the installation, not the CLI: an installation whose reefs/tenancy/ adds Department and Squad gets nereus tenancy squad create the same way. To keep the tree in files, nereus tenancy apply --from-file tenancy/ writes parents before children.
Check it worked¶
nereus tenancy project get shows the full path and the boundary Organization.
nereus tenancy project get checkout
Name: checkout
Kind: Project
Path: tenancy/organizations/example/projects/shop/projects/checkout
Parent: Project/shop
Boundary: Organization/example
Repository: -
Clean up¶
Deletes everything under it
--cascade deletes every node under the Project, deepest first. Preview it with --dry-run.
nereus tenancy project delete shop --cascade
Next¶
- Authorize a team on a Project of the tree.
Learn more¶
- The tenancy reef: every command.
- ADR 0015: one tree of a fixed shape, with kinds from each installation.