Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Commands

sandcastle [--config DIR] [--secrets DIR] [--prefix NAME] <command>
CommandWhat it does
install [--link RANGE] [--egress RANGE]checks the configuration and the machine, builds the four images, copies the binary to ~/.local/bin/sandcastle, writes the units, turns lingering on, starts sandcastle.target and runs check. See Install
uninstallstops everything and removes the units, the images and the two networks; the configuration, the secrets, the jobs and the binary stay. See Uninstall
checkasks the keep, checks the configuration, the units, the networks and the images, pings every source and tests every capability. See Check messages
runpolls every source at its own interval until it is stopped. The core’s service runs it
oncepolls every source a single time, runs what it gets, and ends
secret set <name>reads a secret from stdin, without echo at a terminal, and keeps it. See Manage secrets
secret listlists the secrets by name: used, unused or missing
secret rm <name>deletes a secret
versionprints the build of this binary and the commit it came from

run, once and check need the keep. run and once wait for it, asking again every 5 seconds, before they ask for any job.

Flags

FlagDefaultWhat it sets
--config DIR$SANDCASTLE_CONFIG, or ~/.config/sandcastlethe configuration folder
--secrets DIR~/.local/share/sandcastle/secretsthe secrets folder
--prefix NAMEsandcastlethe first word of every name of the installation: units, images, networks, the keep’s socket
--link RANGEsee Rangesinstall only: the range of the network between the keep and the gate
--egress RANGEsee Rangesinstall only: the range of the gate’s way out

Exit codes

CodeMeans
0done; for check, no line is FAIL
1it failed, and said why on stderr; for check, a line is FAIL
2the command or its arguments were wrong; the usage is printed

Started by sandcastle itself

These run inside the installation. You do not start them.

CommandWhat it is
box <capability>one job’s box, speaking JSON lines on stdin and stdout
keep [GATE]the keep, listening on $XDG_RUNTIME_DIR/sandcastle-keep/keep.sock and sending out through the gate at GATE
prepare-gate LINK EGRESS OUTthe gate’s preparation: writes its files to OUT and creates its egress network