Set rabbitmq's port and IP via the config file and not the env file
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>
Wed, 14 Dec 2016 12:01:32 +0000 (14:01 +0200)
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>
Wed, 14 Dec 2016 12:06:21 +0000 (14:06 +0200)
The RabbitMQ's puppet manifest configures the node's IP and port through
environment variables. While this would usually be fine, it doesn't
allow us to use TLS-only, since it will always try to start a TCP
listener. So, by setting these values through the config file, when
setting ssl_only for rabbitmq, they will effectively be discarded and
thus allow us to use an SSL listener on the same port.

Change-Id: I33d051a8c740baf69b99517378e1f9b0f3cc1681

puppet/services/rabbitmq.yaml

index b77e0a9..08f3f6b 100644 (file)
@@ -73,6 +73,8 @@ outputs:
         rabbitmq::repos_ensure: false
         rabbitmq::tcp_keepalive: true
         rabbitmq_environment:
+          NODE_PORT: ''
+          NODE_IP_ADDRESS: ''
           RABBITMQ_NODENAME: "rabbit@%{::hostname}"
           RABBITMQ_SERVER_ERL_ARGS: '"+K true +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]"'
         rabbitmq_kernel_variables:
@@ -95,7 +97,7 @@ outputs:
         # internal_api -> IP
         # internal_api_uri -> [IP]
         # internal_api_subnet - > IP/CIDR
-        rabbitmq::node_ip_address: {get_param: [ServiceNetMap, RabbitmqNetwork]}
+        rabbitmq::interface: {get_param: [ServiceNetMap, RabbitmqNetwork]}
         rabbitmq::nr_ha_queues: {get_param: RabbitHAQueues}
       step_config: |
         include ::tripleo::profile::base::rabbitmq