Skip to content

Commit

Permalink
Merge pull request #1011 from amanda11/remove_mistral_basic
Browse files Browse the repository at this point in the history
Removal of st2mistral from basic chapter of docs
  • Loading branch information
amanda11 authored Aug 18, 2020
2 parents acd59cb + 555ad2d commit 4e065c3
Show file tree
Hide file tree
Showing 15 changed files with 91 additions and 1,151 deletions.
62 changes: 32 additions & 30 deletions docs/source/_includes/internal_trigger_types.rst
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
.. NOTE: This file has been generated automatically, don't manually edit it
.. NOTE: This file has been generated automatically, don't manually edit it.
Edit st2common/st2common/constants/triggers.py and rebuild the
documentation.
Action
~~~~~~

+---------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| Reference | Description | Properties |
+===========================+=================================================================+=============================================================================================================+
| st2.generic.actiontrigger | Trigger encapsulating the completion of an action execution. | execution_id, status, start_timestamp, action_name, action_ref, runner_ref, parameters, result |
+---------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| st2.generic.notifytrigger | Notification trigger. | execution_id, status, start_timestamp, end_timestamp, action_ref, runner_ref, channel, route, message, data |
+---------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| st2.action.file_writen | Trigger encapsulating action file being written on disk. | ref, file_path, host_info |
+---------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| st2.generic.inquiry | Trigger indicating a new "inquiry" has entered "pending" status | id, route |
+---------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
+--------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| Reference | Description | Properties |
+================================+=================================================================+=============================================================================================================+
| core.st2.generic.actiontrigger | Trigger encapsulating the completion of an action execution. | execution_id, status, start_timestamp, action_name, action_ref, runner_ref, parameters, result |
+--------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| core.st2.generic.notifytrigger | Notification trigger. | execution_id, status, start_timestamp, end_timestamp, action_ref, runner_ref, channel, route, message, data |
+--------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| core.st2.action.file_written | Trigger encapsulating action file being written on disk. | ref, file_path, host_info |
+--------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
| core.st2.generic.inquiry | Trigger indicating a new "inquiry" has entered "pending" status | id, route |
+--------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+

Sensor
~~~~~~

+--------------------------+--------------------------------------------------+------------+
| Reference | Description | Properties |
+==========================+==================================================+============+
| st2.sensor.process_spawn | Trigger indicating sensor process is started up. | object |
+--------------------------+--------------------------------------------------+------------+
| st2.sensor.process_exit | Trigger indicating sensor process is stopped. | object |
+--------------------------+--------------------------------------------------+------------+
+-------------------------------+--------------------------------------------------+------------+
| Reference | Description | Properties |
+===============================+==================================================+============+
| core.st2.sensor.process_spawn | Trigger indicating sensor process is started up. | object |
+-------------------------------+--------------------------------------------------+------------+
| core.st2.sensor.process_exit | Trigger indicating sensor process is stopped. | object |
+-------------------------------+--------------------------------------------------+------------+

Key Value Pair
~~~~~~~~~~~~~~

+---------------------------------+---------------------------------------------------------+------------------------+
| Reference | Description | Properties |
+=================================+=========================================================+========================+
| st2.key_value_pair.create | Trigger encapsulating datastore item creation. | object |
+---------------------------------+---------------------------------------------------------+------------------------+
| st2.key_value_pair.update | Trigger encapsulating datastore set action. | object |
+---------------------------------+---------------------------------------------------------+------------------------+
| st2.key_value_pair.value_change | Trigger encapsulating a change of datastore item value. | old_object, new_object |
+---------------------------------+---------------------------------------------------------+------------------------+
| st2.key_value_pair.delete | Trigger encapsulating datastore item deletion. | object |
+---------------------------------+---------------------------------------------------------+------------------------+
+--------------------------------------+---------------------------------------------------------+------------------------+
| Reference | Description | Properties |
+======================================+=========================================================+========================+
| core.st2.key_value_pair.create | Trigger encapsulating datastore item creation. | object |
+--------------------------------------+---------------------------------------------------------+------------------------+
| core.st2.key_value_pair.update | Trigger encapsulating datastore set action. | object |
+--------------------------------------+---------------------------------------------------------+------------------------+
| core.st2.key_value_pair.value_change | Trigger encapsulating a change of datastore item value. | old_object, new_object |
+--------------------------------------+---------------------------------------------------------+------------------------+
| core.st2.key_value_pair.delete | Trigger encapsulating datastore item deletion. | object |
+--------------------------------------+---------------------------------------------------------+------------------------+
12 changes: 5 additions & 7 deletions docs/source/actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,15 @@ the following runners:
7. ``action-chain`` - This runner supports executing simple linear work-flows. For more
information, please refer to the :doc:`Workflows </workflows>` and
:doc:`ActionChain </actionchain>` documentation.
8. ``mistral-v2`` - This runner is built on top of the Mistral OpenStack project and supports
executing complex work-flows. For more information, please refer to the
:doc:`Workflows </workflows>` and :doc:`Mistral </mistral>` documentation.
9. ``inquirer`` - This runner provides the core logic of the :doc:`Inquiries </inquiries>`

8. ``inquirer`` - This runner provides the core logic of the :doc:`Inquiries </inquiries>`
feature.

Note: This runner is an implementation detail for the ``core.ask`` action, and in most cases
should not be referenced in other actions.
10. ``winrm-cmd`` - The WinRM command runner allows you to run the command-line interpreter (``cmd``) commands on Windows hosts using the WinRM protocol.
11. ``winrm-ps-cmd`` - The WinRM PowerShell command runner allows you to run the PowerShell commands on Windows hosts using the WinRM protocol.
12. ``winrm-ps-script`` - WinRM PowerShell script runner allows you to run PowerShell scripts on Windows hosts.
9. ``winrm-cmd`` - The WinRM command runner allows you to run the command-line interpreter (``cmd``) commands on Windows hosts using the WinRM protocol.
10. ``winrm-ps-cmd`` - The WinRM PowerShell command runner allows you to run the PowerShell commands on Windows hosts using the WinRM protocol.
11. ``winrm-ps-script`` - WinRM PowerShell script runner allows you to run PowerShell scripts on Windows hosts.


Runners come with their own set of input parameters. When an action is executed, it inherits the
Expand Down
69 changes: 40 additions & 29 deletions docs/source/chatops/notifications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,54 +178,65 @@ task notify is shown below:
timeout: 180
on-success: "make_tests"
How do I Setup Notifications for Mistral?
-----------------------------------------
How do I Setup Notifications for Orquesta?
------------------------------------------

The method for global notifications for the workflow is the same as ActionChain. You have a notify
section in the action meta when registering. See an
`example <https://github.com/StackStorm/st2/blob/master/contrib/examples/actions/mistral-basic-two-tasks-with-notifications.yaml#L24>`_.
Unfortunately, notifications per task are not supported in Mistral as a first class citizen yet.
This will be added in later releases.
The Orquesta metadata supports an optional notify input parameter, this specifies the tasks in the workflow that notifications will be generated for. For example:

How do I Skip Notifications for Tasks in a Workflow?
.. code-block:: yaml
---
name: notify
description: A basic sequential workflow with notify enabled.
pack: orquesta_tests
runner_type: orquesta
entry_point: workflows/sequential.yaml
enabled: true
parameters:
who:
required: true
type: string
default: Stanley
notify:
type: array
default:
- task1
- task2
- task3
How do I Skip Notifications for Tasks in a chain ?
-----------------------------------------------------------

This is implemented as a runner parameter ``skip_notify``. If your chain or workflow contains
This is implemented as a runner parameter ``skip_notify``. If your chain contains
multiple tasks and you want some tasks to be "muted", you can do so by specifying skip_notify
and call out tasks to mute. For example:

.. code-block:: yaml
---
name: mistral-basic-two-tasks-with-notifications
pack: examples
description: Run mistral workflow with two tasks.
runner_type: mistral-v2
entry_point: workflows/mistral-basic-two-tasks-with-notifications.yaml
# Action definition metadata
name: "echochain"
description: "Simple Action Chain workflow"
# `runner_type` has value `action-chain` to identify that action is an ActionChain.
runner_type: "action-chain"
# `entry_point` path to the ActionChain definition file, relative to the pack's action directory.
entry_point: "chains/echochain.yaml"
enabled: true
parameters:
skip_notify:
default:
- "task2"
context:
default: {}
immutable: true
type: object
task:
default: null
immutable: true
type: string
workflow:
default: null
immutable: true
type: string
- c2
notify:
on-complete:
message: "\"@channel: Action succeeded.\""
routes:
- "slack"
In the above example, notifications for "task2" will not be sent out. This feature is particularly
In the above example, notifications for "c2" will not be sent out. This feature is particularly
useful in combination with ChatOps where you don't want noisy tasks to pollute the Chat client.

Note that it is not currently possible to have a default ``skip_notify`` policy.
Expand All @@ -237,4 +248,4 @@ If you enabled ChatOps, you get all the things wired for you. You don't have to
metadata etc. You can still use ``skip_notify`` to skip notifications for certain tasks in a chain
or workflow. If you specified a notify section in metadata or in tasks, those notification routes
will override ChatOps. Therefore, you might not see notifications in the chat client.
See `this issue <https://github.com/StackStorm/st2/issues/2018>`_ for an example.
See `this issue <https://github.com/StackStorm/st2/issues/2018>`_ for an example.
4 changes: 2 additions & 2 deletions docs/source/datastore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ A simple action example:
---
description: Remediates a host.
enabled: true
runner_type: mistral-v2
runner_type: orquesta
entry_point: workflows/remediate.yaml
name: remediate
pack: default
Expand Down Expand Up @@ -490,7 +490,7 @@ the parameter definition:
---
description: Provisions a VM
enabled: true
runner_type: mistral-v2
runner_type: orquesta
entry_point: workflows/vm_provision.yaml
name: vm_provision
pack: default
Expand Down
Loading

0 comments on commit 4e065c3

Please sign in to comment.