Remove vip for rabbitmq

Adjust all the configs to list all the rabbitmq hosts rather than
running rabbitmq through the VIP. This is made possible by clusterer
which has already merged.

Change-Id: I5db48f5f10ec68f4c8863a29bc13984f6845a4f9
Partially-Implements: blueprint rabbitmq-clusterer
This commit is contained in:
Sam Yaple 2015-10-16 07:58:34 +00:00
parent 32006d8149
commit 347730cec8
16 changed files with 124 additions and 45 deletions

View File

@ -1,6 +1,12 @@
--- ---
- include: ceph.yml - include: ceph.yml
when: enable_ceph | bool when:
- enable_ceph | bool
- inventory_hostname in groups['ceph-mon'] or
inventory_hostname in groups['cinder-api'] or
inventory_hostname in groups['cinder-volume'] or
inventory_hostname in groups['cinder-scheduler'] or
inventory_hostname in groups['cinder-backup']
- include: register.yml - include: register.yml
when: inventory_hostname in groups['cinder-api'] or when: inventory_hostname in groups['cinder-api'] or

View File

@ -59,8 +59,9 @@ lock_path = /var/lib/cinder/tmp
[oslo_messaging_rabbit] [oslo_messaging_rabbit]
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_host = {{ kolla_internal_address }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if cinder_volume_driver == "lvm" %} {% if cinder_volume_driver == "lvm" %}
[lvmdriver-1] [lvmdriver-1]

View File

@ -1,6 +1,10 @@
--- ---
- include: ceph.yml - include: ceph.yml
when: enable_ceph | bool when:
- enable_ceph | bool
- inventory_hostname in groups['ceph-mon'] or
inventory_hostname in groups['glance-api'] or
inventory_hostname in groups['glance-registry']
- include: register.yml - include: register.yml
when: inventory_hostname in groups['glance-api'] or when: inventory_hostname in groups['glance-api'] or

View File

@ -35,14 +35,6 @@ listen mariadb
{% endif %} {% endif %}
{% if enable_rabbitmq | bool %} {% if enable_rabbitmq | bool %}
listen rabbitmq
mode tcp
option tcpka
bind {{ kolla_internal_address }}:{{ rabbitmq_port }}
{% for host in groups['rabbitmq'] %}
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 listen rabbitmq_management
bind {{ kolla_internal_address }}:{{ rabbitmq_management_port }} bind {{ kolla_internal_address }}:{{ rabbitmq_management_port }}
{% for host in groups['rabbitmq'] %} {% for host in groups['rabbitmq'] %}

View File

@ -1,8 +1,20 @@
--- ---
- include: register.yml - include: register.yml
when: inventory_hostname in groups['heat-api'] or
inventory_hostname in groups['heat-api-cfn'] or
inventory_hostname in groups['heat-engine']
- include: config.yml - include: config.yml
when: inventory_hostname in groups['heat-api'] or
inventory_hostname in groups['heat-api-cfn'] or
inventory_hostname in groups['heat-engine']
- include: bootstrap.yml - include: bootstrap.yml
when: inventory_hostname in groups['heat-api'] or
inventory_hostname in groups['heat-api-cfn'] or
inventory_hostname in groups['heat-engine']
- include: start.yml - include: start.yml
when: inventory_hostname in groups['heat-api'] or
inventory_hostname in groups['heat-api-cfn'] or
inventory_hostname in groups['heat-engine']

View File

@ -15,10 +15,10 @@ syslog_log_facility=LOG_LOCAL0
use_syslog=yes use_syslog=yes
[oslo_messaging_rabbit] [oslo_messaging_rabbit]
rabbit_host = {{ kolla_internal_address }}
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if service_name == 'heat-api' %} {% if service_name == 'heat-api' %}
[heat_api] [heat_api]

View File

@ -1,8 +1,24 @@
--- ---
- include: register.yml - include: register.yml
when: inventory_hostname in groups['ironic-api'] or
inventory_hostname in groups['ironic-conductor'] or
inventory_hostname in groups['ironic-discoverd'] or
inventory_hostname in groups['ironic-pxe']
- include: config.yml - include: config.yml
when: inventory_hostname in groups['ironic-api'] or
inventory_hostname in groups['ironic-conductor'] or
inventory_hostname in groups['ironic-discoverd'] or
inventory_hostname in groups['ironic-pxe']
- include: bootstrap.yml - include: bootstrap.yml
when: inventory_hostname in groups['ironic-api'] or
inventory_hostname in groups['ironic-conductor'] or
inventory_hostname in groups['ironic-discoverd'] or
inventory_hostname in groups['ironic-pxe']
- include: start.yml - include: start.yml
when: inventory_hostname in groups['ironic-api'] or
inventory_hostname in groups['ironic-conductor'] or
inventory_hostname in groups['ironic-discoverd'] or
inventory_hostname in groups['ironic-pxe']

View File

@ -24,7 +24,7 @@ glance_host = {{ kolla_internal_address }}
url = http://{{ kolla_internal_address }}:{{ neutron_server_port }} url = http://{{ kolla_internal_address }}:{{ neutron_server_port }}
[oslo_messaging_rabbit] [oslo_messaging_rabbit]
rabbit_host = {{ kolla_internal_address }}
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}

View File

@ -1,8 +1,16 @@
--- ---
- include: register.yml - include: register.yml
when: inventory_hostname in groups['murano-api'] or
inventory_hostname in groups['murano-engine']
- include: config.yml - include: config.yml
when: inventory_hostname in groups['murano-api'] or
inventory_hostname in groups['murano-engine']
- include: bootstrap.yml - include: bootstrap.yml
when: inventory_hostname in groups['murano-api'] or
inventory_hostname in groups['murano-engine']
- include: start.yml - include: start.yml
when: inventory_hostname in groups['murano-api'] or
inventory_hostname in groups['murano-engine']

View File

@ -2,9 +2,6 @@
verbose = {{ openstack_logging_verbose }} verbose = {{ openstack_logging_verbose }}
debug = {{ openstack_logging_debug }} debug = {{ openstack_logging_debug }}
rabbit_host = {{ kolla_internal_address }}
rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }}
notification_driver = noop notification_driver = noop
use_syslog = True use_syslog = True
@ -31,9 +28,8 @@ password = {{ murano_keystone_password }}
[murano] [murano]
url = http://{{ kolla_internal_address }}:{{ murano_api_port }} url = http://{{ kolla_internal_address }}:{{ murano_api_port }}
{% if service_name == 'murano-engine' %} [oslo_messaging_rabbit]
[rabbitmq] rabbit_userid = {{ rabbitmq_user }}
host = {{ kolla_internal_address }} rabbit_password = {{ rabbitmq_password }}
login = {{ rabbitmq_user }} rabbit_ha_queues = true
password = {{ rabbitmq_password }} rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% endif %}

View File

@ -3,9 +3,21 @@
- include: ironic-check.yml - include: ironic-check.yml
- include: register.yml - include: register.yml
when: inventory_hostname in groups['compute'] or
inventory_hostname in groups['neutron-agents'] or
inventory_hostname in groups['neutron-server']
- include: config.yml - include: config.yml
when: inventory_hostname in groups['compute'] or
inventory_hostname in groups['neutron-agents'] or
inventory_hostname in groups['neutron-server']
- include: bootstrap.yml - include: bootstrap.yml
when: inventory_hostname in groups['compute'] or
inventory_hostname in groups['neutron-agents'] or
inventory_hostname in groups['neutron-server']
- include: start.yml - include: start.yml
when: inventory_hostname in groups['compute'] or
inventory_hostname in groups['neutron-agents'] or
inventory_hostname in groups['neutron-server']

View File

@ -38,10 +38,10 @@ password = {{ nova_keystone_password }}
lock_path = /var/lib/neutron/tmp lock_path = /var/lib/neutron/tmp
[oslo_messaging_rabbit] [oslo_messaging_rabbit]
rabbit_host = {{ kolla_internal_address }}
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
[agent] [agent]
root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf

View File

@ -1,35 +1,43 @@
--- ---
- include: ceph.yml - include: ceph.yml
when: enable_ceph | bool when:
- enable_ceph | bool
- inventory_hostname in groups['ceph-mon'] or
inventory_hostname in groups['compute'] or
inventory_hostname in groups['nova-api'] or
inventory_hostname in groups['nova-conductor'] or
inventory_hostname in groups['nova-consoleauth'] or
inventory_hostname in groups['nova-novncproxy'] or
inventory_hostname in groups['nova-scheduler']
- include: register.yml - include: register.yml
when: inventory_hostname in groups['nova-api'] or when: inventory_hostname in groups['compute'] or
inventory_hostname in groups['nova-consoleauth'] or inventory_hostname in groups['nova-api'] or
inventory_hostname in groups['nova-conductor'] or inventory_hostname in groups['nova-conductor'] or
inventory_hostname in groups['nova-consoleauth'] or
inventory_hostname in groups['nova-novncproxy'] or inventory_hostname in groups['nova-novncproxy'] or
inventory_hostname in groups['nova-scheduler'] or inventory_hostname in groups['nova-scheduler']
inventory_hostname in groups['compute']
- include: config.yml - include: config.yml
when: inventory_hostname in groups['nova-api'] or when: inventory_hostname in groups['compute'] or
inventory_hostname in groups['nova-consoleauth'] or inventory_hostname in groups['nova-api'] or
inventory_hostname in groups['nova-conductor'] or inventory_hostname in groups['nova-conductor'] or
inventory_hostname in groups['nova-consoleauth'] or
inventory_hostname in groups['nova-novncproxy'] or inventory_hostname in groups['nova-novncproxy'] or
inventory_hostname in groups['nova-scheduler'] or inventory_hostname in groups['nova-scheduler']
inventory_hostname in groups['compute']
- include: bootstrap.yml - include: bootstrap.yml
when: inventory_hostname in groups['nova-api'] or when: inventory_hostname in groups['compute'] or
inventory_hostname in groups['nova-consoleauth'] or inventory_hostname in groups['nova-api'] or
inventory_hostname in groups['nova-conductor'] or inventory_hostname in groups['nova-conductor'] or
inventory_hostname in groups['nova-consoleauth'] or
inventory_hostname in groups['nova-novncproxy'] or inventory_hostname in groups['nova-novncproxy'] or
inventory_hostname in groups['nova-scheduler'] or inventory_hostname in groups['nova-scheduler']
inventory_hostname in groups['compute']
- include: start.yml - include: start.yml
when: inventory_hostname in groups['nova-api'] or when: inventory_hostname in groups['compute'] or
inventory_hostname in groups['nova-consoleauth'] or inventory_hostname in groups['nova-api'] or
inventory_hostname in groups['nova-conductor'] or inventory_hostname in groups['nova-conductor'] or
inventory_hostname in groups['nova-consoleauth'] or
inventory_hostname in groups['nova-novncproxy'] or inventory_hostname in groups['nova-novncproxy'] or
inventory_hostname in groups['nova-scheduler'] or inventory_hostname in groups['nova-scheduler']
inventory_hostname in groups['compute']

View File

@ -83,10 +83,10 @@ api_endpoint = http://{{ kolla_internal_address }}:{{ ironic_api_port }}/v1
{% endif %} {% endif %}
[oslo_messaging_rabbit] [oslo_messaging_rabbit]
rabbit_host = {{ kolla_internal_address }}
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
[oslo_concurrency] [oslo_concurrency]
lock_path = /var/lib/nova/tmp lock_path = /var/lib/nova/tmp

View File

@ -1,8 +1,24 @@
--- ---
- include: register.yml - include: register.yml
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server'] or
inventory_hostname in groups['swift-proxy-server']
- include: config.yml - include: config.yml
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server'] or
inventory_hostname in groups['swift-proxy-server']
- include: bootstrap.yml - include: bootstrap.yml
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server'] or
inventory_hostname in groups['swift-proxy-server']
- include: start.yml - include: start.yml
when: inventory_hostname in groups['swift-account-server'] or
inventory_hostname in groups['swift-container-server'] or
inventory_hostname in groups['swift-object-server'] or
inventory_hostname in groups['swift-proxy-server']

View File

@ -52,6 +52,7 @@
- swift-container-server - swift-container-server
- swift-object-server - swift-object-server
- swift-proxy-server - swift-proxy-server
- rabbitmq
roles: roles:
- { role: swift, - { role: swift,
tags: swift, tags: swift,
@ -61,6 +62,7 @@
- ceph-mon - ceph-mon
- glance-api - glance-api
- glance-registry - glance-registry
- rabbitmq
roles: roles:
- { role: glance, - { role: glance,
tags: glance, tags: glance,
@ -75,6 +77,7 @@
- nova-consoleauth - nova-consoleauth
- nova-novncproxy - nova-novncproxy
- nova-scheduler - nova-scheduler
- rabbitmq
roles: roles:
- { role: nova, - { role: nova,
tags: nova, tags: nova,
@ -84,6 +87,7 @@
- compute - compute
- neutron-agents - neutron-agents
- neutron-server - neutron-server
- rabbitmq
roles: roles:
- { role: neutron, - { role: neutron,
tags: neutron, tags: neutron,
@ -95,6 +99,7 @@
- cinder-backup - cinder-backup
- cinder-scheduler - cinder-scheduler
- cinder-volume - cinder-volume
- rabbitmq
roles: roles:
- { role: cinder, - { role: cinder,
tags: cinder, tags: cinder,
@ -104,6 +109,7 @@
- heat-api - heat-api
- heat-api-cfn - heat-api-cfn
- heat-engine - heat-engine
- rabbitmq
roles: roles:
- { role: heat, - { role: heat,
tags: heat, tags: heat,
@ -118,6 +124,7 @@
- hosts: - hosts:
- murano-api - murano-api
- murano-engine - murano-engine
- rabbitmq
roles: roles:
- { role: murano, - { role: murano,
tags: murano, tags: murano,
@ -128,6 +135,7 @@
- ironic-conductor - ironic-conductor
- ironic-discoverd - ironic-discoverd
- ironic-pxe - ironic-pxe
- rabbitmq
roles: roles:
- { role: ironic, - { role: ironic,
tags: ironic, tags: ironic,