The guide: Proof scripts: checking the install guides on a test server
Reach is in development. Its packages are not published.
The proof scripts in the source's packaging/ folder run the steps of the install guides for the server and the Reach agent (the read-only program on each machine) against a test server over SSH. They need the private source and are for people building and checking Reach; you do not need them to install it.
Use a throwaway or dedicated test server. The scripts install and remove Reach packages and delete Reach's data, the reach-server user and (for the PostgreSQL check) a database and PostgreSQL itself. Each refuses to start (exit code 2) unless you pass --throwaway-machine and set REACH_THROWAWAY_MACHINE=yes. The end-to-end, upgrade and PostgreSQL scripts also refuse if anything of Reach (or PostgreSQL) is already there: a package, a data or configuration folder, the service account, or the SSH account's own ~/.local/state/reach-agent.
What you need#
- A Rocky Linux 9 or Ubuntu Server 24.04 LTS server,
x86_64oraarch64, with an SSH account that logs in by key and runssudowithout a password prompt (connect once by hand first so the host key is known). The scripts read/etc/os-releaseand use RPMs,dnfand SELinux on the RPM family, or.debpackages,apt-getand AppArmor on the Debian family; they stop on anything else. Relatives of the two targets (AlmaLinux, RHEL, Debian and others) are accepted but untried. - On your own machine: a source checkout with Go and
nfpm, and the packages built for the same version (packaging/build.shmakes the RPMs and the.debfiles together).
Run them#
<source>/packaging/build.sh --allow-dirty
export REACH_THROWAWAY_MACHINE=yes
<source>/packaging/test-e2e-in-vm.sh <version> --ssh <user>@<test-server> --throwaway-machine
<source>/packaging/test-upgrade-in-vm.sh <old-version> <new-version> --ssh <user>@<test-server> --throwaway-machine --allow-dirty
<source>/packaging/test-agent-service-in-vm.sh <version> --ssh <user>@<test-server> --throwaway-machine
<source>/packaging/test-rpm-in-vm.sh <version> --ssh <user>@<test-server> --throwaway-machine
<source>/packaging/tests/test-postgres-in-vm.sh --ssh <user>@<test-server> --throwaway-machineEvery script also takes --arch x86_64|aarch64 (default x86_64; it must match the server). Each works in a fresh temporary folder on the server and removes it at the end, with everything it installed. On your own machine, the upgrade and PostgreSQL scripts call build.sh, which empties and rebuilds dist/. Each prints PASS or FAIL for every step and exits non-zero if any fails. None prints a token, a password or the setup link.
What they prove#
test-e2e-in-vm.sh: the server guide's steps, from the checksum file to install, first start, the owner's sign-in, enrolling a machine, removal, reinstall over the kept data and purge.test-upgrade-in-vm.sh: an upgrade restarts the running server onto the new program and keeps the data and the enrolled machine. Both versions are built from the same source, so this proves how the upgrade behaves, not an upgrade from an earlier release.test-agent-service-in-vm.sh: the agent's service reports on its own, who runs what, pause and resume, and the Linux socket tests.test-rpm-in-vm.sh: the agent package alone: install, file owners and modes, a scan, removal.tests/test-postgres-in-vm.sh: the PostgreSQL steps of the server guide, including "start over while the package stays installed". It removes PostgreSQL at the end only if it can tell that it installed it; otherwise it leaves PostgreSQL installed and fails.
Where they have run#
Each install guide says near its top which of its steps were run, and where. On Ubuntu Server 24.04 the packages were installed and run following the install guides, in our own lab; the proof scripts have not yet been run there. So there is no automated proof of the Ubuntu guides. A run is not a long run: for the seven-day check of the agent service there is a separate sampler, packaging/tests/soak-linux.sh, started on the machine itself.