Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of st2mistral from basic chapter of docs #1011

Merged
merged 5 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the example used in the unit-tests, but I couldn't get notify in Orquesta working in my setup - but I may be missing something. In the Orquesta pages we just mention there is a notify parameter that we can ignore for now...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got Orquesta notifications working but I also had to add on a notify section as well as the notify parameters, e.g. I also had:

notify:
  on-complete:
    routes:
      - slack
    message: "Succeeded"

so that it had the details of route etc.

Do we think the documentation as is is ok, or

  1. should I add in the notify section into the example
  2. Should I add in a preceding sentence along following lines:

The method for specify the route and conditions for when tasks in an Orquesta workflow is the same as ActionChain. You have a notify section in the action meta when registering.

and should I put in a notify section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LindsayHill @armab Having got notifications working in Orquesta now, I'm wondering if more needs to go into this
section on the chatops page. Or alternatively I was mis-understanding something.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LindsayHill @armab Having got notifications working in Orquesta now, I'm wondering if more needs to go into this
section on the chatops page. Or alternatively I was mis-understanding something.

So as not to confuse things, I will merge this PR. And generate a new PR with enhancements that I think will make Orquesta notifications even clearer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 step by step

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
17 changes: 3 additions & 14 deletions docs/source/install/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,7 @@ the right API, authentication options, suppress insecure warnings for self-signe
other conveniences see the :doc:`/reference/cli`. ``st2client`` is packaged with ``st2``, or can be
installed independently.

3. st2mistral
--------------

:doc:`/mistral` is a workflow service component that |st2| uses for long-running workflows. It
is packaged as ``st2mistral``, installed under ``/opt/stackstorm/mistral``, runs in a dedicated
Python virtualenv, and is configured via ``/etc/mistral/mistral.conf``. ``mistral-server`` runs
workflow logic and calling actions, reaching out to st2api for action execution requests.
``st2mistral`` is a mistral plugin with stackstorm extensions. ``mistral-api`` is an internal
end-point accessed by ``st2actionrunner`` and ``st2notifier``. In a single-box deployment it is
restricted to localhost.

4. NGINX for WebUI and SSL termination
3. NGINX for WebUI and SSL termination
--------------------------------------
* **nginx** provides SSL termination, redirects HTTP to HTTPS, serves WebUI static components, and
reverse-proxies REST API endpoints to st2* web services.
Expand All @@ -90,7 +79,7 @@ restricted to localhost.
st2auth and st2api REST API endpoints. NGINX proxies inbound requests to ``/api`` and ``/auth``
to the st2api and st2auth services respectively.

5. st2chatops - ChatOps components
4. st2chatops - ChatOps components
----------------------------------
|st2| Chatops components are `Hubot <https://hubot.github.com/>`_, `|st2|'s Hubot adapter
<https://github.com/StackStorm/hubot-stackstorm>`_, and plugins for connecting to `different Chat
Expand All @@ -103,7 +92,7 @@ ChatOps can be also enabled by installing `hubot-stackstorm plugin

Dependencies
------------
The required dependencies are RabbitMQ, MongoDB, and PostgreSQL. The optional dependencies are:
The required dependencies are RabbitMQ, and MongoDB. The optional dependencies are:

- nginx for SSL termination, reverse-proxying API endpoints and serving static HTML.
- Redis or Zookeeper for concurrency policies (see :doc:`/reference/policies`).
Expand Down
Loading