From 7c45912e9fba6eabd8a8d82140102de2e764e3d9 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 13 Sep 2016 16:15:56 -0400 Subject: [PATCH] Add email servers to firehose A requirement for running lpmqtt is to have an imap server that is subscribed to launchpad notifications to use as a source for the event stream. However there is no preexisting imap server setup anywhere to use for this. This commit deploys the necessary components for the imap server. Setting up the launchpad user and the subscription will be a manual process. Change-Id: I063ac9da89d227ac59ca1cb8765e3615d7bfdbba --- manifests/site.pp | 4 ++- .../openstack_project/manifests/firehose.pp | 27 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/manifests/site.pp b/manifests/site.pp index 3bf096ccb0..ab10f66b2d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -492,10 +492,12 @@ node /^elasticsearch0[1-7]\.openstack\.org$/ { # Node-OS: xenial node /^firehose\d+\.openstack\.org$/ { class { 'openstack_project::server': - iptables_public_tcp_ports => [22, 80, 1883, 8080, 8883], + iptables_public_tcp_ports => [22, 25, 80, 143, 993, 1883, 8080, 8883], sysadmins => hiera('sysadmins', []), + manage_exim => false, } class { 'openstack_project::firehose': + sysadmins => hiera('sysadmins', []), gerrit_ssh_host_key => hiera('gerrit_ssh_rsa_pubkey_contents'), gerrit_public_key => hiera('germqtt_gerrit_ssh_public_key'), gerrit_private_key => hiera('germqtt_gerrit_ssh_private_key'), diff --git a/modules/openstack_project/manifests/firehose.pp b/modules/openstack_project/manifests/firehose.pp index 49418cff34..a66d20c865 100644 --- a/modules/openstack_project/manifests/firehose.pp +++ b/modules/openstack_project/manifests/firehose.pp @@ -15,6 +15,7 @@ # firehose glue class. # class openstack_project::firehose ( + $sysadmins = [], $gerrit_username = 'germqtt', $gerrit_public_key, $gerrit_private_key, @@ -45,4 +46,30 @@ class openstack_project::firehose ( mqtt_username => $mqtt_username, mqtt_password => $mqtt_password, } + + package {'cyrus-imapd': + ensure => latest, + } + + class {'::exim': + sysadmins => $sysadmins, + routers => [ + {'cyrus' => { + 'driver' => 'accept', + 'domains' => '+local_domains', + 'local_part_suffix' => '+*', + 'local_part_suffix_optional' => true, + 'transport' => 'cyrus', + }} + ], + transports => [ + {'cyrus' => { + 'driver' => 'lmtp', + 'socket' => '/var/run/cyrus/socket/lmtp', + 'user' => 'cyrus', + 'batch_max' => '35', + }} + ], + require => Package['cyrus-imapd'], + } }