User Guide
Command reference. For a hands-on path, use First Steps (Requirements → Prepare → Demo), or start on a queue host at Prepare the machine, then First job.
Full flag lists: julia --project=. -m DistSSHKit {cmd} --help. Each command page starts with Flags for that command.
Prepare hosts
Shared by a job you start here and a job you leave on a queue host.
- setup: check hosts, clone / rsync / sync, instantiate, prune, cleanup
- up: the same Julia channel on each machine
This machine
Start a job here. The SSH connection stays open until it finishes. The machine the run starts from is this machine.
- go: standalone script as-is; one full run per slot (
--repeat N= N runs, spread across listed hosts) - ride: experimental auto-split of map / filter (parent or SSH workers)
- drive: master + Distributed workers; driver farms work
- plan: inspect a script; suggest go / ride / drive (does not run)
- size: estimate worker counts from RAM / CPU
- pool: cluster cores / health; no job
- paths:
stored_path/ content-hash cache /push_cache! - demo: install or list bundled example scripts
progress has no page of its own. julia -m DistSSHKit progress DIR reprints the last phase seconds from a job you started here.
Always-on machine
A queue host is an always-on machine. Leave jobs there. They run one at a time. The machine the run starts from is the queue host.
- How it runs
- Artifacts and paths
- submit: leave
go/ride/drivethere - status
- fetch
- hosts
- serve
- setup
go vs drive (pick one)
Both share host tokens (parent:N, child:NAME:N) and optional --sync / --rsync. The difference is what the script is:
- Script: go is ordinary
.jl(the job file does not call DistSSHKit). Drive is a driver withinit_output_dir!/main. child:NAME:N: go is N concurrent full script runs. Omit:Nonly with--repeat(uncapped). Drive is N Distributed workers; omit:Nis an error. Estimate withsize.- Collect: go is slot-overwrite after remotes. Drive is post-run-new after
main(); optional collect-only flags. - Success: go requires every listed slot to run (
ok=falseif one does not). Drive requires listedparent/childto join, stay, and collect (default).--best-effortallows a partial run. - Git parity: go has no
--require-git. Drive has opt-in--require-git. --output-dir: go is batch root (PATH/{slot}/). Drive is result root (DISTRIBUTED_OUTPUT_DIR).
If you want “run this job on a few machines,” start with go. If you want one master farming work with pmap (and friends), use drive.
Flag consistency (read once)
Same names are shared on purpose; a few meanings differ by command:
--sync/--rsync: same git vs rsync idea onsetup(mode) andgo/drive(optional pre-run). On each command, pick at most one.go/drive --rsyncinstantiates if deps are missing.- Default pre-run sync:
goanddrive: none (runsetupyourself, or pass--sync/--rsync). - Git parity (drive): off by default. Opt-in:
--require-git. Compat:--skip-git-guard(no-op; may combine with--sync/--rsync). - Host reliability (drive): on by default (
--require-all-hosts). Opt out:--best-effort/DISTSSHKIT_BEST_EFFORT. - Skip pre-run (go): compat
--skip-sync/--skip-git-guard(already the default; exclusive with--sync/--rsyncon go). --output-dir:gois batch root (PATH/{slot}/).driveis result root (DISTRIBUTED_OUTPUT_DIR). Different on purpose.--hosts: CSV tokens.setup/size/poolstrip:Nfromparent/child:NAME[:N].go/ride/driverequire:Non listed tokens.--hosts-file: same as--hostsfor that command.- Shared flags:
-q/--quiet,--progress,--verbose,-y/--yes,--hosts,--hosts-file,-v/--version— same on setup / go / drive / size / pool.
Shared concepts
Hosts. Sources, in the order they append after positional tokens:
- CLI tokens:
setup/size/poolmay omit:N;go/ride/driveneedparent:N/child:NAME:N --hosts(CSV)DISTSSHKIT_HOSTS(comma-separated)--hosts-file(default path fromDISTSSHKIT_HOSTS_FILE)
setup / size / pool strip :N and use host names only. Bare SSH names are not accepted on setup (use child:NAME). On setup, parent / parent:N are only for up; other modes take child:NAME only.
Jobs. DISTSSHKIT_JOBS (default 1) is the max concurrent SSH host jobs for setup --rsync, drive post-run collect, and size Julia detection. Worker addprocs stays sequential.
Quiet / progress.
- Default:
--progress(live status) on a TTY; full detail when piped orNO_COLOR -qhides terminal detail;--verboseforces full detail — at most one (DISTSSHKIT_QUIET/DISTSSHKIT_PROGRESS/DISTSSHKIT_VERBOSE)- Slot logs still write regardless; fatals stay on the terminal
- Confirm prompts always print (
-y/DISTSSHKIT_YESskips them).setup --delete,setup --prune, andteardownignore that skip and need--confirm-path
Stale workers.
- Local
driveworkers are torn down withrmprocs, not a patternpkill drivedoes notpkill -f julia --workeron remotes. Withjob_id/DISTSSHKIT_JOB_IDitpkills argvdistsshkit-job:<id>. Skip that leftover pkill withDISTSSHKIT_SKIP_GLOBAL_WORKER_PKILL=1;rmprocsstill runssetup --pruneremoves.distsshkit/{go,drive,setup,runs}leaves (not the deploy).--cleanupkills stale workers (untaggedjulia --worker/--bind-toon localhost and remotes; other Distributed jobs on the same login can match).--deleteremoves the remote project tree- Detached
execute!(…; job_id=)is a different contract:pkillonly argv containingdistsshkit-job:<id>(terminate!). Go slots-La no-op file of that name so the script still runs; drive workers get--eval=#distsshkit-job:<id>
Files on disk. Setup logs: {project}/.distsshkit/setup/ (or the current run dir when DISTSSHKIT_RUN_DIR is set). Artifacts: go {script}/.distsshkit/go/{stem}_{UTC}/; drive (no --output-dir and no init_output_dir!): {script}/.distsshkit/drive/{stem}_{UTC}/. Sidecars (run.toml, pid, stdio): {script}/.distsshkit/runs/<kind>/{stem}_{UTC}/ (if that tree is not writable: {project}/.distsshkit/runs/…, then tempdir()/distsshkit-runs/…). Add .distsshkit/ to the job project's .gitignore — DistSSHKit's own repo already ignores it, but Pkg.add does not. Otherwise go/drive output can show up as untracked files, including under drive --require-git.
Collect modes:
| Mode | Where |
|---|---|
| slot-overwrite | go after each remote slot (whole slot dir) |
| post-run-new | drive after main() (newer than run-start sentinel) |
| collect-missing | drive --collect-missing / collect!(merge=false) |
| collect-overwrite | drive --collect-overwrite / collect!(merge=true) |