Skip to main content
Version: 0.15.1

The layer

Yoke reaches an embedded Linux image through a Yocto Project layer, meta-yoke, which builds what Yoke released into the packages an image installs. This page is for an integrator who adds the layer to a build of their own; building an image with Yoke from the layer alone is a path of its own, on an embedded device. 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.

What the layer gives — recipes, packages, and where each goes

Taking the layer​

repositoryhttps://github.com/yoke-project/meta-yoke
branchmain — the one branch, for the Yocto Project's newest long-term series, wrynose, and no other
depends oncore; openembedded-layer and meta-python, both in meta-openembedded
licenceMIT

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>
conf/bblayers.conf
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.

PackageHoldsGoes on
yoke-corethe Corea device
yokethe manager; it depends on yoke-corea device
yoke-guardianthe guardian, for the application forma device that runs applications under an account
yoke-auththe program the Core asks the host's authentication service througha device whose channels require a caller to sign in
yoke-packagingwhat the init system is given, belowa device
yoke-composethe composera workstation, never a device
yoke-conformancethe conformance suitea workstation, never a device
python3-yoke-proto, python3-yoke-sdkthe Python family, for a unit written in Pythona device that runs one
the C, C++ and Rust families' development packagesthe libraries, headers and build configuration a program is built againstthe build, not the device: the program carries them
yoke-sdk-gothe Go family's harnesses; a Go program compiles the library ina workstation
yoke-reference-*the example application's units that run on the host, and the example as a device runs itan 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.

FileFor
/usr/lib/systemd/system/yoke.servicethe service form: the one deployment the init system runs, with yoke service exec
/usr/lib/systemd/user/yoke-guardian.servicethe application form: a user unit running yoke-guardian --boot for the account it is enabled for
/usr/lib/tmpfiles.d/yoke.confthe service form's directories, with their owners and modes
/usr/lib/sysusers.d/yoke.confthe group yoke-apps, whose members may install applications
/etc/yoke/core.yamlthe Core's configuration in the service form, kept across upgrades

Neither unit is enabled by installing the package.

  • In the service form, yoke.service starts 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.service is 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.

FilePut there by
/etc/yoke/plugins.d/<plugin>/manifest.yamlthe 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>.yamlthe image's host recipe, as the administrator: the composition document — the units, the channels, and the site's values written in
/etc/yoke/deployment.yamlthe host recipe: a link to the composition in force
yoke.service enabledthe 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 four images of its own on every change, under QEMU, on qemux86-64 and qemuarm64: Yoke alone in each form, and the example in each form, its panel drawing on the framebuffer. They are tests of the layer and starting points, not products — root signs in on the console with no password — and their recipes are the worked examples of everything above.

ImageHost recipeWhat it shows
yoke-imageyoke-hostYoke alone in the application form: an account, apps, that may install applications, lingers and has its guardian's unit enabled; no application installed
yoke-service-image—Yoke alone in the service form: the runtime and the inputs, yoke.service left disabled until a deployment is put in place
yoke-example-imageyoke-example-hostthe example in 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-imageyoke-example-servicethe example in the service form: its Plugin and panel where the form reads them, the composition installed and linked, yoke.service enabled and started by the init system

The build they are tested in is written as kas files under the layer's kas/: the layers it needs at their commits, a file per machine and a file per form. They are what on an embedded device runs; a build of your own does not need them.