The tenancy reef

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

O reef tenancy

Todos os comandos do reef tenancy: de quem é cada coisa, numa árvore de Organizations e Projects

Opening · kinds

The kinds come from each instance, the shape is fixed

  • A node: every kind of tenancy.getnereus.dev/v1alpha1 has an optional spec.parent: {kind, name}; one with no parent is a root
  • The boundary: one kind carries tenancy.getnereus.dev/boundary: "true"; here, Organization
Abertura · kinds

Os kinds vêm de cada instância, a forma é fixa

  • Um nó: todo kind de tenancy.getnereus.dev/v1alpha1 tem um spec.parent: {kind, name} opcional; um sem parent é uma raiz
  • A fronteira: um kind leva tenancy.getnereus.dev/boundary: "true"; aqui, Organization
Setup

Where do the tenancy kinds come from?

Preparação

De onde vêm os kinds de tenancy?

Setup · reef applybuilt

The tenancy reef, with the kinds of this instance

Preparação · reef applypronto

O reef tenancy, com os kinds desta instância

~/example
# The CRDs of this instance, from its reefs/tenancy/$ nereus reef apply tenancy \    --from-file reefs/tenancy/✓ core/reefs/tenancy created (tenancy.getnereus.dev/v1alpha1: organizations, projects) Next steps:   nereus tenancy organization create <organization>
Setup · statusbuilt

No Nereid by design: the tenancy reef is Ready with none

Preparação · statuspronto

Nenhuma Nereid por design: o reef tenancy fica Ready sem nenhuma

~/example
# Right after a plain init: core, and the tenancy reef every profile applies$ nereus statusREEF     NEREID    VERSION  STATUS  AGEcore     built-in  0.1.0    Ready   2mtenancy  -         -        Ready   2m
The tree

How does a Project find its place under an Organization?

A árvore

Como um Project encontra o seu lugar sob uma Organization?

The tree · organization createbuilt

Another boundary: an Organization, the root of its tree

A árvore · organization createpronto

Outra fronteira: uma Organization, a raiz da sua árvore

~/example
# The kind with the boundary annotation takes no parent$ nereus tenancy organization create example✓ tenancy/organizations/example created Next steps:   nereus tenancy organization list
The tree · project createbuilt

A Project under the Organization, the path from the root

A árvore · project createpronto

Um Project sob a Organization, o caminho desde a raiz

~/example
# A repository, under the Organization$ 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
The tree · project createbuilt

A Project under another Project

A árvore · project createpronto

Um Project sob outro Project

~/example
# A part of the shop, inside it$ nereus tenancy project create checkout \    --parent project/shop✓ tenancy/organizations/example/projects/shop/projects/checkout created Next steps:   nereus tenancy project list # A parent that does not exist changes nothing$ nereus tenancy project create orphan \    --parent project/missing✗ tenancy/projects/orphan: parent Project/missing does not exist. To fix it, run:  nereus tenancy project list  Nothing was changed.
The tree · project listbuilt

Each Project with its parent, the path only in get

A árvore · project listpronto

Cada Project com o seu parent, o caminho só no get

~/example
# One row per Project, in the tree's order$ nereus tenancy project listPROJECT   PARENT                  REPOSITORYshop      Organization/example    https://github.com/example/shopcheckout  Project/shop            -nereus    Organization/getnereus  https://github.com/getnereus/nereuscore      Project/nereus          -docs      Project/nereus          -nereids   Project/nereus          -triton    Project/nereus          -
The tree · project getbuilt

One Project in full: its path and its boundary

A árvore · project getpronto

Um Project por inteiro: o seu caminho e a sua fronteira

~/example
# The path climbs spec.parent to the root$ nereus tenancy project get checkoutName:        checkoutKind:        ProjectPath:        tenancy/organizations/example/projects/shop/projects/checkoutParent:      Project/shopBoundary:    Organization/exampleRepository:  -
The tree · applybuilt

Nereus's own tree, from files, parents before children

A árvore · applypronto

A própria árvore do Nereus, de arquivos, pais antes dos filhos

~/example
# The Organization and the Projects of this repository, in tenancy/: init wrote them$ nereus tenancy apply \    --from-file tenancy/tenancy/organizations/getnereus unchangedtenancy/organizations/getnereus/projects/nereus unchangedtenancy/organizations/getnereus/projects/nereus/projects/core unchangedtenancy/organizations/getnereus/projects/nereus/projects/docs unchangedtenancy/organizations/getnereus/projects/nereus/projects/nereids unchangedtenancy/organizations/getnereus/projects/nereus/projects/triton unchanged Next steps:   nereus tenancy --help
The tree · deletebuilt

A node with children waits for them

A árvore · deletepronto

Um nó com filhos espera por eles

~/example
# A Project with a child is refused$ nereus tenancy project delete shop✗ 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.
The tree · delete --cascadebuilt

A node and everything under it, deepest first

A árvore · delete --cascadepronto

Um nó e tudo o que está sob ele, do mais fundo primeiro

~/example
# First what it would delete$ nereus tenancy project delete shop \    --cascade \    --dry-runtenancy/organizations/example/projects/shop/projects/checkout deleted (dry run)tenancy/organizations/example/projects/shop deleted (dry run) # Then for real$ nereus tenancy project delete shop \    --cascade✓ tenancy/organizations/example/projects/shop/projects/checkout deleted✓ tenancy/organizations/example/projects/shop deleted Next steps:   nereus tenancy project list
The owner

How does everything else say whose it is?

O owner

Como todo o resto diz de quem é?

The owner · owner

Whatever points to the tree names its owner by kind and name

  • The field: owner: {kind, name}, a kind of the tenancy group, never an apiVersion and never a namespace
  • Who names it: the catalog's Workloads and Packages, an Environment, a resource Instance, a Mandate's match
O owner · owner

Tudo o que aponta para a árvore nomeia o seu owner por kind e nome

  • O campo: owner: {kind, name}, um kind do grupo tenancy, nunca uma apiVersion e nunca um namespace
  • Quem o nomeia: os Workloads e Packages do catálogo, um Environment, uma Instance de recurso, o match de um Mandate
The owner · config set ownerbuilt #902

The current owner in the CLI's config, so --owner is optional

O owner · config set ownerpronto #902

O owner atual na config do CLI, para o --owner ser opcional

~/example
# The node the next commands are for$ nereus config set owner project/triton✓ config: owner = Project/triton # No --owner: the output names the one used$ nereus catalog workload create api \    --type service \    --audience programs✓ catalog/workloads/api created (owner: Project/triton, type: service)