Skip to main content

Module runner

Module runner 

Source
Expand description

Isoloom’s runner (design §3): the process of a container whose recipe runs services, generated per machine in POSIX sh and installed as the image’s entrypoint. The engine’s init (Compose’s init: true, a pod sharing its process namespace) is PID 1 and reaps what the runner leaves.

It runs the recipe’s start steps, links each daemon’s log files to the container’s output, then:

  • one daemon: execs it, dropping to its user, so the daemon is the container’s process;
  • several (or one and the machine’s command): starts each in recipe order, each line of its output prefixed <unit> | , then waits. SIGTERM or SIGINT goes to every daemon. When one exits, it stops the others and exits with that one’s status, and the engine restarts the container: a half-running machine never looks ready.

The machine’s command reaches it as its arguments (Compose’s command:, a pod’s args:).

Functions§

file
Machine c’s runner as a generated file, when its container runs process through it.
path
Where machine machine’s runner is generated, from the project folder.
script
Machine c’s runner, when its container runs process through it (one daemon, or several).