From 1f7afaf55fc40b59bd91cf441dafd74a701f9953 Mon Sep 17 00:00:00 2001 From: James Page Date: Tue, 24 Mar 2015 17:15:44 +0000 Subject: [PATCH 1/3] Specialize kilo config --- templates/kilo/neutron.conf | 40 ++++++++++++++++++++++++++++++++ templates/parts/section-rabbitmq | 22 ++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 templates/kilo/neutron.conf create mode 100644 templates/parts/section-rabbitmq diff --git a/templates/kilo/neutron.conf b/templates/kilo/neutron.conf new file mode 100644 index 00000000..0c209c4e --- /dev/null +++ b/templates/kilo/neutron.conf @@ -0,0 +1,40 @@ +# icehouse +############################################################################### +# [ WARNING ] +# Configuration file maintained by Juju. Local changes may be overwritten. +# Config managed by neutron-openvswitch charm +############################################################################### +[DEFAULT] +verbose = {{ verbose }} +debug = {{ debug }} +use_syslog = {{ use_syslog }} +state_path = /var/lib/neutron +bind_host = 0.0.0.0 +bind_port = 9696 +{% if network_device_mtu -%} +network_device_mtu = {{ network_device_mtu }} +{% endif -%} +{% if core_plugin -%} +core_plugin = {{ core_plugin }} +{% endif -%} + +api_paste_config = /etc/neutron/api-paste.ini +auth_strategy = keystone +notification_driver = neutron.openstack.common.notifier.rpc_notifier +default_notification_level = INFO +notification_topics = notifications + +{% include "parts/section-rabbitmq" %} + +[QUOTAS] + +[DEFAULT_SERVICETYPE] + +[AGENT] +root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf + +[keystone_authtoken] +signing_dir = /var/lib/neutron/keystone-signing + +[oslo_concurrency] +lock_path = $state_path/lock diff --git a/templates/parts/section-rabbitmq b/templates/parts/section-rabbitmq new file mode 100644 index 00000000..df21178b --- /dev/null +++ b/templates/parts/section-rabbitmq @@ -0,0 +1,22 @@ +{% if rabbitmq_host or rabbitmq_hosts -%} +[oslo_messaging_rabbit] +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 -%} \ No newline at end of file From 44e8877df863dd972552ddb6b073f290c02e4cf0 Mon Sep 17 00:00:00 2001 From: James Page Date: Wed, 25 Mar 2015 09:18:34 +0000 Subject: [PATCH 2/3] resync helpers --- .../templates/section-keystone-authtoken | 9 ++++++++ .../openstack/templates/section-rabbitmq-oslo | 22 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken create mode 100644 hooks/charmhelpers/contrib/openstack/templates/section-rabbitmq-oslo diff --git a/hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken b/hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken new file mode 100644 index 00000000..2a37edd5 --- /dev/null +++ b/hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken @@ -0,0 +1,9 @@ +{% if auth_host -%} +[keystone_authtoken] +identity_uri = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/{{ auth_admin_prefix }} +auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/{{ service_admin_prefix }} +admin_tenant_name = {{ admin_tenant_name }} +admin_user = {{ admin_user }} +admin_password = {{ admin_password }} +signing_dir = {{ signing_dir }} +{% endif -%} diff --git a/hooks/charmhelpers/contrib/openstack/templates/section-rabbitmq-oslo b/hooks/charmhelpers/contrib/openstack/templates/section-rabbitmq-oslo new file mode 100644 index 00000000..b444c9c9 --- /dev/null +++ b/hooks/charmhelpers/contrib/openstack/templates/section-rabbitmq-oslo @@ -0,0 +1,22 @@ +{% if rabbitmq_host or rabbitmq_hosts -%} +[oslo_messaging_rabbit] +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 -%} From 68a33867f02da0e532649831f15680d798322eeb Mon Sep 17 00:00:00 2001 From: James Page Date: Wed, 25 Mar 2015 09:22:37 +0000 Subject: [PATCH 3/3] Switch to using charm-helper templates for rabbitmq --- templates/kilo/neutron.conf | 2 +- templates/parts/section-rabbitmq | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 templates/parts/section-rabbitmq diff --git a/templates/kilo/neutron.conf b/templates/kilo/neutron.conf index 0c209c4e..b4703bef 100644 --- a/templates/kilo/neutron.conf +++ b/templates/kilo/neutron.conf @@ -24,7 +24,7 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier default_notification_level = INFO notification_topics = notifications -{% include "parts/section-rabbitmq" %} +{% include "section-rabbitmq-oslo" %} [QUOTAS] diff --git a/templates/parts/section-rabbitmq b/templates/parts/section-rabbitmq deleted file mode 100644 index df21178b..00000000 --- a/templates/parts/section-rabbitmq +++ /dev/null @@ -1,22 +0,0 @@ -{% if rabbitmq_host or rabbitmq_hosts -%} -[oslo_messaging_rabbit] -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 -%} \ No newline at end of file