Browse Source

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
Winson Chan 1 year ago
parent
commit
38bfd91a22
2 changed files with 28 additions and 0 deletions
  1. 14
    0
      doc/source/architecture.rst
  2. 14
    0
      doc/source/configuration/config-guide.rst

+ 14
- 0
doc/source/architecture.rst View File

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

+ 14
- 0
doc/source/configuration/config-guide.rst View File

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

Loading…
Cancel
Save