diff --git a/servers/puppet/modules/zulip/files/rabbitmq/rabbitmq-server b/servers/puppet/modules/zulip/files/rabbitmq/rabbitmq-server new file mode 100644 index 0000000000..a1c281b888 --- /dev/null +++ b/servers/puppet/modules/zulip/files/rabbitmq/rabbitmq-server @@ -0,0 +1,11 @@ +# This file is sourced by /etc/init.d/rabbitmq-server. Its primary +# reason for existing is to allow adjustment of system limits for the +# rabbitmq-server process. +# +# Maximum number of open file handles. This will need to be increased +# to handle many simultaneous connections. Refer to the system +# documentation for ulimit (in man bash) for more information. +# +#ulimit -n 1024 + +export ERL_EPMD_ADDRESS=127.0.0.1 diff --git a/servers/puppet/modules/zulip/files/rabbitmq/rabbitmq.config b/servers/puppet/modules/zulip/files/rabbitmq/rabbitmq.config new file mode 100644 index 0000000000..07c3a5d04c --- /dev/null +++ b/servers/puppet/modules/zulip/files/rabbitmq/rabbitmq.config @@ -0,0 +1,4 @@ +[{kernel, [{inet_dist_use_interface, {127,0,0,1}}]}, + {rabbit, [{tcp_listeners, [{"127.0.0.1", 5672}]}]}, + {rabbitmq_mochiweb, [{listeners, [{mgmt, [{ip, "127.0.0.1"}, + {port, 55672}]}]}]}]. diff --git a/servers/puppet/modules/zulip/manifests/rabbit.pp b/servers/puppet/modules/zulip/manifests/rabbit.pp index 9b3e93469a..7de7691d67 100644 --- a/servers/puppet/modules/zulip/manifests/rabbit.pp +++ b/servers/puppet/modules/zulip/manifests/rabbit.pp @@ -19,5 +19,23 @@ class zulip::rabbit { source => "puppet:///modules/zulip/cron.d/rabbitmq-numconsumers", } + file { "/etc/default/rabbitmq-server": + require => Package[rabbitmq-server], + ensure => file, + owner => "root", + group => "root", + mode => 644, + source => "puppet:///modules/zulip/rabbitmq/rabbitmq-server", + } + + file { "/etc/rabbitmq/rabbitmq.config": + require => Package[rabbitmq-server], + ensure => file, + owner => "root", + group => "root", + mode => 644, + source => "puppet:///modules/zulip/rabbitmq/rabbitmq.config", + } + # TODO: Should also call exactly once "servers/configure-rabbitmq" }