diff --git a/doc/source/architecture.rst b/doc/source/architecture.rst index 450f9b9ad..72f3954e2 100644 --- a/doc/source/architecture.rst +++ b/doc/source/architecture.rst @@ -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 ----------- diff --git a/doc/source/configuration/config-guide.rst b/doc/source/configuration/config-guide.rst index 0f63f3e08..232cdbe89 100644 --- a/doc/source/configuration/config-guide.rst +++ b/doc/source/configuration/config-guide.rst @@ -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::