Set up a Debusine worker
Introduction
debusine-worker is a daemon that connects (via HTTP API and WebSockets)
to a Debusine server, waits for tasks and executes tasks locally. See
Workers.
Initial setup
Install the debusine-worker package. The Initial setup using Debusine server
has the instructions how to add the Debusine repository.
To know what the package does during installation see the What the package does on installation section. Follow the steps below to finalize the set-up.
Create the file
/etc/debusine/worker/config.ini. Use/usr/share/doc/debusine-worker/examples/config.inias an example:$ sudo cp /usr/share/doc/debusine-worker/examples/config.ini /etc/debusine/worker/ $ sudo editor /etc/debusine/worker/config.iniChange the
api-urlin the configuration file as needed.Restart
debusine-workerwith the new configuration:$ sudo systemctl restart debusine-workerView the worker logs:
$ journalctl -u debusine-worker.serviceFollowing the restart, the token will appear in
/etc/debusine/worker/token. The Debusine admin should approve the tokens pending for approval. Nothing needs to be done from the side of debusine-worker.
Managing debusine-worker
Use the systemctl command to start (done automatically by the package), stop
or restart the debusine-worker:
$ sudo systemctl start debusine-worker
$ sudo systemctl stop debusine-worker
$ sudo systemctl status debusine-worker
The default configuration logs to stderr, which is captured by systemd’s journal.
The log level can be changed in /etc/debusine/worker/config.ini.
Troubleshooting
Information about the state of debusine-worker can be found via:
systemctl status debusine-workerto verify that the service is running
journalctl -u debusine-worker.serviceto see worker logs
journalctl -u debusine-worker.service -fto follow logs live
journalctl -u debusine-worker.service -bto see logs from current boot
To change the settings of debusine-worker, for example to increase the logging level:
$ sudo editor /etc/debusine/worker/config.ini # change log-level
$ sudo systemctl restart debusine-worker
debusine-worker can be launched without systemd which might be useful for
troubleshooting. Run it with the same debusine-worker user. For example:
$ sudo systemctl stop debusine-worker
$ sudo editor /etc/debusine/worker/config.ini # adjust log-level if needed
$ sudo -u debusine-worker debusine-worker # execute it with the correct user
debusine-worker can also be launched using a different user for debugging purposes.
The configuration (config.ini and token files) in the
directory $HOME/.config/debusine/worker have higher priority than the global
configuration, /etc/debusine/worker .
What the package does on installation
Creates the
debusine-workeruserInstalls a systemd service (named debusine-worker)
Creates the directory
/var/lib/debusine-worker