The delivery reef¶
Every command that takes a Workload to an Environment, and says what runs.
Commands¶
nereus reef apply delivery
The reef, then the Nereid that delivers to Kubernetesnereus workload deploy hello@dev
One command takes a Workload to an Environmentnereus workload deploy hello
deploy never guesses the targetnereus workload deploy hello@dev
deploy runs what a Build pushed, by its digestnereus workload deploy hello-dev
Every deploy is a new request, even with the same tagnereus workload deploy hello@dev
--dry-run shows the Delivery, with the tag as typednereus workload deploy hello@dev
--wait brings the Nereid's reason to the terminalnereus workload list
workload list says what the catalog hasnereus delivery list
delivery list says what was deployednereus delivery get hello-dev
delivery get says what runs and wherenereus workload logs hello-dev
workload logs reads a Delivery by its name or its pairnereus workload deploy hello@dev
A Delivery in a file resolves oncenereus delivery delete hello-dev
Deleting a Delivery takes the app out of the Environmentnereus template render python-serviceplanned #851
A template writes files, and the catalog registers them
Examples¶
reef-apply¶
The delivery reef's contract.
nereus reef apply delivery \
--from-file ./reefs/delivery/
✓ core/reefs/delivery created (delivery.getnereus.dev/v1alpha1)
workload-deploy¶
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-refuses¶
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-build¶
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
deploy-update¶
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-dry-run¶
Changes nothing; the digest comes from the Nereid, after the deploy.
nereus workload deploy hello@dev \
--image registry.example.com/hello:a1b2c3d \
--dry-run
delivery/deliveries/hello-dev would be created
workload: hello
environment: dev
image: registry.example.com/hello:a1b2c3d
deploy-wait¶
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>
workload-list¶
One row per Workload; DELIVERIES counts them, 0 means not deployed.
nereus workload list
WORKLOAD OWNER TYPE AUDIENCE DELIVERIES STATUS
billing Project/shop service programs 0 Ready
hello Project/hello service people 2 Ready
Next steps:
nereus delivery list
delivery-list¶
One row per Workload and Environment pair.
nereus delivery list
NAME WORKLOAD ENVIRONMENT DIGEST READY
hello-dev hello dev sha256:9f2c1e True
hello-stage hello stage sha256:77ab40 True
delivery-get¶
The digest running, the namespace, and the previous digest.
nereus delivery get hello-dev
NAME WORKLOAD ENVIRONMENT DIGEST NAMESPACE READY
hello-dev hello dev sha256:9f2c1e hello-dev True
Previous digest: sha256:77ab40
Next steps:
nereus workload logs hello-dev
workload-logs¶
Follow what the app prints.
nereus workload logs hello-dev \
--follow
[::ffff:127.0.0.1]:53792: response:200
delivery-apply¶
Write it as a file, then apply the file.
nereus workload deploy hello@dev \
--image registry.example.com/hello:a1b2c3d \
--dry-run \
--output yaml
apiVersion: delivery.getnereus.dev/v1alpha1
kind: Delivery
metadata:
name: hello-dev
delivery-delete¶
The Workload stays in the catalog.
nereus delivery delete hello-dev
✓ delivery/deliveries/hello-dev deleted
Next steps:
nereus workload list
template-render¶
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/