56 lines
2.5 KiB
Markdown
56 lines
2.5 KiB
Markdown
# standalone — single files for a machine the full rig is not going to
|
|
|
|
Each script here does one of rig's jobs without the rest of the tree. Copy one
|
|
file onto a machine, run it, read the output. Nothing to clone, nothing to
|
|
install first.
|
|
|
|
| file | does | full-rig equivalent |
|
|
| --- | --- | --- |
|
|
| `rigdeps.sh` | installs kind, kubectl, tilt, ctlptl, jq and docker compose at rig's pins, checksum-verified, no sudo | `make deps` (`ctrl/deps.sh`) |
|
|
| `rigmini.sh` | reports how much memory the machine *advertises* and what caps it; `push` measures what it will actually *survive* | `make mem`, and the memory section of `make check` |
|
|
|
|
**These are transitional.** Where the full rig is installed, use its own
|
|
targets instead; they read `ctrl/versions.env` and the profile, which these
|
|
cannot.
|
|
|
|
## Why single files
|
|
|
|
`rigdeps.sh` carries its pins inline, because `ctrl/versions.env` is not on the
|
|
machine it is for. That makes two copies of the same versions and checksums.
|
|
`make pins` compares them and fails on any difference — `ctrl/versions.env` is
|
|
the source of truth.
|
|
|
|
`rigmini.sh` exists because on a container or managed workspace `/proc/meminfo`
|
|
reports the *host's* memory while a cgroup cap kills processes at a fraction of
|
|
it. `status` reads the caps; `push` allocates until something stops it.
|
|
|
|
## Use
|
|
|
|
**These two files are the whole setup.** No folder to create, no PATH to edit by
|
|
hand, nothing else to download first. The toolchain goes into `~/.local/bin`,
|
|
which Ubuntu already puts on PATH at login once the directory exists — so a new
|
|
shell after `install` is all it takes. If it is not on PATH, `install` says so
|
|
and prints the one line to add.
|
|
|
|
```bash
|
|
bash rigdeps.sh detect # report, change nothing
|
|
bash rigdeps.sh install dev # install into ~/.local/bin
|
|
bash rigmini.sh status # advertised memory and caps; safe
|
|
bash rigmini.sh push # allocates until it stops — not on a machine you need
|
|
```
|
|
|
|
If an earlier setup already put these tools in some other directory on PATH,
|
|
remove that directory and the line that added it — do not rely on `install` to
|
|
notice. It only reports shadowing once `~/.local/bin` is itself on PATH, which on
|
|
a fresh machine it is not until the next login. After a new shell, check which
|
|
copy wins:
|
|
|
|
```bash
|
|
command -v kind kubectl tilt # each should be ~/.local/bin/...
|
|
```
|
|
|
|
One toolchain, in the one place everyone else will also look.
|
|
|
|
`rigmini.sh push` deliberately consumes memory. Run `status` first, and only run
|
|
`push` somewhere it is acceptable for other processes to be squeezed.
|