Skip to main content
Version: 0.14.0

Installing

yoke app install <package> decides everything it can before writing anything, and the first thing it writes is a record saying the installation is not finished.

#StepLeaves behind
1read the footer and verify it: the checksum, the signature against the policy, then arch, model and core against this hostnothing
2resolve the install root and check its propertiesnothing
3create <root>/<id>/ if absent, then <root>/<id>/<version>/ exclusivelythe version directory
4write install.yaml with state: incompletea version nothing will run
5unseal into a staging file in the version directory, where the package is sealedthe same
6recompute the payload's digest and compare it with the footer'sthe same
7expand the archive into bundle/, and remove the staging filea bundle, not yet trusted
8read the descriptor — the first time the application's own account is read — and run the gate over itthe same
9obtain every image the descriptor names, by digestimages in the engine's per-account store
10recompute the digest of every component the descriptor names, and comparethe same
11write state: completean installation
  • The Core this host will execute is the binary core names in the manager's configuration, and its version is read from the build information stamped into it, without executing it. A binary that states no version satisfies no range, and is refused at step 1, naming it. A Core built from the release's source archive states none — it is built outside a repository; one built from a checkout of the release's tag, or installed with go install github.com/yoke-project/yoke/cmd/yoke-core@<tag>, states the tag.
  • Step 8 is an early report, not the authority. The gate that decides whether an instance may start runs before every start; at install there is no instance, so the checks that read an instance's values or state are not among what it reports.
  • Step 10 reads the expected digests from the descriptor, never from a Plugin's own Manifest.
  • Nothing the package contains is executed. What has to happen at install happens at first start, in a unit that runs to completion, under supervision.

Obtaining images​

Obtaining images is part of installing. Each image the descriptor names is pulled by digest into the engine's per-account store, or loaded from an archive the package carries — so an install with no network is the same operation as one with a network.

  • A carried image is an OCI image archive at components/images/<algorithm>-<hex>.tar, named by the digest the descriptor pins. Where it is there, it is loaded and nothing is pulled.
  • It is the only part of an install that reports progress: per image, cumulatively — what is being obtained, how much has arrived, what was already present.
  • Each image obtained is tagged yoke/<id>/<unit>:<version> in the engine's store, once for each unit that runs it, so every image of a version carries a tag of its own. A unit is launched from the pinned digest, never the tag; the tag is what the reclaiming pass recognises.
  • Running the same command again obtains what is missing and nothing else. Nothing is recorded about a partial pull.
  • A loaded image must arrive with its digest: where the engine's store keeps none — Docker's classic store — the install is refused, image.undigested, naming the image and the store.
  • An engine that cannot be reached is a refusal where the descriptor names an image, naming the engine. A descriptor with no image needs no engine.

What it reports​

Already presentWhat happens
the same version, completenothing is done, and the manager says so
the same version, incompletethe remains are removed and the installation proceeds
another versionthe new one is installed beside it, and the manager says what it did not do: no instance runs it until its record is re-pointed

When it fails​

  • A refusal before step 3 leaves nothing behind.
  • A failure at or after step 3 leaves the version directory with an incomplete record. Nothing runs from it, yoke app list shows it, and yoke app prune removes it. A new version never overwrites an old one, so nothing that worked is damaged.
  • A refusal and a fault are reported as themselves. A signature that does not verify will not verify next time, and running again is not offered; a link that dropped while pulling is a fault, and running again is the remedy.