StackStorm 2.9: K8s, Streaming, Inquiries, Windows

Sep 25, 2018
By Lindsay Hill

New Streaming & Inquiries Apps in the Web UI, Orquesta second beta, Helm Chart for running StackStorm in HA mode on Kubernetes, new Windows runners, and plenty of fixes and improvements: StackStorm 2.9 is ready to go! Here’s all the details:

Web UI – Streaming Output, Inquiries

In StackStorm 2.5 we added support for real-time streaming output for long-running actions. But it only worked via CLI or API. We’ve made it a lot easier: you can see it in the Web UI!

Here’s how to use it:

First launch a long-running command that produces output:

st2 run core.local cmd="i=0;while [[ $i -lt 10 ]]; do echo $(date); i=$[$i+1];sleep 10; done" timeout=220

Not very exciting, but that will display the date every 10s.

Then go to the History tab in the Web UI, and find your action. Click on that, and look at the right-hand side:

See that new “check live output” link? Click on that, and you’ll see this:

That will keep updating until the action finishes.

Nifty eh?

In 2.5 we also added Inquiries, but again, it was only available via CLI and API. Now check out the new “Inquiries” tab in the Web UI:

No open inquiries at the moment, so let’s kick something off.

We’ll use the orquesta-ask-basic example from the Examples pack:

[email protected]:~$ st2 run examples.orquesta-ask-basic
.
id: 5ba5a7c1179d9b089903695b
action.ref: examples.orquesta-ask-basic
parameters: None
status: paused
start_timestamp: Sat, 22 Sep 2018 02:24:01 UTC
end_timestamp:
result:
  output: null
+--------------------------+------------------------+--------------+-----------+------------------+
| id                       | status                 | task         | action    | start_timestamp  |
+--------------------------+------------------------+--------------+-----------+------------------+
| 5ba5a7c2179d9b045e725bdd | succeeded (0s elapsed) | start        | core.echo | Sat, 22 Sep 2018 |
|                          |                        |              |           | 02:24:02 UTC     |
| 5ba5a7c2179d9b045e725be0 | pending                | get_approval | core.ask  | Sat, 22 Sep 2018 |
|                          |                        |              |           | 02:24:02 UTC     |
+--------------------------+------------------------+--------------+-----------+------------------+
[email protected]:~$

Now go back to our Inquiries UI:

We can see a “Pending” Inquiry. Click on “Approved”, and then “Respond”

We can see successful inquiries under “Succeeded”

This should make it much easier to use Inquiries. We’ve also fixed a few long-standing bugs related to workflows getting stuck in Pausing state.

Orchestra Orquesta Second Beta

Our new workflow engine took a holiday in Spain, and now wishes to be known as “Orquesta.” All documentation has been updated to reflect the new name. If you have been trying it out, and used runner_type: orchestra, this will still work.

This is the second public beta for Orquesta. This release includes bugfixes and features. Some highlights include:

  • Inquiry support
  • Ported YAQL functions & Jinja filters to Orquesta, and added | support.
  • API for Workflow inspection
  • Bug fixes – duplicate task execution, looping tasks pointing to wrong context.

We’re now busy working on more bugfixes and features as we head to our GA release in 3.0, later this year.

StackStorm Enterprise in HA mode on Kubernetes

Keen to run StackStorm on Kubernetes? So are we! We’ve published beta docs, containers and Helm Chart for running StackStorm Enterprise in HA mode on Kubernetes. Try it out for yourself, and watch out for an upcoming blog post explaining this in much more detail.

This is beta right now, but will go stable later this year. We’ll also be releasing configurations for running the Community version of StackStorm.

Windows Runners

Our good friend Nick Maludy has contributed new Windows runners. These are based on PyWinRM, which is better supported than the old winexe-based runners.

The new runners are winrm-cmd, winrm-ps and winrm-ps-script. The winrm-cmd runner executes Command Prompt commands remotely on Windows hosts using the WinRM protocol. The winrm-ps-cmd and winrm-ps-script runners execute PowerShell commands and scripts on remote Windows hosts using the WinRM protocol.

There’s also new core actions: core.winrm_cmd and core.winrm_ps_cmd.

The legacy Windows runners are now considered deprecated. They will be removed in StackStorm 3.1.

Improved Metrics Support

StackStorm v2.8.0 introduced support for metrics which provide operator with a detailed visibility (performance and health) into StackStorm deployment. This release builds on that functionality and adds many more metrics and related improvements.

With all those metrics in place, operators now have a very good and detailed visibility into a StackStorm deployment.

For information on how to configure this feature and list of the available metrics, please refer to the documentation

An example Graphite dashboard utilizing metrics functionality for our StackStorm CI/CD (build) deployment.

Ability to Easily Inject Triggers Into the System From Workflows

This release includes new core.inject_trigger action which allows user to easily inject arbitrary trigger into the system. Most common use case includes injecting trigger into the system inside a workflow.

Before this change, injecting a trigger into the system from a workflow was far from trivial and meant utilizing core.http action and POSTing a trigger to the webhook or other more complex approach.

Miscellaneous Changes & Fixes

Lots happening here – this is just a few interesting items:

  • API filtering – we’ve added more controls around filtering what gets returned with API calls. We’ve also made some speed improvements. We’re working hard to improve the UI and API performance. Watch out for lots more here.
  • Saving pack configs from the Web UI works once again.
  • We fixed a bug with Python 3 actions with certain Python 3 versions & distros.
  • We’ve upgraded mongoengine and pymongo, which will let us support Mongo 3.6 in future.
  • You can now emit actiontrigger instances at more stages of an action’s lifecycle, not just when it completes. Handy if you want to set up notification rules for specific actions.
  • The CloudSlang runner is now deprecated. It will be removed from StackStorm 3.1. It will be available separately for users who wish to continue using it, but it will no longer be tested or supported by the StackStorm team.

More details in the changelog.

Install Time

Packages are available in our apt and yum repos. Follow the standard instructions to install, or upgrade following the General Upgrade Procedure.

You know the drill by now: backup first.

And as always, thanks to everyone who contributed.