From 956fd7c420b4a725b982ba565d92f4907064a57a Mon Sep 17 00:00:00 2001 From: Guillaume Simon Date: Wed, 30 Sep 2015 09:17:08 -0700 Subject: [PATCH] puppet: Ensure rabbitmq-server and epmd services are running. [tabbott@mit.edu: Added a few comments] --- puppet/zulip/manifests/rabbit.pp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/puppet/zulip/manifests/rabbit.pp b/puppet/zulip/manifests/rabbit.pp index ccf451432a..eeac6f3c7d 100644 --- a/puppet/zulip/manifests/rabbit.pp +++ b/puppet/zulip/manifests/rabbit.pp @@ -1,5 +1,6 @@ class zulip::rabbit { $rabbit_packages = [# Needed to run rabbitmq + "erlang-base", "rabbitmq-server", ] package { $rabbit_packages: ensure => "installed" } @@ -39,5 +40,21 @@ class zulip::rabbit { source => "puppet:///modules/zulip/rabbitmq/rabbitmq.config", } + # epmd doesn't have an init script. This won't leak epmd processes + # because epmd checks if one is already running and exits if so. + # + # TODO: Ideally we'd still check if it's already running to keep the + # puppet log for what is being changed clean + exec { "epmd": + command => "epmd -daemon", + require => Package[erlang-base], + path => "/usr/bin/:/bin/", + } + + service { "rabbitmq-server": + ensure => running, + require => Exec["epmd"], + } + # TODO: Should also call exactly once "configure-rabbitmq" }