Documentation
¶
Overview ¶
Package host checks and sets up an agent host for VM workspaces (P1 §7, design/workstreams/agent/LLD/workspace-host.md). For the tart driver the steps are the platform, the state dir, Tart, Softnet, the pf anchor, the base VM and the warm base; for the kata driver (workspace-kata.md) the platform, the state dir, nerdctl-full, Kata, its config, the factory's containerd, the workspace network, the root helper, the workspace image and the warm disk. Check reports each step's state; Init applies the steps that aren't ok, in order, and runs their root actions in one sudo script.
Index ¶
- Constants
- Variables
- func AllOK(sts []Status) bool
- func BuildkitUnit() string
- func BuildkitdConfig() string
- func ContainerdConfig() string
- func ContainerdUnit() string
- func Extract(src, dir string) error
- func Interrupted(ctx context.Context, err error) error
- func LockSupervise(e *Env) (func(), error)
- func NFTRules(gatewayPort int) string
- func NFTUnit() string
- func PFPlist(anchor, conf string) string
- func PFRules(gatewayPort int) string
- func ProvisionScriptSHA256() string
- func RemovePF(ctx context.Context, e *Env, dryRun bool) error
- func RemovePFScript(e *Env) string
- func RenderKataConfig(src []byte, version string) (string, error)
- func Script(lines []string) string
- func SudoersRule(owner string) string
- type BaseVMRecord
- type Env
- func (e *Env) BaseVMName() string
- func (e *Env) Defaults() error
- func (e *Env) KataBaseRecordPath() string
- func (e *Env) KataImage() string
- func (e *Env) KataWarmRecordPath() string
- func (e *Env) MemTotal() (uint64, error)
- func (e *Env) ReadKataBase() (KataBaseRecord, error)
- func (e *Env) StateDir() string
- func (e *Env) TartBin(ctx context.Context) string
- type ExecRunner
- func (r ExecRunner) Run(ctx context.Context, out io.Writer, name string, args ...string) error
- func (r ExecRunner) RunInput(ctx context.Context, in io.Reader, out io.Writer, name string, args ...string) error
- func (ExecRunner) Start(_ context.Context, out io.Writer, name string, args ...string) (Process, error)
- type Fetcher
- type HTTPFetcher
- type HelperRequiredError
- type InitOptions
- type InterruptedError
- type KataBaseRecord
- type KataWarmRecord
- type LockedWriter
- type Pins
- type Plan
- type Process
- type Runner
- type Spawner
- type State
- type Status
- type Step
- type VMTimings
- type WarmBaseRecord
Constants ¶
const ( PFAnchorName = "com.compliance-framework.factory" PFAnchorPath = "/etc/pf.anchors/" + PFAnchorName PFLabel = PFAnchorName + ".pf" PFPlistPath = "/Library/LaunchDaemons/" + PFLabel + ".plist" PFConfPath = "/etc/pf.conf" PFConfBackup = PFConfPath + ".factory-backup" )
The pf anchor's names and paths (P1 §3: Softnet's @host lets a VM reach every port on the Mac's bridge address, so the anchor allows only the gateway port).
const ( // TartVersion is the pinned Tart: https://github.com/cirruslabs/tart/releases/tag/2.41.1. TartVersion = "2.41.1" TartURL = "https://github.com/cirruslabs/tart/releases/download/" + TartVersion + "/tart.tar.gz" // TartSHA256 is the sha256 of tart.tar.gz: `shasum -a 256` of the release asset, recorded // when the pin was set (P1 phase 2a). TartSHA256 = "e680a734febccfce7d4e910c1f7f13fc3b00f19a181c945e2d746de3214c32c2" // TartTeamID is Cirrus Labs' Developer ID team: `codesign -dv` of the notarized tart.app // reports it as TeamIdentifier. TartTeamID = "9M2P8L4D89" // SoftnetVersion is the pinned Softnet: https://github.com/cirruslabs/softnet/releases/tag/0.24.1. SoftnetVersion = "0.24.1" SoftnetURL = "https://github.com/cirruslabs/softnet/releases/download/" + SoftnetVersion + "/softnet.tar.gz" // SoftnetSHA256 is the sha256 of softnet.tar.gz: `shasum -a 256` of the release asset, // recorded when the pin was set (P1 phase 2a). SoftnetSHA256 = "8ff8ff099c2b5ac1b1128e7999c4a730ac85f486c8a4cb0239eb98432859a0f7" // SoftnetBinarySHA256 is the sha256 of the softnet binary in that tarball (it matches the // 0.24.1 binary installed by hand in P1 phase 0). Softnet isn't code-signed, so the two // checksums are its only verification. SoftnetBinarySHA256 = "e5e35d61a6dd7e35a3134732e766c897b7cb6f097080ff00e1e75adeab0471c7" // BaseImage is the image the base VM is cloned from: cirruslabs' Ubuntu 24.04, pinned by // its manifest digest (the one P1 phase 0 ran). Tart keeps it in its OCI cache, so a // rebuild downloads nothing. The tools the base adds are pinned in provision/base.sh. BaseImage = "ghcr.io/cirruslabs/ubuntu@sha256:51b493a05e4bc6f21c5c5052cffc1b26b5cea1d76847f5db10b97da90c16e58c" )
The pinned releases host init installs. Bump a pin by downloading the release on a trusted machine and recording the sha256 of what was downloaded (and, for Softnet, of the binary in it); never copy a checksum from the release page alone.
const ( // NerdctlVersion is the pinned nerdctl-full, containerd, nerdctl, BuildKit, runc and the CNI // plugins in one release: https://github.com/containerd/nerdctl/releases/tag/v2.4.1. NerdctlVersion = "2.4.1" NerdctlURL = "https://github.com/containerd/nerdctl/releases/download/v" + NerdctlVersion + "/nerdctl-full-" + NerdctlVersion + "-linux-amd64.tar.gz" // NerdctlSHA256 is the sha256 of nerdctl-full-2.4.1-linux-amd64.tar.gz: the asset's digest // in GitHub's releases API, which matches the release's SHA256SUMS. NerdctlSHA256 = "ff018f11ac2f1354bf7b3aaaca6e0b52d81139c746a89134744d0b7be3a0e62f" // NerdctlContainerdVersion is the containerd in that release (its notes: "Update containerd // (2.4.1)"); containerd --version reports it with a leading v. NerdctlContainerdVersion = "2.4.1" // KataVersion is the pinned Kata Containers static release (runtime-rs, Cloud Hypervisor, // the guest kernel and image): https://github.com/kata-containers/kata-containers/releases/tag/4.2.0, // the version phase 0 ran; 4.3.x was under two weeks old when pinned. KataVersion = "4.2.0" KataURL = "https://github.com/kata-containers/kata-containers/releases/download/" + KataVersion + "/kata-static-" + KataVersion + "-amd64.tar.zst" // KataSHA256 is the sha256 of kata-static-4.2.0-amd64.tar.zst (about 950 MiB): the asset's // digest in GitHub's releases API. KataSHA256 = "b828904fa3f1e49ddd7dc799c72cb1503cd1e772d354c3987c8d4189b2a623a8" )
The kata driver's pins (workspace-kata.md#steps-kata-driver), the releases P1 phase 9's Q8 dry run installed on the Linux workstation.
const ( // BaseVMPrefix names the base VM, followed by factory-agent's version. The names avoid // factory-ws-base, factory-ws-warm, factory-agent-host, ws-* and ws-gw: P1 phase 0's VMs, // which host init never touches. BaseVMPrefix = "factory-agent-base-" // WarmBaseVM is the warm base's name. WarmBaseVM = "factory-agent-warm" // AgentLinuxName is the linux/arm64 factory-agent's default file name, next to the running // binary (make tart-up builds both). AgentLinuxName = "factory-agent-linux-arm64" // KindImagesDir is where the warm base saves warm.kindImages, for kind load image-archive. KindImagesDir = "/var/lib/factory/kind-images" )
The VM steps' names, records and the files they use (P1 §2, workspace-host.md).
const ( // HeadroomGiB is the physical memory left to the host on top of its workspaces: macOS's // on a Mac, and on Linux the share supervise's concurrency cap keeps back. HeadroomGiB = 4 )
const (
// KataConfigPath is the Kata config: runtime-rs reads only its built-in paths, this the first.
KataConfigPath = "/etc/kata-containers/runtime-rs/configuration.toml"
)
const KataWarmBuild = "ws-tsk_factory-warm-build"
KataWarmBuild is the warm step's build workspace. supervise's orphan cleanup leaves it alone: host init holds host.lock while it exists, and removes it on every exit path but --keep-failed.
const KataWarmStep = "katawarm"
KataWarmStep is the warm step's name: supervise gives the kata driver the warm disk when host check reports it ok.
const MaxArchive = 512 << 20
MaxArchive bounds what Extract extracts.
const MaxDownload = 2 << 30
MaxDownload bounds a download: Kata's static release is about 950 MiB. Every download is sha256-pinned; the bound only keeps a wrong server from filling the disk.
const SoftnetPath = "/usr/local/libexec/factory-agent/softnet"
SoftnetPath is where host init installs Softnet; the tart driver runs Tart with its directory on PATH.
const SudoersPath = "/etc/sudoers.d/factory-agent"
SudoersPath is the rule that lets the owner run the helper with sudo -n.
Variables ¶
var ErrHostLocked = errors.New("another factory-agent host init is running")
ErrHostLocked is Init's error while another host init holds the state dir's lock.
var ErrSuperviseLocked = errors.New("another factory-agent supervise is running")
ErrSuperviseLocked is LockSupervise's error while another supervise holds the lock.
var KataSlotPool = katahelper.SlotPool
KataSlotPool is the kata driver's workspace addresses, the helper's katahelper.SlotPool. The platform step refuses a host that already routes any of it.
Functions ¶
func BuildkitUnit ¶
func BuildkitUnit() string
BuildkitUnit runs the factory's buildkitd, with the factory's containerd as its only worker.
func BuildkitdConfig ¶
func BuildkitdConfig() string
BuildkitdConfig is buildkitd's config. Its unit passes every setting but the build steps' resolver option as a flag; the file is there so buildkitd reads it (--config) and never /etc/buildkit/buildkitd.toml, another BuildKit's. [dns] sets only options: buildkitd keeps the host's nameservers and search domains in the resolv.conf it writes for host-network steps.
func ContainerdConfig ¶
func ContainerdConfig() string
ContainerdConfig is the factory's containerd's config: its own root, state, sockets and opt dir, apart from Docker's containerd, without CRI or NRI.
func ContainerdUnit ¶
func ContainerdUnit() string
ContainerdUnit runs the factory's containerd. KillMode=process, as containerd's own unit: the shims and their VMs outlive a restart. PATH puts Kata's runtime-rs shim first.
func Extract ¶
Extract unpacks the .tar.gz at src into dir, which must exist. It refuses absolute paths, .. entries, symlinks that point outside dir, entries under a symlink the archive made (so a chain of symlinks can't point outside either), entries other than files, dirs and symlinks, and more than MaxArchive bytes in all; once extracted, every symlink must resolve inside dir. Writes go through an os.Root, so nothing lands outside dir. Modes keep only the 0755 bits.
func Interrupted ¶
Interrupted is err (nil: none) after ctx ended: an *InterruptedError with ctx's cause.
func LockSupervise ¶
LockSupervise takes an exclusive, non-blocking flock on <statedir>/supervise.lock, whose dir must exist; ErrSuperviseLocked while another supervise holds it. The returned func releases it, as does the process ending.
func NFTRules ¶
NFTRules is the workspace firewall (workspace-kata.md#the-workspace-network), for the gateway port. From a workspace bridge (fws<n>) only TCP to the gateway port passes, and only from that bridge's VM address to its gateway address (the set elements the helper adds); DNS is rejected so lookups fail at once; nothing is forwarded to or from a workspace. Its first two lines make loading it again replace the table, which also empties the set.
func NFTUnit ¶
func NFTUnit() string
NFTUnit loads the firewall at boot, before the factory's containerd, which requires it: no workspace starts without the rules. It has no ExecStop: stopping it leaves the rules, since the VMs outlive containerd.
func ProvisionScriptSHA256 ¶
func ProvisionScriptSHA256() string
ProvisionScriptSHA256 is the embedded provisioning script's sha256: basevm.json's scriptSHA256.
func RemovePFScript ¶
RemovePFScript undoes the pf step: unloads the LaunchDaemon, removes it and the anchor, flushes the anchor's rules, deletes the anchor line from pf.conf (keeping any other edit) and reloads it. The backup goes only when pf.conf is back to it. pf itself stays enabled until the next boot.
func RenderKataConfig ¶
RenderKataConfig is the Kata config: the release's runtime-rs Cloud Hypervisor config src with reconnect_timeout_ms raised to 60000, after a first comment line. It is what the root lines' sed renders, byte for byte; src without a reconnect_timeout_ms line is an error.
func SudoersRule ¶
SudoersRule lets owner run the helper as root without a password, with any arguments: the helper validates them.
Types ¶
type BaseVMRecord ¶
type BaseVMRecord struct {
Name string `json:"name"`
Source string `json:"source"`
ScriptSHA256 string `json:"scriptSHA256"`
AgentSHA256 string `json:"agentSHA256"`
AgentVersion string `json:"agentVersion"`
BuiltAt string `json:"builtAt"`
}
BaseVMRecord is <statedir>/basevm.json: what the base VM was built from.
type Env ¶
type Env struct {
Workspace config.Workspace
Pins Pins
Runner Runner
// Spawner runs tart run in the background and tart exec -i with a stdin.
Spawner Spawner
Fetcher Fetcher
// Root prefixes the system paths (/usr/local, /etc, /Library, /dev, /proc, /sys, /run);
// "" in production.
Root string
// Home is the owner's home: the state dir is under it.
Home string
// Getenv reads an environment variable (XDG_STATE_HOME, for the state dir on linux);
// default os.Getenv.
Getenv func(string) string
// StageDir holds the files the root lines install. Init makes a temp dir when it's "".
StageDir string
GOOS, GOARCH string
// UID is the owner's user id (the state dir's owner).
UID func() int
// Owner reads a file's owner; ok is false when the platform has none.
Owner func(fs.FileInfo) (uid, gid int, ok bool)
// LookPath finds a program on PATH.
LookPath func(string) (string, error)
// Prompt asks a y/N question; Init asks it before the pf and privileges steps unless --yes.
Prompt func(question string) (bool, error)
// Executable is the running factory-agent, which the privileges step installs as the kata
// helper; default os.Executable().
Executable string
// Username is the user running host init, the owner the kata helper's sudoers rule names;
// default os/user's current user.
Username func() (string, error)
// Clock dates the pf opt-out and the VM records' builtAt.
Clock clock.Clock
// AgentVersion names the base VM (factory-agent-base-<version>); default version.Version.
AgentVersion string
// AgentLinux is the linux/arm64 factory-agent the base VM gets; default
// factory-agent-linux-arm64 next to the running binary.
AgentLinux string
// KeepFailed keeps a VM build's .building VM when the build fails, for debugging.
KeepFailed bool
// VM is the VM builds' timeouts and poll interval.
VM VMTimings
// Out gets the plan and the progress.
Out io.Writer
Log *slog.Logger
}
Env is what the steps run against. Every field but Workspace has a production default (see Defaults), so tests replace the commands, the network and the file system root.
func (*Env) BaseVMName ¶
BaseVMName is the base VM's name for this factory-agent: factory-agent-base-0.1.0, or factory-agent-base-dev for a dev build.
func (*Env) KataBaseRecordPath ¶
KataBaseRecordPath is katabase.json, which supervise reads the image from.
func (*Env) KataImage ¶
KataImage is this factory-agent's workspace image: factory-agent-base:<version>, the version as BaseVMName has it (no leading v, [^A-Za-z0-9._-] as _).
func (*Env) KataWarmRecordPath ¶
KataWarmRecordPath is katawarm.json.
func (*Env) MemTotal ¶
MemTotal is the Linux host's physical memory in bytes (/proc/meminfo): supervise caps kata's concurrency by it.
func (*Env) ReadKataBase ¶
func (e *Env) ReadKataBase() (KataBaseRecord, error)
ReadKataBase reads katabase.json: the image supervise's kata driver creates workspaces from.
func (*Env) StateDir ¶
StateDir is the agent's state dir (P1 §7), per OS: ~/Library/Application Support/factory-agent on darwin; elsewhere $XDG_STATE_HOME/factory-agent when XDG_STATE_HOME is an absolute path (the XDG spec ignores a relative one), else ~/.local/state/factory-agent (workspace-kata.md). An unset GOOS or Getenv is the running system's, so an Env with only Home has the owner's.
type ExecRunner ¶
type ExecRunner struct {
// SudoGrace is how long a cancelled sudo call gets after SIGTERM before SIGKILL. Default:
// sudocancel.HelperGrace, for the root script too: its lines are local (an archive's
// extraction, install, systemctl) and sh ends on SIGTERM, so 30 s is plenty, and at its
// password prompt sudo ends at once, restoring the terminal's echo.
SudoGrace time.Duration
}
ExecRunner runs real programs. When ctx ends, a command gets SIGKILL, but for a sudo call (the kata helper's verbs, the root script): see onCancel.
type HTTPFetcher ¶
HTTPFetcher downloads with an http.Client (default http.DefaultClient).
type HelperRequiredError ¶
type HelperRequiredError struct {
// Steps are the selected helper steps that aren't ok, in order.
Steps []string
// Privileges is the privileges step's status.
Privileges Status
}
HelperRequiredError is Init's error when --only selects steps that run the helper while the privileges step, which installs it, isn't ok and isn't selected: their sudo -n calls could only fail, so Init changes nothing.
func (*HelperRequiredError) Error ¶
func (e *HelperRequiredError) Error() string
type InitOptions ¶
type InitOptions struct {
DryRun bool
// Yes applies the pf and privileges steps without asking.
Yes bool
// NoPF skips the pf step and records the opt-out in the state dir.
NoPF bool
// Only, when set, names the steps to apply; the others are checked but not applied.
Only []string
}
InitOptions are host init's flags.
type InterruptedError ¶
type InterruptedError struct {
Err, Cause error
}
InterruptedError is an operation's error after an interrupt ended its context. Its text says so once ("interrupted", or "interrupted: " and Err's), and it wraps the context's cause as well as Err, so errors.Is(err, context.Canceled) holds.
func (*InterruptedError) Error ¶
func (e *InterruptedError) Error() string
func (*InterruptedError) Unwrap ¶
func (e *InterruptedError) Unwrap() []error
type KataBaseRecord ¶
type KataBaseRecord struct {
Image string `json:"image"`
// ContextSHA256 is the build context's (provision.KataContextSHA256): a change to any of
// its files rebuilds the image under the same tag.
ContextSHA256 string `json:"contextSHA256"`
BuiltAt string `json:"builtAt"`
}
KataBaseRecord is <statedir>/katabase.json: the workspace image host init built.
type KataWarmRecord ¶
type KataWarmRecord struct {
Image string `json:"image"`
// ImageBuiltAt is the image's builtAt: an image rebuilt under the same tag rebuilds the warm
// disk too.
ImageBuiltAt string `json:"imageBuiltAt"`
// ImagesSHA256 is workspace.warm's hash, as warmbase.json's.
ImagesSHA256 string `json:"imagesSHA256"`
// DiskGiB is workspace.size.disk when it was built: every warm workspace's disk is a copy
// of the warm disk, so a new size rebuilds it.
DiskGiB int `json:"diskGiB"`
BuiltAt string `json:"builtAt"`
}
KataWarmRecord is <statedir>/katawarm.json: what the warm disk was built from.
type LockedWriter ¶
LockedWriter serialises writes to W: tart run's output arrives from its own goroutines (here and in the tart workspace driver, where every VM's goes to one log).
type Pins ¶
type Pins struct {
TartVersion, TartURL, TartSHA256, TartTeamID string
SoftnetURL, SoftnetSHA256, SoftnetBinarySHA256 string
BaseImage string
// The kata driver's.
NerdctlVersion, NerdctlURL, NerdctlSHA256, NerdctlContainerdVersion string
KataVersion, KataURL, KataSHA256 string
}
Pins are the releases a host init installs; tests replace them with fakes.
type Plan ¶
type Plan struct {
// Do lists the unprivileged actions, one line each (printed by --dry-run).
Do []string
// Root are the shell lines that need root. Init batches every step's lines into one sudo
// script, run after the Apply of the last step that has some.
Root []string
}
Plan says what a step's Apply does.
type Process ¶
type Process interface {
// Exited is closed once the process has exited.
Exited() <-chan struct{}
// Err is how it exited (nil for status 0); valid once Exited is closed.
Err() error
// Stop ends the process's group (SIGTERM, then SIGKILL after stopGrace) and waits for it.
// Stopping an exited process does nothing.
Stop()
}
Process is a started command.
type Runner ¶
type Runner interface {
Run(ctx context.Context, out io.Writer, name string, args ...string) error
}
Runner runs a command; out gets its stdout and stderr.
type Spawner ¶
type Spawner interface {
// RunInput runs a command with in as its stdin; out gets its stdout and stderr.
RunInput(ctx context.Context, in io.Reader, out io.Writer, name string, args ...string) error
// Start starts a command in its own process group and returns without waiting for it.
Start(ctx context.Context, out io.Writer, name string, args ...string) (Process, error)
}
Spawner runs the commands a VM build needs besides Runner's: one fed on stdin, and one left running in the background (tart run).
type State ¶
type State string
State is a step's state.
const ( StateOK State = "ok" StateMissing State = "missing" StateOutdated State = "outdated" StateWrong State = "wrong" // StateSkipped is a step the owner opted out of (host init --no-pf): AllOK counts it as // ok, and host check prints a warning. StateSkipped State = "skipped" )
The states a Check reports.
type Status ¶
type Status struct {
Step string `json:"step"`
State State `json:"state"`
Detail string `json:"detail,omitempty"`
}
Status is one step's state, with what was found.
func Check ¶
Check runs every step's Check. A step whose check fails is reported wrong, with the error.
func Init ¶
Init applies the steps that aren't ok, in order (only those in o.Only, when set), runs the root lines in one sudo script after the last step that has some, and checks again. It returns the final check (the first one with DryRun, which changes nothing), also when an Apply or the sudo script fails. A failed platform check stops it before anything changes. A pf step skipped (--no-pf, or the prompt declined) is recorded as an opt-out in the state dir; one that's installed removes it. The kata driver's privileges step is asked about the same way (unless o.Yes); declined, it's left out, and so are the steps that run the helper it installs (helperStep), each with a warning. Nothing records that decline: the next Init asks again, and the final check reports those steps as they are. An o.Only that selects a helper step that isn't ok but leaves out a privileges step that isn't ok fails at once, before any prompt, plan or apply (a *HelperRequiredError; with DryRun too), unless the platform check failed, which comes first. With o.Only, the statedir step is applied too when it isn't ok, since the applies need the dir. The applies hold <statedir>/host.lock: a second Init fails while one runs. When ctx ends during the first check (an interrupt), Init returns no statuses and an *InterruptedError at once, before any prompt, plan or apply. When it ends during the applies, the final check runs on a context of its own, bounded by finalCheckTimeout, so it reports the host as it is, and the error is an *InterruptedError.
type Step ¶
type Step interface {
Name() string
Check(ctx context.Context) (Status, error)
Plan(ctx context.Context) (Plan, error)
// Apply does the unprivileged part of the plan: downloads, verification, and the files the
// root lines install, staged in Env.StageDir.
Apply(ctx context.Context) error
}
Step is one piece of an agent host's setup (P1 §7).
type VMTimings ¶
type VMTimings struct {
// Boot is the wait for the VM's guest agent (tart exec true): default 3 minutes.
Boot time.Duration
// Provision bounds the provisioning script, and the warm base's image pulls: 30 minutes.
Provision time.Duration
// Shutdown is the wait for the VM to stop after shutdown, before tart stop: 2 minutes.
Shutdown time.Duration
// Poll is the interval between the waits' checks: 2 seconds.
Poll time.Duration
}
VMTimings bound a VM build's waits.
type WarmBaseRecord ¶
type WarmBaseRecord struct {
Base string `json:"base"`
// BaseBuiltAt is the base's builtAt: a base rebuilt under the same name rebuilds the warm
// base too.
BaseBuiltAt string `json:"baseBuiltAt"`
ImagesSHA256 string `json:"imagesSHA256"`
// AgentSHA256 is the linux factory-agent's sha256 in the warm base: the base's when it
// was cloned, then each binary the warm base got copied in.
AgentSHA256 string `json:"agentSHA256,omitempty"`
BuiltAt string `json:"builtAt"`
}
WarmBaseRecord is <statedir>/warmbase.json.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package provision holds the agent hosts' workspace bases: base.sh, the provisioning script the tart base VM runs (package host embeds it too), and the kata driver's image, whose build context is kata/ plus base.sh (design/workstreams/agent/LLD/workspace-kata.md, "The image").
|
Package provision holds the agent hosts' workspace bases: base.sh, the provisioning script the tart base VM runs (package host embeds it too), and the kata driver's image, whose build context is kata/ plus base.sh (design/workstreams/agent/LLD/workspace-kata.md, "The image"). |
|
katacontext
command
Command katacontext writes the kata image's build context (provision.WriteKataContext) to a directory and prints its contextSHA256, so a person (make kata-context) and CI build the same context factory-agent does: docker build <dir>.
|
Command katacontext writes the kata image's build context (provision.WriteKataContext) to a directory and prints its contextSHA256, so a person (make kata-context) and CI build the same context factory-agent does: docker build <dir>. |