Allow backend to post arbitrary data to frontend entities
We are exploring robust, decoupled, secure ways of enabling the backend
aegird to provide feedback to the frontend that triggered a task, both in terms of its log output (see #51 (closed)) and other resultant data (eg. the set of packages available on a platform).
Ultimately, the plan is to use Celery (and RabbitMQ) to provide this communication channel, mirroring the way that the frontend pushes tasks to the queue for
aegird. This removes a dependency on HTTP or SSH access between the two components, leaving only the RabbitMQ layer, which is more robust, fault-tolerant, etc.
Currently, to ingest the logs from running Ansible on the backend, we have a custom route, class and method. We probably want to push this back through the queue (to more easily allow for multi-server scenarios). A Celery worker on the control (front-end) VM could, for example, leverage a Console command to do this.
In order to post arbitrary data from the backend to the front-end. We do something similar in our Drupal Console command:
In the short term, we plan to implement this in a much simpler way, to leverage the existing Drupal console commands, and allow us to keep building out the core functionality of the system. See #60 for this short-term solution.
Original ticket description:
The new JSON API has landed in Drupal core. We should leverage it in Aegir5.
For example, we have a custom route/class/method to ingest the logs from running Ansible on the backend. I think we do something similar in a couple other places too. We probably want to push this back through the queue (to more easily allow for multi-server scenarios) but a worker on the control VM could maybe leverage the json api for the "last mile".
Also, of course, all the SaaS-enabled stuff should be much simpler if we don't need all the overhead of the Services module.