Added RabbitMQ to StoryBoard
In order to support subscriptions in StoryBoard, we're adding a queueing system to support triggered events. The specification in question is #95307, which goes into detail on the various different options evaluated. I also anticipate that this system can be used for report generation. Change-Id: Ia4cc91f1e75365a9fb41ca163e55548023233412 Story: 96
This commit is contained in:
parent
e4857b1a70
commit
fb38fa63b3
@ -10,6 +10,7 @@ project_page 'https://github.com/openstack-ci/puppet-storyboard'
|
|||||||
## Add dependencies, if any:
|
## Add dependencies, if any:
|
||||||
dependency 'puppetlabs/mysql', '= 0.6.1'
|
dependency 'puppetlabs/mysql', '= 0.6.1'
|
||||||
dependency 'puppetlabs/apache', '= 0.0.4'
|
dependency 'puppetlabs/apache', '= 0.0.4'
|
||||||
|
dependency 'puppetlabs/rabbitmq', '= 4.0.0'
|
||||||
dependency 'example42/puppi', '= 2.1.9'
|
dependency 'example42/puppi', '= 2.1.9'
|
||||||
dependency 'openstackci/vcsrepo', '= 0.0.8'
|
dependency 'openstackci/vcsrepo', '= 0.0.8'
|
||||||
dependency 'stankevich/python', '= 1.6.6'
|
dependency 'stankevich/python', '= 1.6.6'
|
66
README.md
66
README.md
@ -28,22 +28,26 @@ A module that installs a standalone instance of StoryBoard.
|
|||||||
|
|
||||||
The standalone StoryBoard module will install a fully functional, independent
|
The standalone StoryBoard module will install a fully functional, independent
|
||||||
instance of StoryBoard on your node. It includes a local instance of mysql,
|
instance of StoryBoard on your node. It includes a local instance of mysql,
|
||||||
an HTTPS vhost using the apache snakeoil certificates, and an automatic
|
RabbitMQ, an HTTPS vhost using the apache snakeoil certificates, and an
|
||||||
redirect from http://$hostname to https://$hostname/.
|
automatic redirect from http://$hostname to https://$hostname/.
|
||||||
|
|
||||||
node default {
|
node default {
|
||||||
class { 'storyboard':
|
class { 'storyboard':
|
||||||
mysql_database => 'storyboard',
|
mysql_database => 'storyboard',
|
||||||
mysql_user => 'storyboard',
|
mysql_user => 'storyboard',
|
||||||
mysql_user_password => 'changeme',
|
mysql_user_password => 'changeme',
|
||||||
hostname => ::fqdn,
|
|
||||||
openid_url => 'https://login.launchpad.net/+openid',
|
rabbitmq_user => 'storyboard',
|
||||||
ssl_cert_file => '/etc/ssl/certs/ssl-cert-snakeoil.pem',
|
rabbitmq_user_password => 'changemetoo',
|
||||||
ssl_cert_content => undef,
|
|
||||||
ssl_key_file => '/etc/ssl/private/ssl-cert-snakeoil.key',
|
hostname => ::fqdn,
|
||||||
ssl_key_content => undef,
|
openid_url => 'https://login.launchpad.net/+openid',
|
||||||
ssl_ca_file => undef,
|
ssl_cert_file => '/etc/ssl/certs/ssl-cert-snakeoil.pem',
|
||||||
ssl_ca_content => undef
|
ssl_cert_content => undef,
|
||||||
|
ssl_key_file => '/etc/ssl/private/ssl-cert-snakeoil.key',
|
||||||
|
ssl_key_content => undef,
|
||||||
|
ssl_ca_file => undef,
|
||||||
|
ssl_ca_content => undef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,14 +115,34 @@ and adjust the apache vhost accordingly.
|
|||||||
hostname => ::fqdn,
|
hostname => ::fqdn,
|
||||||
|
|
||||||
# storyboard.conf parameters
|
# storyboard.conf parameters
|
||||||
access_token_ttl => 3600,
|
access_token_ttl => 3600,
|
||||||
refresh_token_ttl => 604800,
|
refresh_token_ttl => 604800,
|
||||||
openid_url => 'https://login.launchpad.net/+openid',
|
openid_url => 'https://login.launchpad.net/+openid',
|
||||||
mysql_host => 'localhost',
|
mysql_host => 'localhost',
|
||||||
mysql_port => 3306,
|
mysql_port => 3306,
|
||||||
mysql_database => 'storyboard',
|
mysql_database => 'storyboard',
|
||||||
mysql_user => 'storyboard',
|
mysql_user => 'storyboard',
|
||||||
mysql_user_password => 'changeme'
|
mysql_user_password => 'changeme',
|
||||||
|
|
||||||
|
rabbitmq_host => 'localhost',
|
||||||
|
rabbitmq_port => 5672,
|
||||||
|
rabbitmq_vhost => '/',
|
||||||
|
rabbitmq_user => 'storyboard',
|
||||||
|
rabbitmq_user_password => 'changemetoo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
## ::storyboard::rabbit
|
||||||
|
This module installs StoryBoard's RabbitMQ instance.
|
||||||
|
|
||||||
|
In order to handle subscriptions, emails, and reporting, storyboard uses
|
||||||
|
rabbitmq for deferred processing. This module installs a standalone, local
|
||||||
|
instance of rabbit.
|
||||||
|
|
||||||
|
node default {
|
||||||
|
class { 'storyboard::rabbit':
|
||||||
|
rabbitmq_user => 'storyboard',
|
||||||
|
rabbitmq_user_password => 'changeme'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,19 +21,25 @@
|
|||||||
class storyboard::application (
|
class storyboard::application (
|
||||||
|
|
||||||
# Installation parameters
|
# Installation parameters
|
||||||
$www_root = '/var/lib/storyboard/www',
|
$www_root = '/var/lib/storyboard/www',
|
||||||
$server_admin = undef,
|
$server_admin = undef,
|
||||||
$hostname = $::fqdn,
|
$hostname = $::fqdn,
|
||||||
|
|
||||||
# storyboard.conf parameters
|
# storyboard.conf parameters
|
||||||
$access_token_ttl = 3600,
|
$access_token_ttl = 3600,
|
||||||
$refresh_token_ttl = 604800,
|
$refresh_token_ttl = 604800,
|
||||||
$openid_url,
|
$openid_url,
|
||||||
$mysql_host = 'localhost',
|
$mysql_host = 'localhost',
|
||||||
$mysql_port = 3306,
|
$mysql_port = 3306,
|
||||||
$mysql_database = 'storyboard',
|
$mysql_database = 'storyboard',
|
||||||
$mysql_user = 'storyboard',
|
$mysql_user = 'storyboard',
|
||||||
$mysql_user_password = 'changeme',
|
$mysql_user_password = 'changeme',
|
||||||
|
|
||||||
|
$rabbitmq_host = 'localhost',
|
||||||
|
$rabbitmq_port = 5672,
|
||||||
|
$rabbitmq_vhost = '/',
|
||||||
|
$rabbitmq_user = 'storyboard',
|
||||||
|
$rabbitmq_user_password = 'changemetoo'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
@ -23,6 +23,10 @@ class storyboard (
|
|||||||
$mysql_database = 'storyboard',
|
$mysql_database = 'storyboard',
|
||||||
$mysql_user = 'storyboard',
|
$mysql_user = 'storyboard',
|
||||||
$mysql_user_password = 'changeme',
|
$mysql_user_password = 'changeme',
|
||||||
|
|
||||||
|
$rabbitmq_user = 'storyboard',
|
||||||
|
$rabbitmq_user_password = 'changemetoo',
|
||||||
|
|
||||||
$hostname = $::fqdn,
|
$hostname = $::fqdn,
|
||||||
$openid_url = 'https://login.launchpad.net/+openid',
|
$openid_url = 'https://login.launchpad.net/+openid',
|
||||||
|
|
||||||
@ -43,6 +47,11 @@ class storyboard (
|
|||||||
ssl_ca_content => $ssl_ca_content,
|
ssl_ca_content => $ssl_ca_content,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class { '::storyboard::rabbit':
|
||||||
|
rabbitmq_user => $rabbitmq_user,
|
||||||
|
rabbitmq_user_password => $rabbitmq_user_password
|
||||||
|
}
|
||||||
|
|
||||||
class { '::storyboard::mysql':
|
class { '::storyboard::mysql':
|
||||||
mysql_database => $mysql_database,
|
mysql_database => $mysql_database,
|
||||||
mysql_user => $mysql_user,
|
mysql_user => $mysql_user,
|
||||||
@ -50,12 +59,15 @@ class storyboard (
|
|||||||
}
|
}
|
||||||
|
|
||||||
class { '::storyboard::application':
|
class { '::storyboard::application':
|
||||||
hostname => $hostname,
|
hostname => $hostname,
|
||||||
openid_url => $openid_url,
|
openid_url => $openid_url,
|
||||||
mysql_host => 'localhost',
|
mysql_host => 'localhost',
|
||||||
mysql_port => 3306,
|
mysql_port => 3306,
|
||||||
mysql_database => $mysql_database,
|
mysql_database => $mysql_database,
|
||||||
mysql_user => $mysql_user,
|
mysql_user => $mysql_user,
|
||||||
mysql_user_password => $mysql_user_password,
|
mysql_user_password => $mysql_user_password,
|
||||||
|
|
||||||
|
rabbitmq_user => $rabbitmq_user,
|
||||||
|
rabbitmq_user_password => $rabbitmq_user_password
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
41
manifests/rabbit.pp
Normal file
41
manifests/rabbit.pp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# == Class: storyboard::rabbit
|
||||||
|
#
|
||||||
|
# The StoryBoard Rabbit manifest installs a standalone rabbitmq instance
|
||||||
|
# which is used to handle deferred processing and reporting tasks for
|
||||||
|
# StoryBoard.
|
||||||
|
#
|
||||||
|
class storyboard::rabbit (
|
||||||
|
$rabbitmq_user = 'storyboard',
|
||||||
|
$rabbitmq_user_password = 'changeme'
|
||||||
|
) {
|
||||||
|
|
||||||
|
class { 'rabbitmq':
|
||||||
|
service_manage => true,
|
||||||
|
delete_guest_user => true
|
||||||
|
}
|
||||||
|
|
||||||
|
rabbitmq_user { $rabbitmq_user:
|
||||||
|
password => $rabbitmq_user_password
|
||||||
|
}
|
||||||
|
|
||||||
|
rabbitmq_user_permissions { "${rabbitmq_user}@/":
|
||||||
|
configure_permission => '.*',
|
||||||
|
read_permission => '.*',
|
||||||
|
write_permission => '.*',
|
||||||
|
require => Rabbitmq_user[$rabbitmq_user]
|
||||||
|
}
|
||||||
|
}
|
@ -46,6 +46,10 @@ refresh_token_ttl = <%= @refresh_token_ttl %>
|
|||||||
# page_size_maximum = 500
|
# page_size_maximum = 500
|
||||||
# page_size_default = 20
|
# page_size_default = 20
|
||||||
|
|
||||||
|
# Enable notifications. This feature drives deferred processing, reporting,
|
||||||
|
# and subscriptions.
|
||||||
|
enable_notifications = True
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
# This line MUST be changed to actually run storyboard
|
# This line MUST be changed to actually run storyboard
|
||||||
# Example:
|
# Example:
|
||||||
@ -85,3 +89,23 @@ connection=mysql://<%= @mysql_user %>:<%= @mysql_user_password %>@<%= @mysql_hos
|
|||||||
|
|
||||||
# If set, use this value for pool_timeout with sqlalchemy
|
# If set, use this value for pool_timeout with sqlalchemy
|
||||||
# pool_timeout = 10
|
# pool_timeout = 10
|
||||||
|
|
||||||
|
[notifications]
|
||||||
|
|
||||||
|
# Host of the rabbitmq server.
|
||||||
|
rabbit_host=<%= @rabbitmq_host %>
|
||||||
|
|
||||||
|
# The RabbitMQ login method
|
||||||
|
rabbit_login_method = AMQPLAIN
|
||||||
|
|
||||||
|
# The RabbitMQ userid.
|
||||||
|
rabbit_userid = <%= @rabbitmq_user %>
|
||||||
|
|
||||||
|
# The RabbitMQ password.
|
||||||
|
rabbit_password = <%= @rabbitmq_user_password %>
|
||||||
|
|
||||||
|
# The RabbitMQ broker port where a single node is used.
|
||||||
|
rabbit_port = <%= @rabbitmq_port %>
|
||||||
|
|
||||||
|
# The virtual host within which our queues and exchanges live.
|
||||||
|
rabbit_virtual_host = <%= @rabbitmq_vhost %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user