The delivery reef

Every command that takes a Workload to an Environment, and says what runs

O reef delivery

Todos os comandos que levam um Workload a um Environment e dizem o que está rodando

Opening · who delivers

The Nereid turns a Delivery into a Release, and Flux installs it

  • kubernetes: resolves the digest, writes the Source, the Target and the Release, and the Delivery's status
  • flux: installs the Release in the Environment, as it does today
Abertura · quem entrega

O Nereid transforma uma Delivery em um Release, e o Flux instala

  • kubernetes: resolve o digest, escreve o Source, o Target e o Release, e o status da Delivery
  • flux: instala o Release no Environment, como já faz hoje
Setup

Where does the delivery reef come from?

Preparação

De onde vem o reef delivery?

Setup · reef applybuilt #845

The reef, then the Nereid that delivers to Kubernetes

Preparação · reef applypronto #845

O reef, depois o Nereid que entrega para Kubernetes

~/example
# The delivery reef's contract$ nereus reef apply delivery \    --from-file ./reefs/delivery/✓ core/reefs/delivery created (delivery.getnereus.dev/v1alpha1) # The Nereid, with the reef's default Mandate$ nereus nereid apply kubernetes \    --reef delivery✓ core/nereids/kubernetes created  validatingadmissionpolicies/controller-kubernetes-read-tokens applied (its only tokens: a Registry's read identity, for that Registry, ten minutes at most)✓ core/mandates/kubernetes created (reef: delivery, nereid: kubernetes, default) Next steps:   nereus workload deploy --help
Deploy

How does a developer run an image in an Environment?

Deploy

Como um desenvolvedor roda uma imagem em um Environment?

Deploy · workload deploybuilt #845

One command takes a Workload to an Environment

Deploy · workload deploypronto #845

Um comando leva um Workload a um Environment

~/example
# A Workload of the catalog, in the dev Environment$ nereus workload deploy hello@dev \    --image registry.example.com/hello:a1b2c3d✓ delivery/deliveries/hello-dev created Next steps:   nereus delivery get hello-dev
Deploy · workload deploy · a bare namebuilt #845

deploy never guesses the target

Deploy · workload deploy · um nome soltopronto #845

O deploy nunca adivinha o destino

~/example
# A bare name could change target in silence when a second Environment appears$ nereus workload deploy hello \    --image registry.example.com/hello:a1b2c3d✗ deploy needs the target. To deploy hello, run:  # to the dev Environment  nereus workload deploy hello@dev --image registry.example.com/hello:a1b2c3d
Deploy · workload deploy · a Buildbuilt #1068

deploy runs what a Build pushed, by its digest

Deploy · workload deploy · um Buildpronto #1068

O deploy roda o que um Build publicou, pelo digest

~/example
# The image of a Build that succeeded, never a tag that may move$ nereus workload deploy hello@dev \    --build hello-a1b2c3d✓ delivery/deliveries/hello-dev created Next steps:   nereus delivery get hello-dev # A Build still running is refused, with what to run$ nereus workload deploy hello@dev \    --build hello-b4c5d6e✗ build/builds/hello-b4c5d6e is Running, not Succeeded. To follow it, run:  nereus build get hello-b4c5d6e
Deploy · workload deploy · againbuilt #845

Every deploy is a new request, even with the same tag

Deploy · workload deploy · de novopronto #845

Cada deploy é um pedido novo, mesmo com a mesma tag

~/example
# The same tag, pushed again: the unique name works too$ nereus workload deploy hello-dev \    --image registry.example.com/hello:a1b2c3d✓ delivery/deliveries/hello-dev configured Next steps:   nereus delivery get hello-dev
Deploy · workload deploy --dry-runbuilt #845

--dry-run shows the Delivery, with the tag as typed

Deploy · workload deploy --dry-runpronto #845

O --dry-run mostra a Delivery, com a tag como foi digitada

~/example
# Changes nothing; the digest comes from the Nereid, after the deploy$ nereus workload deploy hello@dev \    --image registry.example.com/hello:a1b2c3d \    --dry-rundelivery/deliveries/hello-dev would be created  workload: hello  environment: dev  image: registry.example.com/hello:a1b2c3d
Deploy · workload deploy --waitbuilt #846

--wait brings the Nereid's reason to the terminal

Deploy · workload deploy --waitpronto #846

O --wait traz o motivo do Nereid para o terminal

~/example
# A tag that does not exist fails after the Delivery is written$ nereus workload deploy hello@dev \    --image registry.example.com/hello:does-not-exist \    --wait✓ delivery/deliveries/hello-dev configured✗ delivery/deliveries/hello-dev not ready: The registry does not have the tag does-not-exist of the repository registry.example.com/hello. To fix it, run:  # deploy a tag that exists  nereus workload deploy hello@dev --image registry.example.com/hello:<tag> # A tag that exists waits for it to run$ nereus workload deploy hello@dev \    --image registry.example.com/hello:a1b2c3d \    --wait✓ delivery/deliveries/hello-dev configured✓ delivery/deliveries/hello-dev ready (sha256:9f2c1e) Next steps:   nereus workload logs hello-dev
Read

What exists, what runs, and what does it print?

Leitura

O que existe, o que roda e o que isso imprime?

Read · workload listbuilt #845

workload list says what the catalog has

Leitura · workload listpronto #845

O workload list diz o que o catálogo tem

~/example
# One row per Workload; DELIVERIES counts them, 0 means not deployed$ nereus workload listWORKLOAD  OWNER          TYPE     AUDIENCE  DELIVERIES  STATUSbilling   Project/shop   service  programs  0           Readyhello     Project/hello  service  people    2           Ready Next steps:   nereus delivery list
Read · delivery listbuilt #845

delivery list says what was deployed

Leitura · delivery listpronto #845

O delivery list diz o que foi implantado

~/example
# One row per Workload and Environment pair$ nereus delivery listNAME         WORKLOAD  ENVIRONMENT  DIGEST         READYhello-dev    hello     dev          sha256:9f2c1e  Truehello-stage  hello     stage        sha256:77ab40  True # The deployments of one Workload$ nereus delivery list \    --workload helloNAME         WORKLOAD  ENVIRONMENT  DIGEST         READYhello-dev    hello     dev          sha256:9f2c1e  Truehello-stage  hello     stage        sha256:77ab40  True
Read · delivery getbuilt #845

delivery get says what runs and where

Leitura · delivery getpronto #845

O delivery get diz o que roda e onde

~/example
# The digest running, the namespace, and the previous digest$ nereus delivery get hello-devNAME       WORKLOAD  ENVIRONMENT  DIGEST         NAMESPACE  READYhello-dev  hello     dev          sha256:9f2c1e  hello-dev  True Previous digest: sha256:77ab40 Next steps:   nereus workload logs hello-dev
Read · workload logsbuilt #846

workload logs reads a Delivery by its name or its pair

Leitura · workload logspronto #846

O workload logs lê uma Delivery pelo nome ou pelo par

~/example
# Follow what the app prints$ nereus workload logs hello-dev \    --follow[::ffff:127.0.0.1]:53792: response:200 # A Workload in several Environments lists them and picks none$ nereus workload logs hello✗ hello runs in 2 Environments. To read one, run:  # in dev  nereus workload logs hello@dev  # in stage  nereus workload logs hello@stage
Manage

How is a Delivery kept in a file, or removed?

Gestão

Como manter uma Delivery em um arquivo, ou removê-la?

Manage · delivery applybuilt #845

A Delivery in a file resolves once

Gestão · delivery applypronto #845

Uma Delivery em um arquivo resolve uma vez

~/example
# Write it as a file, then apply the file$ nereus workload deploy hello@dev \    --image registry.example.com/hello:a1b2c3d \    --dry-run \    --output yamlapiVersion: delivery.getnereus.dev/v1alpha1kind: Deliverymetadata:  name: hello-dev # The same file again changes nothing$ nereus delivery apply \    --from-file delivery/delivery/deliveries/hello-dev unchanged
Manage · delivery deletebuilt #845

Deleting a Delivery takes the app out of the Environment

Gestão · delivery deletepronto #845

Apagar uma Delivery tira o app do Environment

~/example
# The Workload stays in the catalog$ nereus delivery delete hello-dev✓ delivery/deliveries/hello-dev deleted Next steps:   nereus workload list
Template

Where do a new Workload's files come from?

Template

De onde vêm os arquivos de um Workload novo?

Template · template renderplanned #851

A template writes files, and the catalog registers them

Template · template renderplanejado #851

Um template escreve arquivos, e o catálogo os registra

~/example
# The files of a new Workload, with Copier$ nereus template render python-service \    --path ./hello \    --param name=hello✓ catalog/templates/python-service rendered at ./hello Next steps:   nereus catalog apply --from-file ./hello/catalog/
References · references

Where the ideas came from

Referências · referências

De onde vieram as ideias