Skip to content

The tenancy reef

Every command of the tenancy reef: whose a thing is, as a tree of Organizations and Projects.

Commands

Examples

reef-apply

The CRDs of this instance, from its reefs/tenancy/.

nereus reef apply tenancy \
  --from-file reefs/tenancy/
output
✓ core/reefs/tenancy created (tenancy.getnereus.dev/v1alpha1: organizations, projects)

Next steps:

  nereus tenancy organization create <organization>

status

Right after a plain init: core, and the tenancy reef every profile applies.

nereus status
output
REEF     NEREID    VERSION  STATUS  AGE
core     built-in  0.1.0    Ready   2m
tenancy  -         -        Ready   2m

organization-create

The kind with the boundary annotation takes no parent.

nereus tenancy organization create example
output
✓ tenancy/organizations/example created

Next steps:

  nereus tenancy organization list

project-create

A repository, under the Organization.

nereus tenancy project create shop \
  --parent organization/example \
  --repository https://github.com/example/shop
output
✓ tenancy/organizations/example/projects/shop created

Next steps:

  nereus tenancy project list

project-nested

A part of the shop, inside it.

nereus tenancy project create checkout \
  --parent project/shop
output
✓ tenancy/organizations/example/projects/shop/projects/checkout created

Next steps:

  nereus tenancy project list

project-list

One row per Project, in the tree's order.

nereus tenancy project list
output
PROJECT   PARENT                  REPOSITORY
shop      Organization/example    https://github.com/example/shop
checkout  Project/shop            -
nereus    Organization/getnereus  https://github.com/getnereus/nereus
core      Project/nereus          -
docs      Project/nereus          -
nereids   Project/nereus          -
triton    Project/nereus          -

project-get

The path climbs spec.parent to the root.

nereus tenancy project get checkout
output
Name:        checkout
Kind:        Project
Path:        tenancy/organizations/example/projects/shop/projects/checkout
Parent:      Project/shop
Boundary:    Organization/example
Repository:  -

apply

The Organization and the Projects of this repository, in tenancy/: init wrote them.

nereus tenancy apply \
  --from-file tenancy/
output
tenancy/organizations/getnereus unchanged
tenancy/organizations/getnereus/projects/nereus unchanged
tenancy/organizations/getnereus/projects/nereus/projects/core unchanged
tenancy/organizations/getnereus/projects/nereus/projects/docs unchanged
tenancy/organizations/getnereus/projects/nereus/projects/nereids unchanged
tenancy/organizations/getnereus/projects/nereus/projects/triton unchanged

Next steps:

  nereus tenancy --help

delete

A Project with a child is refused.

nereus tenancy project delete shop
output
✗ tenancy/organizations/example/projects/shop has 1 child (checkout): delete it first, or it with it:
  nereus tenancy project delete shop --cascade --dry-run
  Nothing was changed.

delete-cascade

First what it would delete.

nereus tenancy project delete shop \
  --cascade \
  --dry-run
output
tenancy/organizations/example/projects/shop/projects/checkout deleted (dry run)
tenancy/organizations/example/projects/shop deleted (dry run)

config-owner

The node the next commands are for.

nereus config set owner project/triton
output
✓ config: owner = Project/triton