Skip to content

Commit 867d293

Browse files
authored
Merge pull request #253 from StackStorm/feature/configurable-release
Added release parameter to allow installing from unstable
2 parents b5a7570 + a7a37b0 commit 867d293

File tree

4 files changed

+48
-36
lines changed

4 files changed

+48
-36
lines changed

CHANGELOG.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
# Changelog
22

33
## Development
4+
5+
- Added authentication for RabbitMQ, by default.
6+
The authentication options are available in the `::st2` class:
7+
- `rabbitmq_username` : Username for the new RabbitMQ user (default: `st2admin`)
8+
- `rabbitmq_password` : Password for the new RabbitMQ user (default: `Ch@ngMe`)
9+
When upgrading to this new version, this will force a restart of all StackStorm
10+
and Mistral services as the new password is applied. (Feature)
11+
Contributed by @nmaludy
12+
13+
- Remove the insecure RabbitMQ default `guest` user on RabbitMQ instances.
14+
Note: this will remove this user on new AND existing instances. (Enhancement)
15+
Contributed by @nmaludy
16+
17+
- Added support for additional RabbitMQ configuration options:
18+
- `rabbitmq_hostname` : Hostname of the RabbitMQ server (default: `127.0.0.1`)
19+
- `rabbitmq_port` : Port to connect to the RabbitMQ server (default: `5672`)
20+
- `rabbitmq_bind_ip` : IP address to bind the RabbitMQ server to (default: `127.0.0.1`)
21+
- `rabbitmq_vhost` : Virtual Host for the StackStorm content on RabbitMQ (default: `/`)
22+
(Feature)
23+
Contributed by @nmaludy
424

525
- Added support for `st2scheduler` service in StackStorm >= `2.10.0`.
626
Two new options were added to `::st2`:
@@ -22,6 +42,13 @@
2242
#219 (Enhancement)
2343
Contributed by @nmaludy
2444

45+
- Added new parameter to `::st2` class `repository` that allows configuring a different
46+
release repository from PackageCloud for Yum/Apt. Available options are:
47+
- `'stable'` (default)
48+
- `'unstable'`
49+
(Enhancement)
50+
Contributed by @nmaludy
51+
2552
## 1.2.0 (Sep 25, 2018)
2653

2754
- Removed `manifests/container.pp` and `manifests/profile/source.pp`. These files
@@ -58,26 +85,6 @@
5885
on RHEL/CentOS installs. (Bugfix)
5986
Contributed by @nmaludy
6087

61-
- Added authentication for RabbitMQ, by default.
62-
The authentication options are available in the `::st2` class:
63-
- `rabbitmq_username` : Username for the new RabbitMQ user (default: `st2admin`)
64-
- `rabbitmq_password` : Password for the new RabbitMQ user (default: `Ch@ngMe`)
65-
When upgrading to this new version, this will force a restart of all StackStorm
66-
and Mistral services as the new password is applied. (Feature)
67-
Contributed by @nmaludy
68-
69-
- Remove the insecure RabbitMQ default `guest` user on RabbitMQ instances.
70-
Note: this will remove this user on new AND existing instances. (Enhancement)
71-
Contributed by @nmaludy
72-
73-
- Added support for additional RabbitMQ configuration options:
74-
- `rabbitmq_hostname` : Hostname of the RabbitMQ server (default: `127.0.0.1`)
75-
- `rabbitmq_port` : Port to connect to the RabbitMQ server (default: `5672`)
76-
- `rabbitmq_bind_ip` : IP address to bind the RabbitMQ server to (default: `127.0.0.1`)
77-
- `rabbitmq_vhost` : Virtual Host for the StackStorm content on RabbitMQ (default: `/`)
78-
(Feature)
79-
Contributed by @nmaludy
80-
8188
## 1.1.0 (Sep 07, 2018)
8289

8390
- DEPRECATION WARNING - Dropped support for Puppet 3. (Enhancement)

manifests/init.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# [*version*] - Version of StackStorm package to install (default = 'present')
99
# See the package 'ensure' property:
1010
# https://puppet.com/docs/puppet/5.5/types/package.html#package-attribute-ensure
11+
# [*repository*] - Release repository to enable. 'stable', 'unstable'
12+
# (default = 'stable')
1113
# [*mistral_git_branch*] - Tagged branch of Mistral to download/install
1214
# [*conf_file*] - The path where st2 config is stored
1315
# [*use_ssl*] - Enable/Disable SSL for all st2 APIs
@@ -125,6 +127,7 @@
125127
#
126128
class st2(
127129
$version = 'present',
130+
$repository = $::st2::params::repository,
128131
$mistral_git_branch = 'st2-1.2.0',
129132
$conf_dir = $::st2::params::conf_dir,
130133
$conf_file = "${::st2::params::conf_dir}/st2.conf",

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
$api_port = 9101
4949

5050
# Non-user configurable parameters
51+
$repository = 'stable'
5152
$conf_dir = '/etc/st2'
5253
$datstore_keys_dir = "${conf_dir}/keys"
5354

manifests/profile/repos.pp

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
# == Class: st2::profile::python
1+
# @summary Manages the installation of st2 required repos for installing the StackStorm packages.
22
#
3-
# Installation of st2 required repos
3+
# @example Basic usage
4+
# include ::st2::profile::repos
45
#
5-
# === Parameters
6+
# @example Installing from unstable
7+
# class { '::st2::profile::repos':
8+
# repository => 'unstable',
9+
# }
610
#
7-
# This module contains no parameters
8-
#
9-
# === Variables
10-
#
11-
# This module contains no variables
12-
#
13-
# === Examples
14-
#
15-
# include st2::profile::repos
11+
# @param repository
12+
# Release repository to enable. Options: 'stable', 'unstable'.
13+
# @param package_type
14+
# Type of package management system used for repo. Options: 'rpm', 'deb'
1615
#
1716
class st2::profile::repos(
18-
$package_type = $st2::params::package_type
19-
) {
17+
$repository = $::st2::repository,
18+
$package_type = $::st2::params::package_type,
19+
) inherits st2 {
2020
require ::packagecloud
2121

2222
if $::osfamily == 'RedHat' {
2323
require ::epel
2424
}
25-
packagecloud::repo { 'StackStorm/stable':
25+
$_packagecloud_repo = "StackStorm/${repository}"
26+
packagecloud::repo { $_packagecloud_repo:
2627
type => $package_type,
2728
}
2829

@@ -34,7 +35,7 @@
3435
command => 'rm -rf /var/lib/apt/lists/*; apt-get update',
3536
path => ['/usr/bin/', '/bin/'],
3637
refreshonly => true,
37-
subscribe => Packagecloud::Repo['StackStorm/stable'],
38+
subscribe => Packagecloud::Repo[$_packagecloud_repo],
3839
}
3940
}
4041
}

0 commit comments

Comments
 (0)