From 689cc24395fefbce543497d2c5be0b88b16e7b9a Mon Sep 17 00:00:00 2001 From: James Page Date: Sat, 29 Mar 2014 18:38:15 +0000 Subject: [PATCH] Try out include for rabbitmq configuration --- templates/grizzly/nova.conf | 22 +--------------------- templates/grizzly/quantum.conf | 26 +++----------------------- templates/havana/neutron.conf | 26 +++----------------------- templates/havana/nova.conf | 22 +--------------------- templates/icehouse/neutron.conf | 22 +--------------------- templates/parts/rabbitmq | 0 6 files changed, 9 insertions(+), 109 deletions(-) create mode 100644 templates/parts/rabbitmq diff --git a/templates/grizzly/nova.conf b/templates/grizzly/nova.conf index 85477e9b..2e27fe64 100644 --- a/templates/grizzly/nova.conf +++ b/templates/grizzly/nova.conf @@ -11,27 +11,7 @@ sql_connection = mysql://{{ database_user }}:{{ database_password }}@{{ database quantum_metadata_proxy_shared_secret={{ shared_secret }} service_quantum_metadata_proxy=True # Access to message bus -{% if rabbitmq_host or rabbitmq_hosts -%} -rabbit_userid = {{ rabbitmq_user }} -rabbit_virtual_host = {{ rabbitmq_virtual_host }} -rabbit_password = {{ rabbitmq_password }} -{% if rabbitmq_hosts -%} -rabbit_hosts = {{ rabbitmq_hosts }} -{% if rabbitmq_ha_queues -%} -rabbit_ha_queues = true -rabbit_durable_queues = false -{% endif -%} -{% else -%} -rabbit_host = {{ rabbitmq_host }} -{% endif -%} -{% if rabbit_ssl_port -%} -rabbit_use_ssl=True -rabbit_port={{ rabbit_ssl_port }} -{% if rabbit_ssl_ca -%} -kombu_ssl_ca_certs={{rabbit_ssl_ca}} -{% endif -%} -{% endif -%} -{% endif -%} +{% include "parts/rabbitmq" %} # Access to quantum API services network_api_class=nova.network.quantumv2.api.API quantum_auth_strategy=keystone diff --git a/templates/grizzly/quantum.conf b/templates/grizzly/quantum.conf index 4f61430e..30356ccf 100644 --- a/templates/grizzly/quantum.conf +++ b/templates/grizzly/quantum.conf @@ -1,29 +1,9 @@ [DEFAULT] verbose = True - -{% if rabbitmq_host or rabbitmq_hosts -%} -rabbit_userid = {{ rabbitmq_user }} -rabbit_virtual_host = {{ rabbitmq_virtual_host }} -rabbit_password = {{ rabbitmq_password }} -{% if rabbitmq_hosts -%} -rabbit_hosts = {{ rabbitmq_hosts }} -{% if rabbitmq_ha_queues -%} -rabbit_ha_queues = true -rabbit_durable_queues = false -{% endif -%} -{% else -%} -rabbit_host = {{ rabbitmq_host }} -{% endif -%} -{% if rabbit_ssl_port -%} -rabbit_use_ssl=True -rabbit_port={{ rabbit_ssl_port }} -{% if rabbit_ssl_ca -%} -kombu_ssl_ca_certs={{rabbit_ssl_ca}} -{% endif -%} -{% endif -%} -{% endif -%} - debug = True + +{% include "parts/rabbitmq" %} + bind_host = 0.0.0.0 bind_port = 9696 core_plugin = {{ core_plugin }} diff --git a/templates/havana/neutron.conf b/templates/havana/neutron.conf index ba1223de..7837ba8b 100644 --- a/templates/havana/neutron.conf +++ b/templates/havana/neutron.conf @@ -1,29 +1,9 @@ [DEFAULT] verbose = {{ verbose }} - -{% if rabbitmq_host or rabbitmq_hosts -%} -rabbit_userid = {{ rabbitmq_user }} -rabbit_virtual_host = {{ rabbitmq_virtual_host }} -rabbit_password = {{ rabbitmq_password }} -{% if rabbitmq_hosts -%} -rabbit_hosts = {{ rabbitmq_hosts }} -{% if rabbitmq_ha_queues -%} -rabbit_ha_queues = true -rabbit_durable_queues = false -{% endif -%} -{% else -%} -rabbit_host = {{ rabbitmq_host }} -{% endif -%} -{% if rabbit_ssl_port -%} -rabbit_use_ssl=True -rabbit_port={{ rabbit_ssl_port }} -{% if rabbit_ssl_ca -%} -kombu_ssl_ca_certs={{rabbit_ssl_ca}} -{% endif -%} -{% endif -%} -{% endif -%} - debug = {{ debug }} + +{% include "parts/rabbitmq" %} + bind_host = 0.0.0.0 bind_port = 9696 core_plugin = {{ core_plugin }} diff --git a/templates/havana/nova.conf b/templates/havana/nova.conf index d44a3a52..993df91d 100644 --- a/templates/havana/nova.conf +++ b/templates/havana/nova.conf @@ -11,27 +11,7 @@ sql_connection = mysql://{{ database_user }}:{{ database_password }}@{{ database neutron_metadata_proxy_shared_secret={{ shared_secret }} service_neutron_metadata_proxy=True # Access to message bus -{% if rabbitmq_host or rabbitmq_hosts -%} -rabbit_userid = {{ rabbitmq_user }} -rabbit_virtual_host = {{ rabbitmq_virtual_host }} -rabbit_password = {{ rabbitmq_password }} -{% if rabbitmq_hosts -%} -rabbit_hosts = {{ rabbitmq_hosts }} -{% if rabbitmq_ha_queues -%} -rabbit_ha_queues = true -rabbit_durable_queues = false -{% endif -%} -{% else -%} -rabbit_host = {{ rabbitmq_host }} -{% endif -%} -{% if rabbit_ssl_port -%} -rabbit_use_ssl=True -rabbit_port={{ rabbit_ssl_port }} -{% if rabbit_ssl_ca -%} -kombu_ssl_ca_certs={{rabbit_ssl_ca}} -{% endif -%} -{% endif -%} -{% endif -%} +{% include "parts/rabbitmq" %} # Access to neutron API services network_api_class=nova.network.neutronv2.api.API neutron_auth_strategy=keystone diff --git a/templates/icehouse/neutron.conf b/templates/icehouse/neutron.conf index f6ebedcb..b8608b2f 100644 --- a/templates/icehouse/neutron.conf +++ b/templates/icehouse/neutron.conf @@ -4,27 +4,7 @@ debug = {{ debug }} core_plugin = {{ core_plugin }} -{% if rabbitmq_host or rabbitmq_hosts -%} -rabbit_userid = {{ rabbitmq_user }} -rabbit_virtual_host = {{ rabbitmq_virtual_host }} -rabbit_password = {{ rabbitmq_password }} -{% if rabbitmq_hosts -%} -rabbit_hosts = {{ rabbitmq_hosts }} -{% if rabbitmq_ha_queues -%} -rabbit_ha_queues = true -rabbit_durable_queues = false -{% endif -%} -{% else -%} -rabbit_host = {{ rabbitmq_host }} -{% endif -%} -{% if rabbit_ssl_port -%} -rabbit_use_ssl=True -rabbit_port={{ rabbit_ssl_port }} -{% if rabbit_ssl_ca -%} -kombu_ssl_ca_certs={{rabbit_ssl_ca}} -{% endif -%} -{% endif -%} -{% endif -%} +{% include "parts/rabbitmq" %} control_exchange = neutron notification_driver = neutron.openstack.common.notifier.list_notifier diff --git a/templates/parts/rabbitmq b/templates/parts/rabbitmq new file mode 100644 index 00000000..e69de29b