From fd1d3af0df8b31a09e6c9cc22e77f31b0e645a63 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Mon, 29 May 2017 18:14:06 -0400 Subject: [PATCH] Add support for hybrid messaging backends This commit separates the messaging rpc and notify transports in order to support separate and different oslo.messaging backends This patch: * add rpc and notify variables * update service role conf templates * add example to globals.yaml * add release note Implements: blueprint hybrid-messaging Change-Id: I34691c2895c8563f1f322f0850ecff98d11b5185 --- ansible/group_vars/all.yml | 27 ++++++++++++++++--- ansible/roles/aodh/templates/aodh.conf.j2 | 5 +++- .../roles/barbican/templates/barbican.conf.j2 | 5 +++- .../ceilometer/templates/ceilometer.conf.j2 | 5 +++- ansible/roles/cinder/templates/cinder.conf.j2 | 3 ++- .../cloudkitty/templates/cloudkitty.conf.j2 | 2 +- .../roles/congress/templates/congress.conf.j2 | 5 +++- .../designate/templates/designate.conf.j2 | 3 ++- .../roles/glance/templates/glance-api.conf.j2 | 3 ++- .../glance/templates/glance-registry.conf.j2 | 3 ++- ansible/roles/heat/templates/heat.conf.j2 | 3 ++- ansible/roles/ironic/templates/ironic.conf.j2 | 5 +++- ansible/roles/karbor/templates/karbor.conf.j2 | 5 +++- .../roles/keystone/templates/keystone.conf.j2 | 6 +++-- ansible/roles/magnum/templates/magnum.conf.j2 | 3 ++- ansible/roles/manila/templates/manila.conf.j2 | 5 +++- .../roles/mistral/templates/mistral.conf.j2 | 3 ++- ansible/roles/murano/templates/murano.conf.j2 | 3 ++- .../roles/neutron/templates/neutron.conf.j2 | 3 ++- .../templates/neutron_hyperv_agent.conf.j2 | 6 +++-- .../nova-hyperv/templates/nova_hyperv.conf.j2 | 6 +++-- ansible/roles/nova/templates/nova.conf.j2 | 3 ++- .../roles/octavia/templates/octavia.conf.j2 | 5 +++- ansible/roles/sahara/templates/sahara.conf.j2 | 3 ++- .../searchlight/templates/searchlight.conf.j2 | 6 +++-- ansible/roles/senlin/templates/senlin.conf.j2 | 3 ++- ansible/roles/solum/templates/solum.conf.j2 | 6 ++++- .../swift/templates/proxy-server.conf.j2 | 3 +-- ansible/roles/tacker/templates/tacker.conf.j2 | 3 ++- .../trove/templates/trove-conductor.conf.j2 | 5 +++- .../trove/templates/trove-taskmanager.conf.j2 | 3 ++- ansible/roles/trove/templates/trove.conf.j2 | 3 ++- .../roles/watcher/templates/watcher.conf.j2 | 5 +++- ansible/roles/zun/templates/zun.conf.j2 | 5 +++- etc/kolla/globals.yml | 12 +++++++++ ...add-hybrid-messaging-2a5eb6aae5f2c2f6.yaml | 3 +++ 36 files changed, 136 insertions(+), 41 deletions(-) create mode 100644 releasenotes/notes/add-hybrid-messaging-2a5eb6aae5f2c2f6.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index fda3a75322..114d715c95 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -123,6 +123,27 @@ keepalived_virtual_router_id: "51" ####################### es_heap_size: "1G" +################### +# Messaging options +################### +# olso.messaging rpc transport valid options are [ rabbit, amqp ] +om_rpc_transport: "rabbit" +om_rpc_user: "{{ rabbitmq_user }}" +om_rpc_password: "{{ rabbitmq_password }}" +om_rpc_port: "{{ rabbitmq_port }}" +om_rpc_group: "rabbitmq" + +rpc_transport_url: "{{ om_rpc_transport }}://{% for host in groups[om_rpc_group] %}{{ om_rpc_user }}:{{ om_rpc_password }}@{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ om_rpc_port }}{% if not loop.last %},{% endif %}{% endfor %}" + +# oslo.messaging notify transport valid options are [ rabbit ] +om_notify_transport: "rabbit" +om_notify_user: "{{ rabbitmq_user }}" +om_notify_password: "{{ rabbitmq_password }}" +om_notify_port: "{{ rabbitmq_port }}" +om_notify_group: "rabbitmq" + +notify_transport_url: "{{ om_notify_transport }}://{% for host in groups[om_notify_group] %}{{ om_notify_user }}:{{ om_notify_password }}@{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ om_notify_port }}{% if not loop.last %},{% endif %}{% endfor %}" + #################### # Networking options #################### @@ -240,7 +261,7 @@ panko_api_port: "8977" placement_api_port: "8780" -qdrouterd_port: "15676" +qdrouterd_port: "31459" rabbitmq_port: "5672" rabbitmq_management_port: "15672" @@ -343,7 +364,7 @@ enable_mariadb: "yes" enable_memcached: "yes" enable_neutron: "yes" enable_nova: "yes" -enable_rabbitmq: "yes" +enable_rabbitmq: "{{ 'yes' if om_rpc_transport == 'rabbit' or om_notify_transport == 'rabbit' else 'no' }}" enable_outward_rabbitmq: "{{ enable_murano | bool }}" # Additional optional OpenStack features and services are specified here @@ -423,7 +444,7 @@ enable_openvswitch: "{{ neutron_plugin_agent != 'linuxbridge' | bool }}" enable_ovs_dpdk: "no" enable_osprofiler: "no" enable_panko: "no" -enable_qdrouterd: "no" +enable_qdrouterd: "{{ 'yes' if om_rpc_transport == 'amqp' else 'no' }}" enable_rally: "no" enable_redis: "no" enable_sahara: "no" diff --git a/ansible/roles/aodh/templates/aodh.conf.j2 b/ansible/roles/aodh/templates/aodh.conf.j2 index 4355cf4ee2..bdd408779c 100644 --- a/ansible/roles/aodh/templates/aodh.conf.j2 +++ b/ansible/roles/aodh/templates/aodh.conf.j2 @@ -5,7 +5,7 @@ log_dir = /var/log/kolla/aodh debug = {{ aodh_logging_debug }} notification_topics = notifications -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [api] port = {{ aodh_api_port }} @@ -38,3 +38,6 @@ project_name = service project_domain_id = {{ default_project_domain_id }} user_domain_id = {{ default_user_domain_id }} auth_type = password + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/barbican/templates/barbican.conf.j2 b/ansible/roles/barbican/templates/barbican.conf.j2 index cd970bd7ba..b3328e5d4c 100644 --- a/ansible/roles/barbican/templates/barbican.conf.j2 +++ b/ansible/roles/barbican/templates/barbican.conf.j2 @@ -12,7 +12,7 @@ max_allowed_request_size_in_bytes = 1000000 db_auto_create = False sql_connection = mysql+pymysql://{{ barbican_database_user }}:{{ barbican_database_password }}@{{ barbican_database_address }}/{{ barbican_database_name }} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} # ================= Secret Store Plugin =================== [secretstore] @@ -70,3 +70,6 @@ project_name = service project_domain_id = {{ default_project_domain_id }} user_domain_id = {{ default_user_domain_id }} auth_type = password + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/ceilometer/templates/ceilometer.conf.j2 b/ansible/roles/ceilometer/templates/ceilometer.conf.j2 index 10df121e77..7b33363328 100644 --- a/ansible/roles/ceilometer/templates/ceilometer.conf.j2 +++ b/ansible/roles/ceilometer/templates/ceilometer.conf.j2 @@ -3,7 +3,7 @@ debug = {{ ceilometer_logging_debug }} log_dir = /var/log/kolla/ceilometer -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if enable_aodh | bool %} evaluation_interval = 300 @@ -49,3 +49,6 @@ insecure = {{ vmware_vcenter_insecure }} ca_file = /etc/ceilometer/vmware_ca {% endif %} {% endif %} + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 5a87c7cbed..4c577e9a52 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -57,9 +57,10 @@ api_paste_config = /etc/cinder/api-paste.ini auth_strategy = keystone -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool or enable_searchlight | bool %} driver = messagingv2 topics = notifications diff --git a/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 b/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 index 6802369a5b..45c1a6aa21 100644 --- a/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 +++ b/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 @@ -8,7 +8,7 @@ log_dir = /var/log/kolla/cloudkitty log_file = /var/log/kolla/cloudkitty/cloudkitty-api.log {% endif %} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [database] connection = mysql+pymysql://{{ cloudkitty_database_user }}:{{ cloudkitty_database_password }}@{{ cloudkitty_database_address }}/{{ cloudkitty_database_name }} diff --git a/ansible/roles/congress/templates/congress.conf.j2 b/ansible/roles/congress/templates/congress.conf.j2 index b2a10c3444..2c38293e5d 100644 --- a/ansible/roles/congress/templates/congress.conf.j2 +++ b/ansible/roles/congress/templates/congress.conf.j2 @@ -22,7 +22,7 @@ bind_host = {{ api_interface_address }} bind_port = {{ congress_api_port }} {% endif %} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [database] connection = mysql+pymysql://{{ congress_database_user }}:{{ congress_database_password }}@{{ congress_database_address }}/{{ congress_database_name }} @@ -42,5 +42,8 @@ memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcache_secret_key }} memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} + [congress] url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ congress_api_port }} diff --git a/ansible/roles/designate/templates/designate.conf.j2 b/ansible/roles/designate/templates/designate.conf.j2 index ed206052fc..11762fc3c5 100644 --- a/ansible/roles/designate/templates/designate.conf.j2 +++ b/ansible/roles/designate/templates/designate.conf.j2 @@ -4,7 +4,7 @@ debug = {{ designate_logging_debug }} log_dir = /var/log/kolla/designate -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [service:central] default_pool_id = {{ designate_pool_id }} @@ -90,6 +90,7 @@ formatv6 = '%(hostname)s.%(zone)s' formatv6 = '%(hostname)s.%(project)s.%(zone)s' [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} topics = notifications_designate driver = messagingv2 diff --git a/ansible/roles/glance/templates/glance-api.conf.j2 b/ansible/roles/glance/templates/glance-api.conf.j2 index 12d1b184db..fa8d494c49 100644 --- a/ansible/roles/glance/templates/glance-api.conf.j2 +++ b/ansible/roles/glance/templates/glance-api.conf.j2 @@ -18,7 +18,7 @@ show_multiple_locations = True cinder_catalog_info = volume:cinder:internalURL -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [database] connection = mysql+pymysql://{{ glance_database_user }}:{{ glance_database_password }}@{{ glance_database_address }}/{{ glance_database_name }} @@ -83,6 +83,7 @@ vmware_insecure = True {% endif %} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool or enable_searchlight | bool %} driver = messagingv2 {% else %} diff --git a/ansible/roles/glance/templates/glance-registry.conf.j2 b/ansible/roles/glance/templates/glance-registry.conf.j2 index eaa9d1a398..c08e207409 100644 --- a/ansible/roles/glance/templates/glance-registry.conf.j2 +++ b/ansible/roles/glance/templates/glance-registry.conf.j2 @@ -8,7 +8,7 @@ bind_host = {{ api_interface_address }} bind_port = {{ glance_registry_port }} workers = {{ openstack_service_workers }} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [database] connection = mysql+pymysql://{{ glance_database_user }}:{{ glance_database_password }}@{{ glance_database_address }}/{{ glance_database_name }} @@ -32,6 +32,7 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi flavor = keystone [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool or enable_searchlight | bool %} driver = messagingv2 {% else %} diff --git a/ansible/roles/heat/templates/heat.conf.j2 b/ansible/roles/heat/templates/heat.conf.j2 index 334717c752..317bee5ff0 100644 --- a/ansible/roles/heat/templates/heat.conf.j2 +++ b/ansible/roles/heat/templates/heat.conf.j2 @@ -20,7 +20,7 @@ trusts_delegated_roles = heat_stack_owner num_engine_workers = {{ openstack_service_workers }} {% endif %} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if service_name == 'heat-api' %} [heat_api] @@ -76,6 +76,7 @@ auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_publi auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool %} driver = messagingv2 topics = 'notifications' diff --git a/ansible/roles/ironic/templates/ironic.conf.j2 b/ansible/roles/ironic/templates/ironic.conf.j2 index 78f4983f23..e5bc320940 100644 --- a/ansible/roles/ironic/templates/ironic.conf.j2 +++ b/ansible/roles/ironic/templates/ironic.conf.j2 @@ -15,7 +15,10 @@ log_dir = /var/log/kolla/ironic enabled_drivers = pxe_ipmitool -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if service_name == 'ironic-api' %} [api] diff --git a/ansible/roles/karbor/templates/karbor.conf.j2 b/ansible/roles/karbor/templates/karbor.conf.j2 index 8e06f629e2..908cf13d0d 100644 --- a/ansible/roles/karbor/templates/karbor.conf.j2 +++ b/ansible/roles/karbor/templates/karbor.conf.j2 @@ -1,7 +1,7 @@ [DEFAULT] debug = {{ karbor_logging_debug }} log_dir = /var/log/kolla/karbor -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if service_name == 'karbor-api' %} osapi_karbor_listen = {{ api_interface_address }} @@ -42,3 +42,6 @@ password = {{ karbor_keystone_password }} memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcache_secret_key }} memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/keystone/templates/keystone.conf.j2 b/ansible/roles/keystone/templates/keystone.conf.j2 index 007fa061ce..fa6cf2a2d4 100644 --- a/ansible/roles/keystone/templates/keystone.conf.j2 +++ b/ansible/roles/keystone/templates/keystone.conf.j2 @@ -2,9 +2,10 @@ debug = {{ keystone_logging_debug }} {% if enable_cadf_notifications | bool %} notification_format = cadf -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} {% endif %} +transport_url = {{ rpc_transport_url }} + # NOTE(elemoine) log_dir alone does not work for Keystone log_file = /var/log/kolla/keystone/keystone.log use_stderr = True @@ -39,8 +40,9 @@ backend = oslo_cache.memcache_pool enabled = True memcache_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} -{% if enable_cadf_notifications | bool %} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} +{% if enable_cadf_notifications | bool %} driver = messagingv2 {% endif %} diff --git a/ansible/roles/magnum/templates/magnum.conf.j2 b/ansible/roles/magnum/templates/magnum.conf.j2 index aeec3ac564..22b8c2d8e2 100644 --- a/ansible/roles/magnum/templates/magnum.conf.j2 +++ b/ansible/roles/magnum/templates/magnum.conf.j2 @@ -5,7 +5,7 @@ log_dir = /var/log/kolla/magnum host = {{ api_interface_address }} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if service_name == 'magnum-api' %} [api] @@ -85,6 +85,7 @@ cert_manager_type = x509keypair {% endif %} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool %} driver = messaging topics = 'notifications' diff --git a/ansible/roles/manila/templates/manila.conf.j2 b/ansible/roles/manila/templates/manila.conf.j2 index e95565ea55..7bab7bfc37 100644 --- a/ansible/roles/manila/templates/manila.conf.j2 +++ b/ansible/roles/manila/templates/manila.conf.j2 @@ -17,7 +17,7 @@ auth_strategy = keystone os_region_name = {{ openstack_region_name }} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [oslo_concurrency] lock_path = /var/lib/manila/tmp @@ -39,3 +39,6 @@ password = {{ manila_keystone_password }} memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcache_secret_key }} memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/mistral/templates/mistral.conf.j2 b/ansible/roles/mistral/templates/mistral.conf.j2 index f8fda58d0b..0827e274b3 100644 --- a/ansible/roles/mistral/templates/mistral.conf.j2 +++ b/ansible/roles/mistral/templates/mistral.conf.j2 @@ -12,7 +12,7 @@ log_file = /var/log/kolla/mistral/mistral-executor.log # stderr and collected by Docker use_stderr = False -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if service_name == 'mistral-api' %} [api] @@ -54,6 +54,7 @@ os_actions_endpoint_type = internal default_region = {{ openstack_region_name }} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} driver = noop {% if enable_osprofiler | bool %} diff --git a/ansible/roles/murano/templates/murano.conf.j2 b/ansible/roles/murano/templates/murano.conf.j2 index 98f85e3e43..8b5435a979 100644 --- a/ansible/roles/murano/templates/murano.conf.j2 +++ b/ansible/roles/murano/templates/murano.conf.j2 @@ -8,7 +8,7 @@ bind_host = {{ api_interface_address }} bind_port = {{ murano_api_port }} {% endif %} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [engine] engine_workers = {{ openstack_service_workers }} @@ -38,6 +38,7 @@ url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ murano_api_port }} api_workers = {{ openstack_service_workers }} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} driver = messagingv2 {% if service_name == 'murano-engine' %} diff --git a/ansible/roles/neutron/templates/neutron.conf.j2 b/ansible/roles/neutron/templates/neutron.conf.j2 index ae5877cfae..4b5a553976 100644 --- a/ansible/roles/neutron/templates/neutron.conf.j2 +++ b/ansible/roles/neutron/templates/neutron.conf.j2 @@ -52,7 +52,7 @@ l3_ha = true max_l3_agents_per_router = {{ max_l3_agents_per_router }} {% endif %} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if enable_neutron_dvr | bool %} router_distributed = True @@ -105,6 +105,7 @@ memcache_secret_key = {{ memcache_secret_key }} memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if neutron_enabled_notification_topics %} driver = messagingv2 topics = {{ neutron_enabled_notification_topics | map(attribute='name') | join(',') }} diff --git a/ansible/roles/nova-hyperv/templates/neutron_hyperv_agent.conf.j2 b/ansible/roles/nova-hyperv/templates/neutron_hyperv_agent.conf.j2 index 218c8fe307..eae7e013c2 100644 --- a/ansible/roles/nova-hyperv/templates/neutron_hyperv_agent.conf.j2 +++ b/ansible/roles/nova-hyperv/templates/neutron_hyperv_agent.conf.j2 @@ -4,8 +4,7 @@ control_exchange = neutron rpc_backend = rabbit log_dir = C:\OpenStack\Log log_file = neutron-hyperv-agent.log -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} - +transport_url = {{ rpc_transport_url }} [AGENT] polling_interval = 2 @@ -16,3 +15,6 @@ enable_qos_extension = false [SECURITYGROUP] firewall_driver = hyperv enable_security_group = true + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/nova-hyperv/templates/nova_hyperv.conf.j2 b/ansible/roles/nova-hyperv/templates/nova_hyperv.conf.j2 index 5b327200ff..8bd7368fa9 100644 --- a/ansible/roles/nova-hyperv/templates/nova_hyperv.conf.j2 +++ b/ansible/roles/nova-hyperv/templates/nova_hyperv.conf.j2 @@ -18,8 +18,7 @@ rpc_backend = rabbit log_dir = C:\OpenStack\Log log_file = nova-compute.log force_config_drive = True -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} - +transport_url = {{ rpc_transport_url }} [placement] auth_type = password @@ -58,3 +57,6 @@ username = {{ neutron_keystone_user }} password = {{ neutron_keystone_password }} auth_url = {{ keystone_admin_url }}/v3 auth_type = v3password + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index 3279c8821a..62fa892b27 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -48,7 +48,7 @@ compute_monitors=nova.compute.monitors.cpu.virt_driver {% endif %} {% endif %} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [api] use_forwarded_for = true @@ -197,6 +197,7 @@ ca_file = /etc/nova/vmware_ca compute = auto [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if nova_enabled_notification_topics %} driver = messagingv2 topics = {{ nova_enabled_notification_topics | map(attribute='name') | join(',') }} diff --git a/ansible/roles/octavia/templates/octavia.conf.j2 b/ansible/roles/octavia/templates/octavia.conf.j2 index bf3b3d28b2..8d0aa666b1 100644 --- a/ansible/roles/octavia/templates/octavia.conf.j2 +++ b/ansible/roles/octavia/templates/octavia.conf.j2 @@ -3,7 +3,7 @@ debug = {{ octavia_logging_debug }} log_dir = /var/log/kolla/octavia -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} [api_settings] bind_host = {{ api_interface_address }} @@ -71,3 +71,6 @@ loadbalancer_topology = {{ octavia_loadbalancer_topology }} [oslo_messaging] topic = octavia_prov rpc_thread_pool_size = 2 + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/sahara/templates/sahara.conf.j2 b/ansible/roles/sahara/templates/sahara.conf.j2 index fe7affd541..f8377f5dcf 100644 --- a/ansible/roles/sahara/templates/sahara.conf.j2 +++ b/ansible/roles/sahara/templates/sahara.conf.j2 @@ -3,7 +3,7 @@ debug = {{ sahara_logging_debug }} log_dir = /var/log/kolla/sahara port = {{ sahara_api_port }} host = {{ api_interface_address }} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} use_neutron = True api_workers = {{ openstack_service_workers }} @@ -42,6 +42,7 @@ user_domain_id = {{ default_user_domain_id }} auth_type = password [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool %} driver = messagingv2 topics = 'notifications' diff --git a/ansible/roles/searchlight/templates/searchlight.conf.j2 b/ansible/roles/searchlight/templates/searchlight.conf.j2 index 0cf17833d6..cd69151b23 100644 --- a/ansible/roles/searchlight/templates/searchlight.conf.j2 +++ b/ansible/roles/searchlight/templates/searchlight.conf.j2 @@ -3,8 +3,7 @@ debug = {{ searchlight_logging_debug }} policy_file = /etc/searchlight/policy.json log_dir = /var/log/kolla/searchlight -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} - +transport_url = {{ rpc_transport_url }} [api] port = {{ searchlight_api_port }} @@ -36,6 +35,9 @@ memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcache_secret_key }} memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} + [service_credentials] auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }} auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} diff --git a/ansible/roles/senlin/templates/senlin.conf.j2 b/ansible/roles/senlin/templates/senlin.conf.j2 index 0c116cbe46..0feb603038 100644 --- a/ansible/roles/senlin/templates/senlin.conf.j2 +++ b/ansible/roles/senlin/templates/senlin.conf.j2 @@ -7,7 +7,7 @@ log_dir = /var/log/kolla/senlin num_engine_workers = {{ openstack_service_workers }} {% endif %} -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if service_name == 'senlin-api' %} [senlin_api] @@ -44,6 +44,7 @@ memcache_secret_key = {{ memcache_secret_key }} memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool %} driver = messagingv2 topics = 'notifications' diff --git a/ansible/roles/solum/templates/solum.conf.j2 b/ansible/roles/solum/templates/solum.conf.j2 index ce1ce1faf0..116cc8332d 100644 --- a/ansible/roles/solum/templates/solum.conf.j2 +++ b/ansible/roles/solum/templates/solum.conf.j2 @@ -1,7 +1,7 @@ [DEFAULT] debug = {{ solum_logging_debug }} log_dir = /var/log/kolla/solum -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if service_name == 'solum-api' %} bind_host = {{ api_interface_address }} @@ -55,3 +55,7 @@ password = {{ solum_keystone_password }} memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcache_secret_key }} memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} + diff --git a/ansible/roles/swift/templates/proxy-server.conf.j2 b/ansible/roles/swift/templates/proxy-server.conf.j2 index b9d7c5f0a9..1edc482f69 100644 --- a/ansible/roles/swift/templates/proxy-server.conf.j2 +++ b/ansible/roles/swift/templates/proxy-server.conf.j2 @@ -54,8 +54,7 @@ operator_roles = admin,{{ keystone_default_user_role }},ResellerAdmin [filter:ceilometer] paste.filter_factory = ceilometermiddleware.swift:filter_factory control_exchange = swift -url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} - +url = {{ notify_transport_url }} driver = messagingv2 topic = notifications log_level = WARN diff --git a/ansible/roles/tacker/templates/tacker.conf.j2 b/ansible/roles/tacker/templates/tacker.conf.j2 index 17419a58b8..b4a53ff947 100644 --- a/ansible/roles/tacker/templates/tacker.conf.j2 +++ b/ansible/roles/tacker/templates/tacker.conf.j2 @@ -2,7 +2,7 @@ debug = {{ tacker_logging_debug }} log_dir = /var/log/kolla/tacker -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} bind_host = {{ api_interface_address }} bind_port = {{ tacker_server_port }} @@ -55,6 +55,7 @@ port = {{ tacker_server_port }} [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool %} driver = messagingv2 topics = notifications diff --git a/ansible/roles/trove/templates/trove-conductor.conf.j2 b/ansible/roles/trove/templates/trove-conductor.conf.j2 index 9e1da63116..76877962b0 100644 --- a/ansible/roles/trove/templates/trove-conductor.conf.j2 +++ b/ansible/roles/trove/templates/trove-conductor.conf.j2 @@ -6,7 +6,10 @@ trove_auth_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone conductor_manager = trove.conductor.manager.Manager control_exchange = trove -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} [database] connection = mysql+pymysql://{{ trove_database_user }}:{{ trove_database_password }}@{{ trove_database_address }}/{{ trove_database_name }} diff --git a/ansible/roles/trove/templates/trove-taskmanager.conf.j2 b/ansible/roles/trove/templates/trove-taskmanager.conf.j2 index 3aef3112f8..f104b102f0 100644 --- a/ansible/roles/trove/templates/trove-taskmanager.conf.j2 +++ b/ansible/roles/trove/templates/trove-taskmanager.conf.j2 @@ -8,7 +8,7 @@ nova_proxy_admin_tenant_name = services nova_proxy_admin_user = trove taskmanager_manager = trove.taskmanager.manager.Manager -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} trove_auth_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3 {% if enable_nova | bool %} @@ -26,6 +26,7 @@ connection = mysql+pymysql://{{ trove_database_user }}:{{ trove_database_passwor max_retries = -1 [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool %} driver = messagingv2 topics = 'notifications' diff --git a/ansible/roles/trove/templates/trove.conf.j2 b/ansible/roles/trove/templates/trove.conf.j2 index 768e944e21..9b509e1151 100644 --- a/ansible/roles/trove/templates/trove.conf.j2 +++ b/ansible/roles/trove/templates/trove.conf.j2 @@ -10,7 +10,7 @@ bind_host = {{ api_interface_address }} trove_api_workers = {{ openstack_service_workers }} auth_strategy = keystone -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} trove_auth_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3 {% if enable_nova | bool %} @@ -39,6 +39,7 @@ auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_po auth_type = password [oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} {% if enable_ceilometer | bool %} driver = messagingv2 topics = 'notifications' diff --git a/ansible/roles/watcher/templates/watcher.conf.j2 b/ansible/roles/watcher/templates/watcher.conf.j2 index d45edbbfe9..84a532070d 100644 --- a/ansible/roles/watcher/templates/watcher.conf.j2 +++ b/ansible/roles/watcher/templates/watcher.conf.j2 @@ -3,7 +3,7 @@ debug = {{ watcher_logging_debug }} log_dir = /var/log/kolla/watcher -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} {% if service_name == 'watcher-api' %} [api] @@ -42,3 +42,6 @@ password = {{ watcher_keystone_password }} [oslo_concurrency] lock_path = /var/lib/watcher/tmp + +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} diff --git a/ansible/roles/zun/templates/zun.conf.j2 b/ansible/roles/zun/templates/zun.conf.j2 index 682dd14647..60f3aa0462 100644 --- a/ansible/roles/zun/templates/zun.conf.j2 +++ b/ansible/roles/zun/templates/zun.conf.j2 @@ -7,7 +7,7 @@ log_file = /var/log/kolla/zun/zun-api.log {% endif %} log_dir = /var/log/kolla/zun -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +transport_url = {{ rpc_transport_url }} state_path = /var/lib/zun container_driver = docker.driver.DockerDriver @@ -16,6 +16,9 @@ db_type = sql [network] driver = kuryr +[oslo_messaging_notifications] +transport_url = {{ notify_transport_url }} + [api] host_ip = {{ api_interface_address }} port = {{ zun_api_port }} diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 92fa4979d9..1d19645261 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -57,6 +57,18 @@ kolla_internal_vip_address: "10.10.10.254" #docker_registry_username: "sam" #docker_registry_password: "correcthorsebatterystaple" +################### +# Messaging options +################### +# Below is an example of an separate backend that provides brokerless +# messaging for oslo.messaging RPC communications + +#om_rpc_transport: "amqp" +#om_rpc_user: "{{ qdrouterd_user }}" +#om_rpc_password: "{{ qdrouterd_password }}" +#om_rpc_port: "{{ qdrouterd_port }}" +#om_rpc_group: "qdrouterd" + ############################## # Neutron - Networking Options diff --git a/releasenotes/notes/add-hybrid-messaging-2a5eb6aae5f2c2f6.yaml b/releasenotes/notes/add-hybrid-messaging-2a5eb6aae5f2c2f6.yaml new file mode 100644 index 0000000000..0e161cf3a1 --- /dev/null +++ b/releasenotes/notes/add-hybrid-messaging-2a5eb6aae5f2c2f6.yaml @@ -0,0 +1,3 @@ +--- +features: + - Allow use of separate backends for oslo.messaging rpc and notification.