The catalog reef

Every command that says what Nereus has: what runs, what is published, and whether it holds together

O reef catalog

Todos os comandos que dizem o que o Nereus tem: o que roda, o que é publicado e se tudo se sustenta

Opening · the kinds

Workload runs, Package is published

  • Workload: what runs, with owner, type, audience, source and runtime
  • Package: what is published, with owner, type, registry, name, audience and source
  • WorkloadType and PackageType: configurable, a name plus the answers it fills in; the platform never reads a type's name
  • Template: the files of a new entry, rendered with Copier (its slide)
Abertura · os kinds

Workload roda, Package é publicado

  • Workload: o que roda, com owner, type, audience, source e runtime
  • Package: o que é publicado, com owner, type, registry, name, audience e source
  • WorkloadType e PackageType: configuráveis, um nome mais as respostas que ele preenche; a plataforma nunca lê o nome de um tipo
  • Template: os arquivos de uma entrada nova, escritos com o Copier (o slide dele)
Workload

How does what runs get into the catalog?

Workload

Como o que roda entra no catálogo?

Workload · applybuilt #902

One apply registers the repository

Workload · applypronto #902

Um apply registra o repositório

~/git/nereus
# The files of catalog/ are the truth; Triton already exists and is imported the same way$ nereus catalog apply \    --from-file catalog/✓ catalog/workloadtypes/controller created✓ catalog/workloadtypes/service created✓ catalog/packagetypes/cli created✓ catalog/packagetypes/image created✓ catalog/workloads/flux created (owner: Project/nereids, type: controller)✓ catalog/workloads/keycloak created (owner: Project/nereids, type: controller)✓ catalog/workloads/openbao created (owner: Project/nereids, type: controller)✓ catalog/workloads/triton created (owner: Project/triton, type: service)✓ catalog/packages/nereus created (owner: Project/core, type: cli, registry: pypi)✓ catalog/packages/openbao-image created (owner: Project/nereids, type: image, registry: oci) Next steps:   nereus catalog check
Workload · workload createbuilt #902

create writes an entry from flags

Workload · workload createpronto #902

O create escreve uma entrada de flags

~/example
# No --owner: the current owner is used and named in the output$ nereus catalog workload create edge-cloudflare \    --type controller \    --audience none \    --repository https://github.com/getnereus/nereus \    --ref branch=main \    --path controllers/edge-cloudflare/ \    --dry-runcatalog/workloads/edge-cloudflare would be created (owner: Project/nereids, type: controller)Nothing changed (--dry-run). # The file to commit and apply, not the object$ nereus catalog workload create edge-cloudflare \    --type controller \    --audience none \    --ref branch=main \    --dry-run \    --output yamlapiVersion: catalog.getnereus.dev/v1alpha1kind: Workloadmetadata:  name: edge-cloudflarespec:  owner:    kind: Project    name: nereids  type: controller  source:    ref:      branch: main
Workload · workload listbuilt #902

list searches by type

Workload · workload listpronto #902

O list busca por tipo

~/example
# The catalog lists what it has, one row per Workload$ nereus catalog list \    --type serviceWORKLOAD  OWNER           TYPE     AUDIENCE        STATUStriton    Project/triton  service  agents, people  DeploymentNotFound # One entry, as the platform holds it$ nereus catalog get triton \    --output yaml
Workload · workload deletebuilt #902

delete never touches what runs

Workload · workload deletepronto #902

O delete nunca toca no que roda

~/example
# The entry leaves the catalog; the Deployment, if any, stays$ nereus catalog delete openbao✓ catalog/workloads/openbao deleted
Package

How does what is published get into the catalog?

Package

Como o que é publicado entra no catálogo?

Package · packagebuilt #902

A Package says where it is published

Package · packagepronto #902

Um Package diz onde é publicado

~/example
# The same verbs, the kind in the path$ nereus catalog package create nereus \    --owner project/core \    --type cli \    --registry pypi \    --name nereus \    --audience people \    --audience programs \    --ref branch=main \    --path cli/ \    --dry-runcatalog/packages/nereus would be created (owner: Project/core, type: cli, registry: pypi)Nothing changed (--dry-run). # A registry the type does not take is refused before it is written$ nereus catalog package create base-image \    --owner project/core \    --type image \    --registry pypi \    --name base-image \    --audience programs \    --dry-run✗ catalog/packages/base-image: type image takes the registries oci, not pypi  Nothing was changed.
Types

Which shapes does the catalog know?

Tipos

Que formas o catálogo conhece?

Types · workload-type listbuilt #902

A type is a name plus answers

Tipos · workload-type listpronto #902

Um tipo é um nome mais respostas

~/example
# The shapes of what runs, and what each one answers$ nereus catalog workload-type listTYPE         RUNS    TRIGGER         STATUScontroller   always  event           Readyfunction     once    request, event  Readyjob          once    schedule        Readyservice      always  request         Readystatic-site  always  request         Readyweb-app      always  request         Readyworker       always  event           Ready # What a Package may be, and where it may be published$ nereus catalog package-type listTYPE     REGISTRIES        STATUSchart    oci               Readycli      pypi, npm, oci    Readyimage    oci               Readylibrary  pypi, npm, maven  Readymodule   git, oci          Readyreef     git, oci          Ready
Check

Does the catalog hold together?

Check

O catálogo se sustenta?

Check · checkbuilt #903

A contradiction fails, a gap points

Check · checkpronto #903

Contradição falha, lacuna só aponta

~/git/nereus
# Nereus's own catalog today: no contradiction, and each gap with its issue$ nereus catalog check✓ tenancy: 1 organization, 5 projects, every owner resolves✓ types: every workload type and package type resolves, every registry allowed! catalog/workloads/triton: audience people, agents, no edge reef (#470)! catalog/workloads/triton: uses nats, no messaging reef (#576)! catalog/packages/nereus: not found on pypi0 contradictions, 3 gaps # The repository's files, in the local checks before a PR; the cluster needs only the tenancy reef$ make catalog-check
Check · check, a contradictionbuilt #903

A contradiction fails the command

Check · check, uma contradiçãopronto #903

Uma contradição falha o comando

~/example
# An owner that does not exist, a registry the type does not allow, an audience missing$ nereus catalog check✗ catalog/workloads/api: owner Project/ghost does not exist✗ catalog/packages/base-image: type image takes the registries oci, not pypi✗ catalog/workloads/worker: audience is missing3 contradictions, 0 gaps # The exit code is what the local check and a script read$ echo $?1
Template

Where do a new entry's files come from?

Template

De onde vêm os arquivos de uma entrada nova?

Template · templateidea #851

A template writes, apply registers

  • nereus template render: the shortcut of nereus catalog template render, with Copier; create makes the Template object and apply takes only files
  • nereus catalog apply: registers what the rendered files say, and leaves what exists unchanged
Template · templateideia #851

O template escreve, o apply registra

  • nereus template render: o atalho de nereus catalog template render, com o Copier; create faz o objeto Template e apply aceita só arquivos
  • nereus catalog apply: registra o que os arquivos escritos dizem, e deixa o que existe como unchanged
References · references

Where the ideas came from

Referências · referências

De onde vieram as ideias