Allow configuration of multiple rabbit clusters

Introduced new variables so the transport_url values
used for RPC and notifications can vary. By default
they will remain the same.

Change-Id: I846e39d4a9fbae060644c51e4d0c0b07c59d583b
Implements: blueprint multi-rabbitmq-clusters
This commit is contained in:
Travis Truman 2016-07-21 09:39:21 -04:00
parent 0425d1cf26
commit 7bb3cd07bf
2 changed files with 20 additions and 10 deletions

View File

@ -93,6 +93,8 @@ keystone_database_max_pool_size: 120
keystone_database_pool_timeout: 30 keystone_database_pool_timeout: 30
## RabbitMQ info ## RabbitMQ info
## Configuration for RPC communications
keystone_messaging_enabled: true keystone_messaging_enabled: true
keystone_rabbitmq_port: 5671 keystone_rabbitmq_port: 5671
keystone_rabbitmq_userid: keystone keystone_rabbitmq_userid: keystone
@ -100,6 +102,13 @@ keystone_rabbitmq_vhost: /keystone
keystone_rabbitmq_servers: localhost keystone_rabbitmq_servers: localhost
keystone_rabbitmq_use_ssl: false keystone_rabbitmq_use_ssl: false
## Configuration for notifications communication, i.e. [oslo_messaging_notifications]
keystone_rabbitmq_telemetry_userid: "{{ keystone_rabbitmq_userid }}"
keystone_rabbitmq_telemetry_vhost: "{{ keystone_rabbitmq_vhost }}"
keystone_rabbitmq_telemetry_port: "{{ keystone_rabbitmq_port }}"
keystone_rabbitmq_telemetry_servers: "{{ keystone_rabbitmq_servers }}"
keystone_rabbitmq_telemetry_use_ssl: "{{ keystone_rabbitmq_use_ssl }}"
## Role info ## Role info
keystone_role_name: admin keystone_role_name: admin
keystone_default_role_name: _member_ keystone_default_role_name: _member_

View File

@ -15,10 +15,19 @@ secure_proxy_ssl_header = {{ keystone_secure_proxy_ssl_header }}
log_file = keystone.log log_file = keystone.log
log_dir = /var/log/keystone log_dir = /var/log/keystone
## RabbitMQ RPC
{% if keystone_messaging_enabled | bool %}
rpc_backend = {{ keystone_rpc_backend }} rpc_backend = {{ keystone_rpc_backend }}
transport_url = rabbit://{% for host in keystone_rabbitmq_servers.split(',') %}{{ keystone_rabbitmq_userid }}:{{ keystone_rabbitmq_password }}@{{ host }}:{{ keystone_rabbitmq_port }}/{{ keystone_rabbitmq_vhost }}?rabbit_use_ssl={{ keystone_rabbitmq_use_ssl }},{% endfor %}
[oslo_messaging_rabbit]
{% endif %}
{% if keystone_ceilometer_enabled %} {% if keystone_ceilometer_enabled %}
notification_driver = messagingv2 [oslo_messaging_notifications]
driver = messagingv2
transport_url = rabbit://{% for host in keystone_rabbitmq_telemetry_servers.split(',') %}{{ keystone_rabbitmq_telemetry_userid }}:{{ keystone_rabbitmq_telemetry_password }}@{{ host }}:{{ keystone_rabbitmq_telemetry_port }}/{{ keystone_rabbitmq_telemetry_vhost }}?rabbit_use_ssl={{ keystone_rabbitmq_telemetry_use_ssl }},{% endfor %}
{% endif %} {% endif %}
{% if 'memcache' in keystone_token_driver and 'fernet' not in keystone_token_provider %} {% if 'memcache' in keystone_token_driver and 'fernet' not in keystone_token_provider %}
@ -147,15 +156,7 @@ admin_bind_host = {{ keystone_bind_address }}
admin_port = {{ keystone_admin_port }} admin_port = {{ keystone_admin_port }}
public_port = {{ keystone_service_port }} public_port = {{ keystone_service_port }}
{% if keystone_messaging_enabled | bool %}
[oslo_messaging_rabbit]
rabbit_port = {{ keystone_rabbitmq_port }}
rabbit_userid = {{ keystone_rabbitmq_userid }}
rabbit_password = {{ keystone_rabbitmq_password }}
rabbit_virtual_host = {{ keystone_rabbitmq_vhost }}
rabbit_hosts = {{ keystone_rabbitmq_servers }}
rabbit_use_ssl = {{ keystone_rabbitmq_use_ssl }}
{% endif %}
{% if keystone_sp != {} %} {% if keystone_sp != {} %}
[federation] [federation]