Hyper.Cfg.Tools (Hyper v0.1.0)

Copy Markdown View Source

Paths to every external binary Hyper runs, read from the [tools] table.

The privileged tools (firecracker, jailer, dmsetup, losetup, blockdev) are read only from /etc/hyper/config.toml — the file the setuid helper also parses, so node and helper can never disagree on a root-impacting path. The node-only tools (skopeo, mke2fs, umoci, suidhelper) run unprivileged, so /etc/hyper/config.exs may override them (e.g. a path from a secrets manager), then config.toml, then the default.

Summary

Functions

Firecracker binary. Required — raises if [tools] firecracker is unset.

Jailer binary. Required — raises if [tools] jailer is unset.

mke2fs binary (node tool). config.exs > config.toml > mke2fs on PATH.

skopeo binary (node tool). config.exs > config.toml > skopeo on PATH.

setuid device helper (node tool). config.exs > config.toml > install default.

umoci binary (node tool), or nil to let Hyper download a pinned release.

Functions

firecracker()

@spec firecracker() :: Path.t()

Firecracker binary. Required — raises if [tools] firecracker is unset.

firecracker_configured()

@spec firecracker_configured() :: {:ok, Path.t()} | :error

Non-raising firecracker/0.

jailer()

@spec jailer() :: Path.t()

Jailer binary. Required — raises if [tools] jailer is unset.

jailer_configured()

@spec jailer_configured() :: {:ok, Path.t()} | :error

Non-raising jailer/0.

mke2fs()

@spec mke2fs() :: String.t()

mke2fs binary (node tool). config.exs > config.toml > mke2fs on PATH.

skopeo()

@spec skopeo() :: String.t()

skopeo binary (node tool). config.exs > config.toml > skopeo on PATH.

suidhelper()

@spec suidhelper() :: String.t()

setuid device helper (node tool). config.exs > config.toml > install default.

umoci()

@spec umoci() :: String.t() | nil

umoci binary (node tool), or nil to let Hyper download a pinned release.