Enable rabbitmq_management plugin

Enable the RabbitMQ managment plugin. RabbitMQ managment
will listen on localhost (127.0.0.1) only.

NOTE: This depend on this upstream change:
  https://github.com/voxpupuli/puppet-rabbitmq/pull/777

Also to optimize for performance:
 - Disables message rates in the management plugin.
 - Raises the collect_statistics_interval from 5000ms to
   30000ms.

NB: Cherry-pick was not clean so I tested this manually on queens
and got the expected result:
~]# pcs status |grep -e 'rabbitmq.*Started'
  rabbitmq-bundle-0    (ocf:💓rabbitmq-cluster):      Started controller-0
  rabbitmq-bundle-1    (ocf:💓rabbitmq-cluster):      Started controller-1
  rabbitmq-bundle-2    (ocf:💓rabbitmq-cluster):      Started controller-2

~]# curl -sS  -u guest:$(hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass) http://127.0.0.1:15672/api/queues/ 2> /dev/null  |jq . |head -n5
[
  {
    "memory": 10936,
    "idle_since": "2019-08-08 8:49:23",
    "consumer_utilisation": null,

Related-Bug: #1815675
Change-Id: I5e73660e23fef15d1cae4c89d8b45b2456b0a110
(cherry-picked from commit d6727aff73
This commit is contained in:
Michele Baldessari 2019-08-07 10:31:39 +02:00
parent 305e280cab
commit 04b83ec504
2 changed files with 12 additions and 0 deletions

View File

@ -156,6 +156,12 @@ outputs:
# TODO(jaosorior): Remove this once we set a proper default in
# puppet-tripleo
tripleo::profile::base::rabbitmq::enable_internal_tls: {get_param: EnableInternalTLS}
rabbitmq::collect_statistics_interval: 30000
rabbitmq::management_enable: true
rabbitmq::use_config_file_for_plugins: true
rabbitmq::management_ip_address: 127.0.0.1
rabbitmq::config_management_variables:
rates_mode: none
-
if:
- internal_tls_enabled

View File

@ -0,0 +1,6 @@
---
features:
- |
The RabbitMQ management plugin (``rabbitmq_management``) is now enabled.
By default RabbitMQ managment is available on port 15672 on the localhost
(``127.0.0.1``) interface.