9. わんくま同盟 名古屋勉強会 #40
1. st2の概要
• 処理の流れ
1. Events are aggregated (Push/Pull) from various services
via Sensors.
2. Events are compared against Triggers, and generate
Actions.
3. Processed actions from workflows are placed on message
que (RabbitMQ).
1. Mistral workflows are processed by the Mistral Services
(Optional).
2. Action reach out to various services to perform workflow actions.
4. Log and Audit History is pushed to database for storage
(MongoDB).
5. Processed Results are sent back to the rules engine for
further processing.
10. わんくま同盟 名古屋勉強会 #40
1. st2の概要
• 構成・技術要素
– Sensors
• Sensors are Python plugins for either inbound or outbound
integration that receives or watches for events respectively.
• When an event from external systems occurs and is
processed by a sensor, a StackStorm trigger will be emitted
into the system.
– Triggers
• Triggers are StackStorm representations of external events.
There are generic triggers (e.g. timers, webhooks) and
integration triggers (e.g. Sensu alert, JIRA issue updated).
• A new trigger type can be defined by writing a sensor plugin.
11. わんくま同盟 名古屋勉強会 #40
1. st2の概要
• 構成・技術要素
– Actions
• Actions are StackStorm outbound integrations.
• There are generic actions (SSH, REST call), integrations
(OpenStack, Docker, Puppet), or custom actions.
• Actions are either Python plugins, or any scripts,
consumed into StackStorm by adding a few lines of
metadata.
• Actions can be invoked directly by user via CLI or API, or
used and called as part of rules and workflows.
12. わんくま同盟 名古屋勉強会 #40
1. st2の概要
• 構成・技術要素
– Rules
• Rules map triggers to actions (or to workflows), applying
matching criteria and mapping trigger payload to action
inputs.
– Workflows
• Workflows stitch actions together into “uber-actions”,
defining the order, transition conditions, and passing the
data.
• Most automations are more than one-step and thus need
more than one action.
• Workflows, just like “atomic” actions, are available in the
Action library, can be invoked manually or triggered by rules.
13. わんくま同盟 名古屋勉強会 #40
1. st2の概要
• 構成・技術要素
– Packs
• Packs are the units of content deployment.
• They simplify the management and sharing of
StackStorm pluggable content by grouping integrations
(triggers and actions) and automations (rules and
workflows).
• A growing number of packs are available on StackStorm
community.
• User can create their own packs, share them on Github,
or submit to StackStorm community repo.
14. わんくま同盟 名古屋勉強会 #40
1. st2の概要
• 構成・技術要素
– Audit trail
• Audit trail of action executions, manual or automated,
is recorded and stored with full details of triggering
context and execution results.
• It is also captured in audit logs for integrating with
external logging and analytical tools: LogStash, Splunk,
statsd, syslog.