From 2d2f125f40f04066e4a63e811de465260700be1c Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 30 Aug 2016 18:26:43 -0400 Subject: [PATCH] Add lpmqtt to firehose deployments This commit adds deploying a running lpmqtt to firehose nodes. Change-Id: Ia9d659e282a2a992b8c1a7a48577f3e59793effa Depends-On: I613330e2bff2e6fe1cacd7e53f3c189584978ea2 --- doc/source/firehose.rst | 23 +++++++++++++++++-- manifests/site.pp | 3 +++ modules.env | 1 + .../openstack_project/manifests/firehose.pp | 13 +++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/doc/source/firehose.rst b/doc/source/firehose.rst index c4f34ead04..1ed45ba608 100644 --- a/doc/source/firehose.rst +++ b/doc/source/firehose.rst @@ -15,10 +15,12 @@ At a Glance :Puppet: * https://git.openstack.org/cgit/openstack-infra/puppet-mosquitto * https://git.openstack.org/cgit/openstack-infra/puppet-germqtt - * :file:`modules/openstack_project/manifests/firehose.pp` + * https://git.openstack.org/cgit/openstack-infra/puppet-lpmqtt + * :file:`modules/openstack_project/manifests/firehose.pp` :Projects: * https://mosquitto.org/ * http://git.openstack.org/cgit/openstack-infra/germqtt/ + * http://git.openstack.org/cgit/openstack-infra/lpmqtt/ Overview ======== @@ -30,7 +32,7 @@ to go for consuming them. firehose.openstack.org hosts an instance of Mosquitto to be the MQTT broker and also locally runs an instance of germqtt to publish the gerrit event -stream over MQTT. +stream over MQTT and lpmqtt to publish a launchpad event stream over MQTT. Connection Info --------------- @@ -57,6 +59,23 @@ hierarchy. `[1]`_ .. _[1]: https://mosquitto.org/man/mqtt-7.html +Services Publishing to firehose +------------------------------- + +As of right now the following services publish messages to the firehose: + ++-----------+------------+--------------------+ +| Service | Base Topic | Source of Messages | ++===========+============+====================+ +| gerrit | gerrit | `germqtt`_ | ++-----------+------------+--------------------+ +| launchpad | launchpad | `lpmqtt`_ | ++-----------+------------+--------------------+ + +.. _germqtt: http://git.openstack.org/cgit/openstack-infra/germqtt/ +.. _lpmqtt: http://git.openstack.org/cgit/openstack-infra/lpmqtt/ + + Client Usage ============ There is no outside access to publishing messages to the firehose available, diff --git a/manifests/site.pp b/manifests/site.pp index ab10f66b2d..e262a0c32b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -505,6 +505,9 @@ node /^firehose\d+\.openstack\.org$/ { ca_file => hiera('mosquitto_tls_ca_file'), cert_file => hiera('mosquitto_tls_server_cert_file'), key_file => hiera('mosquitto_tls_server_key_file'), + imap_hostname => hiera('lpmqtt_imap_server'), + imap_username => hiera('lpmqtt_imap_username'), + imap_password => hiera('lpmqtt_imap_password'), } } diff --git a/modules.env b/modules.env index bfc5bc7945..d073ee1488 100644 --- a/modules.env +++ b/modules.env @@ -121,6 +121,7 @@ INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-lodgeit"]="origi INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-log_processor"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-logrotate"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-logstash"]="origin/master" +INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-lpmqtt"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-mailman"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-mediawiki"]="origin/master" INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-meetbot"]="origin/master" diff --git a/modules/openstack_project/manifests/firehose.pp b/modules/openstack_project/manifests/firehose.pp index a66d20c865..49fafe6c53 100644 --- a/modules/openstack_project/manifests/firehose.pp +++ b/modules/openstack_project/manifests/firehose.pp @@ -20,6 +20,9 @@ class openstack_project::firehose ( $gerrit_public_key, $gerrit_private_key, $gerrit_ssh_host_key, + $imap_username, + $imap_hostname, + $imap_password, $mqtt_hostname = 'firehose01.openstack.org', $mqtt_password, $mqtt_username = 'infra', @@ -72,4 +75,14 @@ class openstack_project::firehose ( ], require => Package['cyrus-imapd'], } + + include lpmqtt + class {'lpmqtt::server': + mqtt_username => $mqtt_username, + mqtt_password => $mqtt_password, + imap_hostname => $imap_hostname, + imap_username => $imap_username, + imap_password => $imap_password, + imap_use_ssl => true, + } }