From b4a62da897d935eded50462f344a9b1e01ea7ba4 Mon Sep 17 00:00:00 2001 From: Jonathan Arrance Date: Tue, 13 Sep 2016 11:26:10 -0400 Subject: [PATCH] Attempting to get the template config files correct so that they are deployed in the charm. --- src/lib/charm/openstack/trove.py | 3 +- src/templates/mitaka/trove-conductor.conf | 2 +- src/templates/mitaka/trove-guestagent.conf | 44 ++++++++--------- src/templates/mitaka/trove-taskmanager.conf | 48 +++++++++---------- src/templates/mitaka/trove.conf | 52 ++++++++++----------- 5 files changed, 74 insertions(+), 75 deletions(-) diff --git a/src/lib/charm/openstack/trove.py b/src/lib/charm/openstack/trove.py index 217dc01..c909147 100644 --- a/src/lib/charm/openstack/trove.py +++ b/src/lib/charm/openstack/trove.py @@ -166,8 +166,7 @@ class TroveCharm(charms_openstack.charm.HAOpenStackCharm): services = ['trove-api', 'trove-taskmanager', 'trove-conductor'] - #adapters_class = TroveAdapters - adapters_class = charms_openstack.adapters.OpenStackRelationAdapters + adapters_class = TroveAdapters default_service = 'trove-api' diff --git a/src/templates/mitaka/trove-conductor.conf b/src/templates/mitaka/trove-conductor.conf index 9b8bbaf..9a09df1 100644 --- a/src/templates/mitaka/trove-conductor.conf +++ b/src/templates/mitaka/trove-conductor.conf @@ -2,7 +2,7 @@ verbose = {{ options.verbose }} debug = {{ options.debug }} -trove_auth_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:{{ identity_service.auth_port }}/v3.0 +trove_auth_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:{{ identity_service.auth_port }}/v{{ options.keystone_api_version }}.0 # The manager class to use for conductor. (string value) conductor_manager = trove.conductor.manager.Manager diff --git a/src/templates/mitaka/trove-guestagent.conf b/src/templates/mitaka/trove-guestagent.conf index 8eac870..7e05127 100644 --- a/src/templates/mitaka/trove-guestagent.conf +++ b/src/templates/mitaka/trove-guestagent.conf @@ -83,28 +83,28 @@ log_config_append = /etc/trove/trove-logging-guestagent.conf #trace_sqlalchemy = True [oslo_messaging_rabbit] -#{% include "parts/section-rabbitmq-oslo" %} -{% 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/section-rabbitmq-oslo" %} +#{% 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 -%} # ========== Datastore Specific Configuration Options ========== diff --git a/src/templates/mitaka/trove-taskmanager.conf b/src/templates/mitaka/trove-taskmanager.conf index 42b3932..7a4807c 100644 --- a/src/templates/mitaka/trove-taskmanager.conf +++ b/src/templates/mitaka/trove-taskmanager.conf @@ -12,7 +12,7 @@ debug = {{ options.debug }} update_status_on_fail = True log_dir = /var/log/trove -trove_auth_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:{{ identity_service.auth_port }}/v3.0 +trove_auth_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:{{ identity_service.auth_port }}/v{{ options.keystone_api_version }}.0 #nova_compute_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:8774/v2 #cinder_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:8776/v1 #swift_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:8080/v1/AUTH_ @@ -97,29 +97,29 @@ device_path = /dev/vdb #taskmanager_strategy = trove.common.strategies.cluster.experimental.vertica.taskmanager.VerticaTaskManagerStrategy -#{% include "parts/section-rabbitmq-oslo" %} -[oslo_messaging_rabbit] -{% 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/section-rabbitmq-oslo" %} +#[oslo_messaging_rabbit] +#{% 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 -%} [database] #{% include "parts/database" %} diff --git a/src/templates/mitaka/trove.conf b/src/templates/mitaka/trove.conf index b74bd97..fb279e0 100644 --- a/src/templates/mitaka/trove.conf +++ b/src/templates/mitaka/trove.conf @@ -1,7 +1,7 @@ [DEFAULT] auth_strategy = keystone log_dir = /var/log/trove -trove_auth_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:{{ identity_service.auth_port }}/v3.0 +trove_auth_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:{{ identity_service.auth_port }}/v{{ options.keystone_api_version }}.0 #nova_compute_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:8774/v2 #cinder_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:8776/v1 #swift_url = {{ identity_service.service_protocol }}://{{ identity_service.auth_host }}:8080/v1/AUTH_ @@ -14,11 +14,11 @@ verbose = {{ options.verbose }} debug = {{ options.debug }} # Address to bind the API server -bind_host = {{ options.service_listen_info.trove_worker.ip }} +bind_host = {{ options.service_listen_info.trove_api.ip }} # Port the bind the API server to #bind_port = 8779 -bind_port = {{ options.service_listen_info.trove_worker.port }} +bind_port = {{ options.service_listen_info.trove_api.port }} rpc_backend = rabbit @@ -56,30 +56,30 @@ neutron_service_type = network #max_backups_per_tenant = 5 #volume_time_out=30 -[oslo_messaging_rabbit] -{% 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 -%} +#[oslo_messaging_rabbit] +#{% if rabbitmq_host or rabbitmq_hosts -%} +#rabbit_userid = {{ rabbit_user }} +#rabbit_virtual_host = {{ rabbit_vhost }} +#rabbit_password = {{ rabbit_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/section-rabbitmq-oslo" %} +{% include "parts/section-rabbitmq-oslo" %} [database] #connection = mysql://trove:TROVE_DBPASS@controller/trove