Skip to main content

Module container

Module container 

Source
Expand description

What every target that runs the machines as containers shares, whichever backend writes the files (Compose, Kubernetes) or builds the host they run on (a cloud VM, a local VM): the images Isoloom brings and the readiness probe here; the one-shot jobs and how a Compose project starts (jobs); the project files read into Compose’s environment (project_files); the size of the VM the containers run on (host); the containers’ side of a hybrid environment (hybrid). Pure functions over the spec and the plan.

Structs§

HostSize
The size of the VM the containers run on.
HybridContainers
The containers’ side of a hybrid environment.

Constants§

CHECK_IMAGE
The check runner: a small image with sh, curl and busybox nc.
PROBE_DIR
Where a machine sees that busybox (read-only).
PROBE_IMAGE
A static busybox Isoloom brings into every machine with services, so its probe needs nothing from the machine’s image (distroless and scratch images have no shell).
UTILITY_IMAGE
A small image with busybox ip, for the router, route sidecars and the stand-in.

Functions§

as_arguments
The shell commands making the words listing prints the positional parameters ("$@"), one argument each: a list known only at run time, handed to a command without splitting an unquoted expansion.
copied_from_project
Whether file f is copied in from Compose’s environment: a project file the spec gives an owner or a mode.
docker_net
The Docker network a hybrid environment’s container network is on the host: named after the environment.
exec_runner
The runner of a machine’s exec checks, in .isoloom/docker/checks/: piped into the machine (docker compose exec -T <machine> sh -s < exec-<machine>.sh).
host_environment
On a Docker host, in the project’s folder before docker compose up: each project file with an owner or a mode read into its variable, its last line breaks kept, as commands joined by && (ending with one). Nothing when there are none.
init_names
The one-shot jobs of a machine, in order: <machine>-init-<n>.
leaf_jobs
The one-shot jobs no running service waits for: those of machines nothing depends on. Compose’s up --wait fails when such a job exits, even with 0, so starters bring the rest up with --wait first, then run these attached, in order (see start_commands).
probe
A TCP probe for each service port but the dormant ones, run by Isoloom’s own busybox (see PROBE_IMAGE).
project_variables
The project files Compose reads from its own environment, as (variable, path in the project).
ready_test
Everything a machine’s readiness checks, as one line for Isoloom’s busybox sh: its ports (probe), then its own healthcheck (health; a page through busybox wget), grouped so its own || stays its own. Empty when there is neither.
start_commands
The shell command that starts a Compose project with compose (e.g. docker compose -f x): plain up -d --build --wait when no job is left over, else everything but the jobs up and waited for, then each job attached. jobs are the leaf jobs (leaf_jobs); the services to wait for are listed at run time (as_arguments).
variable
The variable of Compose’s own environment holding machine machine’s nth file, when it is a project file with an owner or a mode (ISOLOOM_FILE_WEB_1). Machine names are kebab-case, so two files never share one.