owenrusk.dev

errands

small jobs the runtime does for the studio.

git clone https://owenrusk.dev/errands.git

last commit turn off outbound sync to staging,

errands

Things it can do for us so we don't have to.

small connectors the runtime calls as tools, and a few jobs that run on their own.

setup

useradd --system --home-dir /var/lib/errands --shell /usr/sbin/nologin mephistopheles
python3 -m venv /opt/errands/venv
/opt/errands/venv/bin/pip install .
install -m 600 deploy/errands.env.example /etc/errands.env    # then fill it in
sudo -u mephistopheles bw config server https://vault.example.com
sudo -u mephistopheles bw login
cp deploy/errands.service /etc/systemd/system/
systemctl enable --now errands

the vault server goes where vault.example.com is. bw login is once, by hand. after that errands only unlocks.

running

python -m errands run      # the jobs
python -m errands serve    # tool calls, one json line in, one out
python -m errands tools    # what it can call

the runtime starts serve as mephistopheles and talks to it on stdin.

tests

python -m unittest