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, and add plugin took the greeter from its path and system-info from
its repository at a tag. 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.yoke.system-info --to <tag>, which replaces the two files, the digest and the record |
| from a path | yoke-compose update plugin com.example.greeter, which builds the path again and replaces the same |
| by hand | the new files copied in, and the digest written again with set |
yoke-compose set units.greeter.digest "sha256:$(sha256sum hello/components/plugins/greeter | 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.14.1"
units:
greeter:
kind: plugin
plugin: com.example.greeter
exec: components/plugins/greeter
digest: sha256:a700b8da21fda0a76389c7027d393531662c97a96702479915ccfd75733bbb73
system-info:
kind: plugin
plugin: com.yoke.system-info
exec: components/plugins/system-info
digest: sha256:9320c9e8a297ae020a09fcad772ed359167cdcf95534614f095d753ee8046ad1
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.