Implement frontend worker daemon
In the context of working on #60 and #51 (closed), we figure it makes sense to implement a frontend celery worker daemon whose job is purely to pick up data provided by backend tasks, and post them into the frontend. This might be log data, sets of packages in an install profile, etc.
We've already got a drupal aegir:input
command implemented, which is serving the purpose of getting things into the frontend Drupal context. So hostmasterd
can just listen for data posted by the backend, and translate them directly into drupal aegir:input
commands.
Remaining Tasks:
-
setup Lando tooling to start the relayd
worker on theappserver
container (mirroring howdispatcherd
is provisioned and started on the backend container) - see the Drumkitdrumkit/mk.d/20_lando.mk
where we start the relayd, and.lando.yml
tooling
forlando dispatcherd-restart
andlando relayd-restart
-
systemd initscript (see template in the ansible role aegir.relayd/files/relayd.init
-
playbook to start it up as a daemon
-
-
implement a test/echo/ping command for backend to sanity-check the relayd
worker is available and can talk to the frontend-
drupal aegir:validate_queue
command -
relayd mechanism to trigger this (see relayd.py
's queue_valid task implementation -
extend existing frontend Queue Connection Settings form to test a round-trip connection- initiate a backend task, watch for data coming back somewhere (see TaskQueueConfigForm::checkQueueValidity()
anddispatcherd.py
's queue_valid task implementation
-
-
add some better logging so the Test Connection Settings feedback gives a better indication of where to look/how to troubleshoot. -
shift the celery files around, so the PID file lives in /var/run
, logfiles go into/var/log
, etc. -
wrap a Behat scenario or two to automate the "click the buttons" tests we've been doing manually.
Followup tasks:
-
Docs updates (#66 (closed)) -
Create dummy application to exercise the API (#67 (closed)) -
Implement Ansible logging module for backend roles to provide feedback (#68 (closed)) -
ansible module to put things on the queue for relayd
to pass to aegir:input (#69 (closed)) -
replace the direct call todrupal aegir:input
call in thedrupal7_install_profiles/tasks/main.yml
role with an initial implementation of a mechanism to put the task onto the queue forrelayd
to pick up. -
extend drupal aegir:input
command to support overwrite vs. append modes (#70 (closed)) -
Replace the current Operation logging mechanism (that posts to an http endpoint) with the new relayd
/aegir:input
mechanism. (#71 (closed))-
Add Operation logging-specific wrappers in(included in #71 (closed))dispatcherd
andrelayd
.
-
-
extend backend mechanisms to provide CLI wrappers for placing(TBD when the problem arises)relayd
tasks on the queue
Edited by Derek Laventure