Add documentation on event notifier

Add documentation on the notifier architecture and configuration
of the event publishers.

Co-Authored-By: Dougal Matthews <dougal@redhat.com>
Change-Id: I5e7d8ac81225cfe4082a827a52447f95dd4789a0
This commit is contained in:
Winson Chan 2018-04-26 23:07:29 +00:00 committed by Dougal Matthews
parent 8b0171ba25
commit 38bfd91a22
2 changed files with 28 additions and 0 deletions

View File

@ -26,6 +26,7 @@ Mistral is composed of the following major components:
* Engine
* Task Executors
* Scheduler
* Notifier
* Persistence
The following diagram illustrates the architecture of mistral:
@ -58,6 +59,19 @@ The scheduler stores and executes delayed calls. It is the important Mistral
component since it interacts with engine and executors. It also triggers
workflows on events (e.g., periodic cron event)
Notifier
--------
On workflow and task execution, events are emitted at certain checkpoints such
as when a workflow execution is launched or when it is completed. The notifier
routes the events to configured publishers. The notifier can either be
configured to execute locally on the workflow engine or can be run as a server
much like the remote executor server and listens for events. Running the
notifier as a remote server ensures the workflow engine quickly unblocks and
resumes work. The event publishers are custom plugins which can write the
event to a webhook over HTTP, an entry in a log file, a message to Zaqar, and
etc.
Persistence
-----------

View File

@ -168,6 +168,20 @@ directory.
The grace period for the first heartbeat (in seconds).
#. Configure event publishers. Event publishers are plugins that are
optionally installed in the same virtual environment as Mistral.
Event notification can be configured for all workflow execution for one or
more event publishers. The configuration is under the notify param at the
notifier section. The notify param is a list of dictionaries, one for each
publisher identifying the type or the registered plugin name and additional
key value pairs to be passed as kwargs into the publisher::
[notifier]
notify = [
{'type': 'webhook', 'url': 'http://example.com', 'headers': {'X-Auth-Token': 'XXXX'}},
{'type': 'custom_publisher'}
]
#. Finally, try to run mistral engine and verify that it is running without
any error::