Task #2479

Updated by semyers about 4 years ago

Now that the tasking system is up and running, we'd like to get those services working automatically via systemd. In order to do that, we should take the existing systemd unit files and update them to use the new paths.

Here are the unit files related to the tasking system in pulp 2:

The reserved resource worker service files are created by the manage_workers script:

Here are the current updated app invocations in Pulp 3, which hopefully won't change before we start this task:
# celery beat
/usr/bin/celery beat -A pulp.tasking.celery_instance.celery -S

# resource manager worker
/usr/bin/celery worker -A pulp.tasking.celery_app -n resource_manager@<i> -Q resource_manager -c 1 --events --umask 18 --pidfile=/var/run/pulp/ --heartbeat-interval=30

# reserved resource workers
/usr/bin/celery worker -n reserved_resource_worker-<i>@<hostname> -A pulp.tasking.celery_app:celery -c 1 --events --umask 18 --pidfile /var/run/pulp/reserved_resource_worker-<i>.pid --heartbeat-interval=30

Systemd provides an "instancing" mechanism that we could potentially use for the reserved resource workers, if we'd like get away from using the "manage_workers" script, documented here: (look for @getty@.service@ and the meaning of the %i expansion in unit files)

Once these unit files are in place, the ansible dev playbook will need to be updated to install these unit files and start/stop these services using the aliases defined in its @.bashrc@ file.