Forge Home

st2

Puppet module to manage/configure StackStorm

6,297,590 downloads

1,062 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.5.0 (latest)
  • 2.4.0
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.7.0
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.0
  • 1.0.0-rc2 (pre-release)
  • 1.0.0-rc (pre-release)
  • 1.0.0-beta
  • 0.15.2
  • 0.15.0
  • 0.14.5
  • 0.14.4
  • 0.14.3
  • 0.14.2
  • 0.14.1
  • 0.14.0
  • 0.13.2
  • 0.13.1
  • 0.13.0
  • 0.12.9
  • 0.12.8
  • 0.12.7
  • 0.12.6
  • 0.12.5
  • 0.12.4
  • 0.12.3
  • 0.12.2
  • 0.12.0
  • 0.11.3
  • 0.10.18
  • 0.10.17
  • 0.10.16
  • 0.10.15
  • 0.10.14
  • 0.10.13
  • 0.10.12
  • 0.10.11
  • 0.10.10
  • 0.10.9
  • 0.10.8
  • 0.10.7
  • 0.10.6
  • 0.10.5
  • 0.10.4
  • 0.10.3
  • 0.10.2
  • 0.10.1
  • 0.10.0
  • 0.9.29
  • 0.9.28
  • 0.9.27
  • 0.9.26
  • 0.9.25
  • 0.9.24
  • 0.9.23
  • 0.9.22
  • 0.9.21
  • 0.9.20
  • 0.9.19
  • 0.9.18
  • 0.9.17
  • 0.9.16
  • 0.9.15
  • 0.9.14
  • 0.9.13
  • 0.9.12
  • 0.9.11
  • 0.9.10
  • 0.9.9 (deleted)
  • 0.9.8
  • 0.9.7
  • 0.9.6
  • 0.9.5
  • 0.9.4
  • 0.9.3
  • 0.9.2
  • 0.9.1
  • 0.9.0
  • 0.8.0
  • 0.7.10
  • 0.7.9
  • 0.7.8
  • 0.7.7
  • 0.7.6
  • 0.7.5
  • 0.7.4
  • 0.7.3
  • 0.7.2
  • 0.7.1
  • 0.7.0
  • 0.6.7
  • 0.6.6
  • 0.6.5
  • 0.6.4
  • 0.6.3
  • 0.6.2
  • 0.6.1
  • 0.6.0
  • 0.5.9
  • 0.5.8
  • 0.5.7
  • 0.5.6
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.9
  • 0.4.8
  • 0.4.7
  • 0.4.6
  • 0.4.5
  • 0.4.4
  • 0.4.3
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.8
  • 0.3.7
  • 0.3.6
  • 0.3.5 (deleted)
  • 0.3.4
  • 0.3.3
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.7
  • 0.2.5
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.8
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jan 9th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.8.5 < 6.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'stackstorm-st2', '1.0.0-rc2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add stackstorm-st2
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install stackstorm-st2 --version 1.0.0-rc2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

stackstorm/st2 — version 1.0.0-rc2 Jan 9th 2018

puppet-st2

Build Status Coverage Status Puppet Forge Version Puppet Forge Downloads Join our community Slack

Module to manage StackStorm

Supported platforms

  • Ubuntu 14.04/16.04
  • RHEL/Centos 6/7

Quick Start

For a full installation on a single node, a profile already exists to get you setup and going with minimal effort. Simply:

include ::st2::profile::fullinstall

Configuration

This module aims to provide sane default configurations, but also stay out of your way in the event you need something more custom. To accomplish this, this module uses the Roles/Profiles pattern. Included in this module are several modules that come with sane defaults that you can use directly or use to compose your own site-specific profile for StackStorm installation.

Configuration can be done directly via code composition, or set via Hiera data bindings. A few notable parameters to take note of:

  • st2::version - Version of ST2 to install. (Latest version w/o value)

All other classes are documented with Puppetdoc. Please refer to specific classes for use and configuration.

Profiles:

  • st2::profile::client - Profile to install all client libraries for st2
  • st2::profile::fullinstall - Full installation of StackStorm and dependencies
  • st2::profile::mistral - Install of OpenStack Mistral
  • st2::profile::mongodb - st2 configured MongoDB installation
  • st2::profile::nodejs - st2 configured NodeJS installation
  • st2::profile::python - Python installed and configured for st2
  • st2::profile::rabbitmq - st2 configured RabbitMQ installation
  • st2::proflle::server - st2 server components
  • st2::profile::web - st2 web components
  • st2::profile::chatops - st2 chatops components

Installing and configuring Packs

StackStorm packs can be installed and configured directly from Puppet. This can be done via the st2::pack and st2::pack::config defined types.

Installation/Configuration via modules:

  # install pack from the exchange
  st2::pack { 'linux': }
  
  # install pack from a git URL
  st2::pack { 'private':
    repo_url => 'https://private.domain.tld/git/stackstorm-private.git',
  }
  
  # install pack and apply configuration
  st2::pack { 'slack':
    config   => {
      'post_message_action' => {
        'webhook_url' => 'XXX',
      },
    },
  }

Installation/Configuration via Hiera:

st2::packs:
  linux:
    ensure: present
  private:
    ensure: present
    repo_url: https://private.domain.tld/git/stackstorm-private.git
  slack:
    ensure: present
    config:
      post_message_action:
        webhook_url: XXX

Configuring Hubot (ChatOps)

Configuration via Hiera:

  # character to trigger the bot that the message is a command
  # example: !help
  st2::chatops_hubot_alias: "'!'"
  
  # name of the bot in chat, sometimes requires special characters like @
  st2::chatops_hubot_name: '"@RosieRobot"'
  
  # API key generated by: st2 apikey create
  st2::chatops_api_key: '"xxxxyyyyy123abc"'
 
  # Public URL used by ChatOps to offer links to execution details via the WebUI.
  st2::chatops_web_url: '"stackstorm.domain.tld"'
  
  # install and configure hubot adapter (rocketchat, nodejs module installed by ::nodejs)
  st2::chatops_adapter:
    hubot-adapter:
      package: 'hubot-rocketchat'
      source: 'git+ssh://git@git.company.com:npm/hubot-rocketchat#master'

  # adapter configuration (hash)
  st2::chatops_adapter_conf:
    HUBOT_ADAPTER: rocketchat
    ROCKETCHAT_URL: "https://chat.company.com:443"
    ROCKETCHAT_ROOM: 'stackstorm'
    LISTEN_ON_ALL_PUBLIC: true
    ROCKETCHAT_USER: st2
    ROCKETCHAT_PASSWORD: secret123
    ROCKETCHAT_AUTH: password
    RESPOND_TO_DM: true

Module Dependencies

This module installs and configures all of the components required for StackStorm. In order to not repeat others work, we've utilized many existing modules from the foge. We manage the module dependenies using a Puppetfile for each OS we support. These Puppetfile can be used both with r10k and librarian-puppet.

Puppetfiles

Known Limitations

MongoDB (Puppet < 4.0)

When running the initial install of st2 you will see an error from the MongoDB module :

Error: Could not prefetch mongodb_database provider 'mongodb': Could not evaluate MongoDB shell command: load('/root/.mongorc.js'); printjson(db.getMongo().getDBs())

This error is caused by a deficiency in this module trying to use authentication in its prefetch step when authentication hasn't been configured yet on the database. The error can be safely ignored. Auth and databases will be configured normally. Subsequent runs of puppet will not show this error.

MongoDB (Puppet >= 4.0)

When running the initial install of st2 you will see an error from the MongoDB module :

Error: Could not prefetch mongodb_database provider 'mongodb': Could not evaluate MongoDB shell command: load('/root/.mongorc.js'); printjson(db.getMongo().getDBs())

This error is caused by a deficiency in this module trying to use authentication in its prefetch step when authentication hasn't been configured yet on the database. This results in a failure and stops processing.

In these cases we need to disable auth for MongoDB using the mondob_auth variabe. This can be accomplished when declaring the ::st2 class:

class { '::st2':
  mongodb_auth => false,
}

Or in hiera:

st2:
  mongodb_auth: false

Ubuntu 14.04

Because 14.04 ships with a very old version of puppet (3.4) and most puppet modules no longer support this version of puppet, we recommend upgrading to 3.8.7 at a minimum.

# 14.04 trusty
# By default this ships with puppet 3.4.x (very old), need a newer version to 
# work with with of the required puppet module dependencies for this module. 
wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
sudo dpkg -i puppetlabs-release-trusty.deb
sudo apt-get update
sudo apt-get install puppet=3.8.7-1puppetlabs1

Ubuntu 16.04

In StackStorm < 2.4.0 there is a known bug #3290 that when first running the installation with this puppet module the st2 pack will fail to install. Simply invoking puppet a second time will produce a fully running st2 installation with the st2 pack installed. This has been fixed in st2 version 2.4.0.

Maintainers

Help

If you're in stuck, our community always ready to help, feel free to:

Your contribution is more than welcome!