Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,17 @@ sphinx-autobuild -H 127.0.0.1 -b html ./docs/source/ ./docs/build/html

:github_st2:`st2/st2common/st2common/operators.py </st2common/st2common/operators.py>`

* Link to Github st2contrib repo:
* Link to Github StackStorm-Exchange org:

:github_contrib:`Link to docker README on st2contrib<packs/docker/README.md>`
:github_exchange:`Link to a sensu pack repo inside Exchange<stackstorm-sensu>`

* Link to st2contrib and st2incubator repos on Github (using a global we set up in source/conf.py)
* Link to StackStorm Exchange website with a filter query:

`st2contrib`_
`st2incubator`_
:web_exchange:`Sensu<sensu>`

* Link to the Exchange website on Github (using a global we set up in source/conf.py)

`exchange`_

* The pattern to include an example from `/st2/contrib/examples`: make example file name a reference on github. May say that it is deployed to `/usr/share/doc/st2/examples/`, and auto-include the file:

Expand Down
Binary file added docs/source/_static/images/packs-chatops-get.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/packs-chatops-show.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/source/actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ passed in, action will be considered as failed (first flag in the result tuple
indicating action status is ``False``).

For a more complex example, please refer to the `actions in the Libcloud pack in
the contrib repository <https://github.com/StackStorm/st2contrib/tree/master/packs/libcloud/actions>`_.
StackStorm Exchange <https://github.com/StackStorm-Exchange/libcloud/tree/master/actions>`_.

Configuration File
~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -663,7 +663,7 @@ To see all predefined actions:

.. rubric:: What's Next?

* Explore packs and actions contributed by |st2| developers and community in the `StackStorm st2contrib repo on Github <https://github.com/StackStorm/st2contrib/>`_.
* Explore packs and actions contributed by |st2| developers and community in the `StackStorm Exchange <https://exchange.stackstorm.org>`_.
* Check out `tutorials on stackstorm.com <http://stackstorm.com/category/tutorials/>`__ on creating actions, and other practical examples of automating with |st2|.

.. _JSON Schema: http://json-schema.org/documentation.html
Expand Down
2 changes: 1 addition & 1 deletion docs/source/chatops/notifications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Notifications
If you read through the :ref:`ref-chatops` section, you are familiar with notifications.
Even without ChatOps, notifications can be used to post messages to external systems
like Chat clients, send emails etc. Notifications require an action that is registered with
|st2| (e.g., the `post_message <https://github.com/StackStorm/st2contrib/blob/master/packs/slack/actions/post_message.yaml>`_ action in the the ``slack`` pack)
|st2| (e.g., the `post_message <https://github.com/StackStorm-Exchange/stackstorm-slack/tree/master/actions/post_message.yaml>`_ action in the the ``slack`` pack)
and a notification rule to go with it. Notifications are implemented as triggers, rules and actions.
A special ``core.st2.notifytrigger`` is emitted by the system on completion of every action.
A rule to match the trigger to a notify action results in notifications being sent out.
Expand Down
109 changes: 49 additions & 60 deletions docs/source/chatops/pack_deploy.rst
Original file line number Diff line number Diff line change
@@ -1,89 +1,78 @@
Packs
=====

Installing packs from st2incubator or st2contrib via ChatOps
------------------------------------------------------------
Installing packs with ChatOps
-----------------------------

When you have the bot listening for ChatOps commands in a channel, installing extra packs
can be done by running a single command:
When you have the bot listening for ChatOps commands in a channel, installing extra packs
from StackStorm Exchange can be done by running a single command:

.. code-block:: bash

! pack deploy st2contrib elasticsearch,travis_ci
bot: Deploying the requested pack(s) from *st2contrib* for you....
@my_user: Successful deployment of *elasticsearch* *travis_ci* !
> from https://github.com/StackStorm/st2contrib.git (branch: _master_).
!pack install github,slack,trello
bot: Installing the requested pack(s) for you.
@my_user:
> Successful deployment of *github*, *slack*, *trello* packs!

If you're adventurous and wish to install and help develop a pack that's
currently in st2incubator you can install one with the following command:
You can install a pack from any github repository just as easily: supply the full URL
to the bot. Pack name is unnecessary, as it will be read from ``pack.yaml`` later:

.. code-block:: bash

! pack deploy st2incubator vsphere,debian
Deploying the requested pack(s) from *st2incubator* for you
@my_user: Successful deployment of *vsphere* *debian* !
> from https://github.com/StackStorm/st2incubator.git (branch: _master_).
!pack install https://github.com/stackstorm/openstack
bot: Installing the requested pack(s) for you.

The command takes the following very simple format:
You can even mix the two formats in one string:

.. code-block:: bash

! pack deploy {{repo_name}} {{packs}} {{branch=master}} - Download StackStorm packs via ChatOps

Deploying Custom packs via ChatOps
----------------------------------
!pack install github,slack,trello,https://github.com/stackstorm/openstack

The same commands can be used to install your own packs just by adding an entry to `/opt/stackstorm/packs/packs/config.yaml` in the following format:
.. figure :: /_static/images/packs-chatops-install.png
:align: center

.. code-block:: yaml

---
repositories:
NameOfRep:
repo: "https://github.com/<my-GitHub-user>/my-st2.git"
subtree: true
Getting information about an installed pack
-------------------------------------------

This will allow you to install a pack via:
The ``!pack get <pack>`` command shows you information about an installed
pack. There is two sections in the output: the first is pack metadata from
``pack.yaml``, and the optional second is git information, if your pack has
been installed from a git source like StackStorm Exchange or a single repo.

.. code-block:: bash

! pack deploy NameOfRep MyAwesomePack

If you don't have multiple packs within the same repository under a `packs` directory, just set `subtree` to `false` and issue the following command:

.. code-block:: bash
Git status will tell you if there's a difference between your local pack version
and the latest version in the origin repository, and also show the remotes
for your pack.

! pack deploy NameOfRep NameOfRep
If a pack is not installed, but available in StackStorm Exchange, the bot will
gallantly offer to install it:

Automating Custom Pack Deployment
---------------------------------
.. figure :: /_static/images/packs-chatops-get.png
:align: center

Building on the above it's possible to enable auto deployment for a single branch of a
repository which has has `subtree` set to `false` by adding an `auto_deployment` section as shown below:
Getting information about an available pack
-------------------------------------------

.. code-block:: yaml
The remote counterpart to ``pack get`` is ``pack show``: it will show an
entry from the StackStorm Exchange, our pack directory, if a pack with the
given name is available.

---
repositories:
my-st2:
repo: "https://github.com/<my-GitHub-user>/my-st2.git"
subtree: false
auto_deployment:
branch: "master"
notify_channel: "my-chatops-channel"
.. figure :: /_static/images/packs-chatops-show.png
:align: center

Then you need a rule (or a sensor) that will trigger the `packs.deploy` action with the right
parameters. The following is based on an post-commit hook from BitBucket Server:
Searching for a pack
--------------------

.. code-block:: yaml
To search for a pack in StackStorm Exchange, use ``!pack search <query>``. Note that
your query will match results in all pack parameters: for example, you can search for
an author or a keyword, not just name and description. The results are ordered by
relevance: if you search for "cloud", first you will get packs with "cloud" in their
name—because they are the most likely to be what you were looking for—and then packs
with "cloud" in keywords or description. And then packs authored by "Mr. Cloud", if
any.

action:
ref: "packs.deploy"
parameters:
auto_deploy: true
repo_name: "{{trigger.body.repository.name}}"
branch: "{{trigger.body.refChanges[0].refId}}"
packs: [ "{{trigger.body.repository.name}}" ]
message: "{{trigger.body.changesets.get('values')[0].toCommit.message}}"
author: "{{trigger.body.changesets.get('values')[0].toCommit.author.name}}"
**Pro-tip:** if you configure an additional pack index (see "Working with pack indexes" in :doc:`/packs`),
it will be queried alongside StackStorm Exchange by commands like ``show`` or ``search``.

.. figure :: /_static/images/packs-chatops-search.png
:align: center
9 changes: 6 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ def previous_version(ver):
'github_mistral': ('https://github.com/StackStorm/mistral/tree/master/%s', None),
'github_contrib':
('https://github.com/StackStorm/st2contrib/tree/master/%s', None),
'github_exchange':
('https://github.com/StackStorm-Exchange/%s', None),
'github_devenv': ('https://github.com/StackStorm/devenv/tree/master/%s', None),
'github_st2web': ('https://github.com/StackStorm/st2web/tree/master/%s', None),
'ops_latest':
('https://downloads.stackstorm.net/releases/st2/' + release + '/%s/', None)
('https://downloads.stackstorm.net/releases/st2/' + release + '/%s/', None),
'web_exchange':
('https://exchange.stackstorm.org/#%s', None),
}

# Inserted at the bottom of all rst files.
Expand All @@ -124,8 +128,7 @@ def previous_version(ver):

rst_epilog = """
%s
.. _st2contrib: http://www.github.com/stackstorm/st2contrib
.. _st2incubator: http://www.github.com/stackstorm/st2incubator
.. _exchange: https://exchange.stackstorm.org/
.. |bwc| replace:: Brocade Workflow Composer
.. |ipf| replace:: IP Fabric Automation Suite
""" % product_replace
Expand Down
4 changes: 2 additions & 2 deletions docs/source/install/config/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ By default, the logs can be found in ``/var/log/st2``.
args=("logs/mysensor.audit.log",)

* To configure logging with syslog, grab the configuration and follow
instructions at :github_contrib:`st2contrib/extra/syslog <extra/syslog>`
instructions at :github_exchange:`exchange-misc/syslog <exchange-misc/tree/master/syslog>`

* Check out LogStash configuration and Kibana dashboard for pretty logging and
audit at :github_contrib:`st2contrib/extra/logstash <extra/logstash>`
audit at :github_exchange:`exchange-misc/logstash <exchange-misc/tree/master/logstash>`


Configure Mistral
Expand Down
4 changes: 2 additions & 2 deletions docs/source/install/deb.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Ubuntu / Debian
===============

If you're just looking for a "one-liner" installation, check the :doc:`top-level install guide </install/index>`. Otherwise, you
If you're just looking for a "one-liner" installation, check the :doc:`top-level install guide </install/index>`. Otherwise, you
can use this guide for step-by step instructions for installing |st2| on a single Ubuntu/Debian 64 bit system as per
the :doc:`Reference deployment </install/overview>`.

Expand Down Expand Up @@ -111,7 +111,7 @@ Verify
-----------------

At this point you have a minimal working installation, and can happily play with |st2|:
follow :doc:`/start` tutorial, :ref:`deploy examples <start-deploy-examples>`, explore and install packs from `st2contrib`_.
follow :doc:`/start` tutorial, :ref:`deploy examples <start-deploy-examples>`, explore and install packs from `StackStorm Exchange <https://exchange.stackstorm.org>`__.

But there is no joy without WebUI, no security without SSL termination, no fun without ChatOps, and no money without Brocade Workflow Composer. Read on, move on!

Expand Down
4 changes: 2 additions & 2 deletions docs/source/install/rhel6.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RHEL 6 / CentOS 6
=================

If you're just looking for a "one-liner" installation, check the :doc:`top-level install guide </install/index>`. Otherwise, you
If you're just looking for a "one-liner" installation, check the :doc:`top-level install guide </install/index>`. Otherwise, you
can use this guide for step-by step instructions for installing |st2| on a single RHEL 6/CentOS 6 64 bit system per
the :doc:`Reference deployment </install/overview>`.

Expand Down Expand Up @@ -181,7 +181,7 @@ Verify

At this point you have a minimal working installation, and can happily play with |st2|: follow
:doc:`/start` tutorial, :ref:`deploy examples <start-deploy-examples>`, explore and install packs
from `st2contrib`_.
from `StackStorm Exchange <https://exchange.stackstorm.org>`__.

But there is no joy without WebUI, no security without SSL termination, no fun without ChatOps,
and no money without Brocade Workflow Composer. Read on, move on!
Expand Down
4 changes: 2 additions & 2 deletions docs/source/install/rhel7.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RHEL 7 / CentOS 7
=================

If you're just looking for a "one-liner" installation, check the :doc:`top-level install guide </install/index>`. Otherwise, you
If you're just looking for a "one-liner" installation, check the :doc:`top-level install guide </install/index>`. Otherwise, you
can use this guide for step-by step instructions for installing |st2| on a single RHEL 7/CentOS 7 64 bit system per
the :doc:`Reference deployment </install/overview>`.

Expand Down Expand Up @@ -153,7 +153,7 @@ Verify
-----------------

At this point you have a minimal working installation, and can happily play with |st2|:
follow :doc:`/start` tutorial, :ref:`deploy examples <start-deploy-examples>`, explore and install packs from `st2contrib`_.
follow :doc:`/start` tutorial, :ref:`deploy examples <start-deploy-examples>`, explore and install packs from `StackStorm Exchange <https://exchange.stackstorm.org>`__.

But there is no joy without WebUI, no security without SSL termination, no fun without ChatOps, and no money without Brocade Workflow Composer. Read on, move on!

Expand Down
Loading