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.
- mail: the support inbox. read, reply, send. everything sent is also kept in
/var/log/errands/sent.mbox. - posts: journal posts in the site's
scheduled/go out when their date comes. - hosting: stillwater, account 20417. the balance from their lookup, payment with the card on file.
- invoices: bills that come in to support go in a ledger and get paid through the bank's bill pay.
- vault: logins and notes from the shared vault, through
bw. - sync: state and logs to the staging box at the office, every night.
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