The project
An application is written as a project: a working directory yoke-compose writes, checks and builds.
Its descriptor, yoke.yaml, is the only source of truth about the application; the Manifests and the
executables of the Plugins it composes sit beside it
(a project).
hello/
├── yoke.yaml the descriptor
├── manifests/ one Manifest per Plugin the descriptor runs
├── components/ the executables, and image archives for an offline install
└── plugins.yaml where each Plugin taken came from; never packaged
What it holds so far
Taking the Plugins made it and put the two Plugins in it, each as a unit:
init wrote the descriptor, add plugin took the greeter, and the clock was gathered by hand and
declared with add unit. Each unit names its Plugin by identity, the Manifest of that identity is the
one in manifests/, and each executable is pinned by its digest.
A new build of a Plugin
A new build reaches the project only when the project takes it, since it pins the old one; a run or an install refuses a changed executable, naming both digests.
| The Plugin was taken | A new build is taken with |
|---|---|
| from a repository, at a tag | yoke-compose update plugin com.example.greeter --to v0.2.0, which replaces the two files, the digest and the record |
| from a path | yoke-compose remove units.greeter, the two files removed, and yoke-compose add plugin ../greeter again |
| by hand | the new files copied in, and the digest written again with set |
yoke-compose set units.clock.digest "sha256:$(sha256sum hello/components/plugins/clock | cut -d' ' -f1)" --dir hello
If the new build declares something new, its Manifest is new too, and what it declares is something the operator has not granted yet.
Declare the channel a client attaches to
yoke-compose add channel cli --dir hello --transport local --clients multiple
wrote channels.cli in hello/yoke.yaml
model: 1
id: com.example.hello
version: 0.1.0
arch: x86_64
core: ">=0.12.0"
units:
greeter:
kind: plugin
plugin: com.example.greeter
exec: components/plugins/greeter
digest: sha256:a700b8da21fda0a76389c7027d393531662c97a96702479915ccfd75733bbb73
clock:
kind: plugin
plugin: com.yoke.reference.clock
exec: components/plugins/clock
digest: sha256:a650575051d1beafa78140484a0609d65e2fca38b1b09eb48450bfa2d2474ef0
channels:
cli:
transport: local
clients: multiple
Nothing in the descriptor is typed by hand. Every field has an authoring verb — add, set,
remove, arbitrate — and a refusal names the field by the path set takes
(writing a description). A unit can also take
arguments, depend on another unit for the order of start, and bind what its Plugin needs; a value that
differs per site is a parameter (shipping it).
Check it
yoke-compose check --dir hello
check runs the same gate a host runs at install and at start, then the advice. On a workstation
the host's facts — its devices, its Core — are not there, and the gate says those checks were not run:
not run: host facts
| Exit status | Means |
|---|---|
0 | accepted; advice, if any, is printed and never stops anything |
1 | a refusal, every one found, each naming its field |
2 | a fault: the same attempt may succeed |
Advice is not a refusal. It names a weaker arrangement the gate accepts, and a waiver records why the project keeps it (advice and waivers). A block is a unit written once and placed in another project (blocks).
Build it
mkdir -p out
yoke-compose build --dir hello --out out
not run: host facts
out/com.example.hello-0.1.0.yoke
The output directory must exist: build refuses one that does not. It runs the gate first and refuses
on any refusal, then archives yoke.yaml, manifests/ and components/ deterministically: two builds
of one tree produce one digest. Signing is offered and never required: --sign takes a key, and a
host whose policy does not require a signature installs an unsigned package.