Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

r2lab-nightly

The code of the nightly service, in https://github.com/fit-r2lab/r2lab-nightly.

Python environment

This is a uv project, with its own .venv. rhubarbe is an editable dependency on /opt/rhubarbe (see pyproject.toml), so nightly always runs the very same rhubarbe code as the rhubarbe services, as maintained by r2lab-embedded/services/run-updates.sh. Do not use a git or pypi dependency for it: that would pin a separate copy that could diverge.

The units put .venv/bin first in their PATH, so that the forked rhubarbe bye is the one from this environment.

Deployment

The repo is cloned in /root/r2lab-nightly, and listed in r2lab-embedded/services/hosts/<host>.repos, after /opt/rhubarbe. run-updates.sh keeps it up to date, and runs deploy/update.sh when it changes, which does a uv sync.

update.sh does not touch systemd. The units from deploy/ are linked by hand, once:

# on faraday
cd /etc/systemd/system
ln -s /root/r2lab-nightly/deploy/r2lab-nightly.{service,timer} .
systemctl daemon-reload
systemctl enable --now r2lab-nightly.timer

# on distrait
cd /etc/systemd/system
ln -s /root/r2lab-nightly/deploy/turn-off-the-lights.{service,timer} .
systemctl daemon-reload
systemctl enable --now turn-off-the-lights.timer

After a unit file is edited, a manual systemctl daemon-reload is needed.

Development

make r2lab rsyncs the scripts to faraday:/tmp/r2lab-dev-embedded/; see the Makefile for how to run them from there.