An image
Yoke reaches an embedded Linux image through a Yocto Project layer, meta-yoke, which builds what
Yoke released into the packages an image installs. Each recipe compiles from the source a release
published, pinned by its checksum. A build fetches everything first and then builds with the network
off, so an image builds offline once its downloads are in place.
Taking the layer
| repository | https://github.com/yoke-project/meta-yoke |
| branch | main — the one branch, for the Yocto Project's newest long-term series, wrynose, and no other |
| depends on | core; openembedded-layer and meta-python, both in meta-openembedded |
| licence | MIT |
The layer carries no version of its own: an image takes it at a revision, as it takes every other layer. A revision that built once keeps building, and that is also how an image on another series pins one.
git clone https://github.com/yoke-project/meta-yoke.git
git -C meta-yoke checkout <revision>
BBLAYERS += " \
/path/to/meta-openembedded/meta-oe \
/path/to/meta-openembedded/meta-python \
/path/to/meta-yoke \
"
The image needs the distro features systemd and pam. systemd is the init system Yoke's units
are written for; on a distribution that does not choose it already, the build's variable INIT_MANAGER,
set to systemd, asks for it. pam is what lets an account's user manager run, which the
application form needs, and what yoke-auth asks when a channel requires its caller to sign in.
The packages, and where each goes
One recipe per repository, and several packages per recipe, so that a device takes the runtime and leaves the tooling behind.
| Package | Holds | Goes on |
|---|---|---|
yoke-core | the Core | a device |
yoke | the manager; it depends on yoke-core | a device |
yoke-guardian | the guardian, for the application form | a device that runs applications under an account |
yoke-auth | the program the Core asks the host's authentication service through | a device whose channels require a caller to sign in |
yoke-packaging | what the init system is given, below | a device |
yoke-compose | the composer | a workstation, never a device |
yoke-conformance | the conformance suite | a workstation, never a device |
python3-yoke-proto, python3-yoke-sdk | the Python family, for a unit written in Python | a device that runs one |
| the C, C++ and Rust families' development packages | the libraries, headers and build configuration a program is built against | the build, not the device: the program carries them |
yoke-sdk-go | the Go family's harnesses; a Go program compiles the library in | a workstation |
yoke-reference-* | the example application's units that run on the host, and the example as a device runs it | an image that shows the example |
The verification tool is in no package. It checks Yoke's own tests and records, and an image has nothing to do with it.
What the init system is given
yoke-packaging installs the files yoke ships, unchanged: the layer writes none of its own.
| File | For |
|---|---|
/usr/lib/systemd/system/yoke.service | the service form: the one deployment the init system runs, with yoke service exec |
/usr/lib/systemd/user/yoke-guardian.service | the application form: a user unit running yoke-guardian --boot for the account it is enabled for |
/usr/lib/tmpfiles.d/yoke.conf | the service form's directories, with their owners and modes |
/usr/lib/sysusers.d/yoke.conf | the group yoke-apps, whose members may install applications |
/etc/yoke/core.yaml | the Core's configuration in the service form, kept across upgrades |
Neither unit is enabled by installing the package.
- In the service form,
yoke.servicestarts the deployment installed on the host, so it is enabled once there is one. Without one it would start a refusal. - In the application form,
yoke-guardian.serviceis enabled for the account that hosts the applications, and the account lingers, so that its user manager runs at boot with nobody signed in. The guardian then brings up every instance whose record wants it running (the instance record).
An image that prepares an instance before its first boot ends creates it with
yoke instance create --running (instances): the record says
the instance is to run, and no guardian is started for it. The account's guardian brings it up when its
unit starts.
A deployment in the service form
The service form has no package to install: it is files, and an image puts them in place when it is built. Two parties own them, and an image keeps them apart, so that every file has one recipe.
| File | Put there by |
|---|---|
/etc/yoke/plugins.d/<plugin>/manifest.yaml | the Plugin's recipe, as a distribution's package: the Manifest, in a directory named by the Plugin's identity |
/usr/lib/yoke/plugins/<plugin> | the Plugin's recipe: its executable, which the Core finds from the identity, never from a path in the composition |
/usr/lib/yoke/interfaces/<name> | a managed interface's recipe: its executable, which the composition names |
/etc/yoke/deployments/<name>.yaml | the image's host recipe, as the administrator: the composition document — the units, the channels, and the site's values written in |
/etc/yoke/deployment.yaml | the host recipe: a link to the composition in force |
yoke.service enabled | the host recipe, by a systemd preset read before yoke-packaging's, which leaves the unit disabled |
A composition has no head and no parameters. It names the Plugins by identity and the values a site
chose as literals, so it is written for one host, not shipped by an author. A device that a unit binds,
such as an instrument, has to exist before yoke.service starts: the deployment's checks refuse a
missing one rather than starting and failing.
Adding a Plugin to such an image is adding a package, and changing what runs is changing the composition. Neither rewrites the other's file.
The images the layer is tested with
meta-yoke builds and boots two images of its own on every change, one per form, under QEMU, on
qemux86-64 and qemuarm64. Both run the example as a device runs it, its panel drawing on the
framebuffer. They are tests of the layer, not products, and their recipes are the worked examples of
everything above.
| Image | Host recipe | What it shows |
|---|---|---|
yoke-example-image | yoke-example-host | the application form: an account that lingers, its guardian's unit enabled, a first boot that installs the example and creates its instance running |
yoke-example-service-image | yoke-example-service | the service form: the example's Plugin and panel where the form reads them, the composition installed and linked, yoke.service enabled and started by the init system |