Update rabbitmq confs and ports

Cleanup all options in the rabbitmq confs. Allow all ports to be
configurable.

Change-Id: I9b3b485a4f3a25d20c0f19d13638f717daa169dc
Partially-Implements: blueprint update-configs
This commit is contained in:
Sam Yaple 2015-08-10 05:02:25 +00:00
parent 96b8d86ca5
commit 3a78bbdef0
4 changed files with 19 additions and 7 deletions

View File

@ -29,11 +29,15 @@ listen mariadb
listen rabbitmq
mode tcp
option tcpka
# TODO(SamYaple): Make rabbitmq port configurable throughout Ansible
bind {{ kolla_internal_address }}:5672
bind {{ kolla_internal_address }}:{{ rabbitmq_port }}
{% for host in groups['rabbitmq'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:5672 check inter 2000 rise 2 fall 5
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }} check inter 2000 rise 2 fall 5
{% endfor %}
listen rabbitmq_management
bind {{ kolla_internal_address }}:{{ rabbitmq_management_port }}
{% for host in groups['rabbitmq'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_management_port }} check inter 2000 rise 2 fall 5
{% endfor %}
listen keystone_public

View File

@ -1,2 +1,3 @@
RABBITMQ_NODENAME=rabbit
export ERL_EPMD_ADDRESS={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
export ERL_EPMD_PORT={{ rabbitmq_epmd_port }}

View File

@ -1,10 +1,12 @@
[
{kernel, [
{inet_dist_use_interface, {% raw %}{{% endraw %}{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] | regex_replace('\.', ',') }}}}
{inet_dist_use_interface, {% raw %}{{% endraw %}{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] | regex_replace('\.', ',') }}}},
{inet_dist_listen_min, {{ rabbitmq_cluster_port }}},
{inet_dist_listen_max, {{ rabbitmq_cluster_port }}}
]},
{rabbit, [
{tcp_listeners, [
{"{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}", 5672}
{"{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}", {{ rabbitmq_port }}}
]},
{default_user, <<"{{ rabbitmq_user }}">>},
{default_pass, <<"{{ rabbitmq_password }}">>},
@ -17,7 +19,7 @@
{rabbitmq_management, [
{listener, [
{ip, "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"},
{port, 15672}
{port, {{ rabbitmq_management_port }}}
]}
]}
].

View File

@ -23,6 +23,11 @@ node_config_directory: "/opt/kolla/config"
# the different services. This prevents setting the ports in the defaults for
# each role.
rabbitmq_port: "5672"
rabbitmq_management_port: "15672"
rabbitmq_cluster_port: "25672"
rabbitmq_epmd_port: "4369"
keystone_public_port: "5000"
keystone_admin_port: "35357"