Update role with fixes for AIO testing

While doing some preliminary testing using a prototype AIO, the
following issues where observed and fixed.

The trove CLI is expecting the service name to be 'database' in
keystone.  Update from 'dbaas' to 'database'.

Add the tenant id to the trove service URLs, they are needed.

Ignore failures when restarting services since all trove services
are attempted to be restarted in all trove containers, which
produces invalid combinations.

When calling the trove-manage CLI to create the DB, provide the
trove conductor conf file so the CLI has the DB connection
information.

Add a blank line after the transport_url specification, otherwise
the following line is added to the URL and forms an invalid value.

Add Nova and Keystone configuration values to the trove api conf
file since they are needed by the trove api service.

Add Nova configuration values for the trove task manager service.

Default to using the internal URL to for nova client.

Change-Id: If70077ea5d66151999b8965c218e4cb853e6f81a
This commit is contained in:
Kyle L. Henderson 2016-09-15 08:49:23 -05:00
parent 3455ec7579
commit a90e7afc5c
6 changed files with 52 additions and 6 deletions

View File

@ -32,7 +32,7 @@ trove_taskmanager_program_name: trove-taskmanager
trove_service_name: trove trove_service_name: trove
trove_service_user_name: trove trove_service_user_name: trove
trove_service_type: dbaas trove_service_type: database
trove_service_description: "OpenStack DBaaS (Trove)" trove_service_description: "OpenStack DBaaS (Trove)"
trove_service_project_name: service trove_service_project_name: service
trove_service_role_names: trove_service_role_names:
@ -41,13 +41,13 @@ trove_service_region: RegionOne
trove_service_host: "0.0.0.0" trove_service_host: "0.0.0.0"
trove_service_port: 8779 trove_service_port: 8779
trove_service_publicuri_proto: http trove_service_publicuri_proto: http
trove_service_publicurl: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ trove_service_port }}/v1.0" trove_service_publicurl: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ trove_service_port }}/v1.0/%(tenant_id)s"
trove_service_internaluri_proto: http trove_service_internaluri_proto: http
trove_service_internalurl: "{{ trove_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ trove_service_port }}/v1.0" trove_service_internalurl: "{{ trove_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ trove_service_port }}/v1.0/%(tenant_id)s"
trove_service_adminuri_proto: http trove_service_adminuri_proto: http
trove_service_adminurl: "{{ trove_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ trove_service_port }}/v1.0" trove_service_adminurl: "{{ trove_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ trove_service_port }}/v1.0/%(tenant_id)s"
trove_auth_url: "{{ keystone_service_internalurl }}" trove_auth_url: "{{ keystone_service_internalurl }}"
trove_nova_compute_url: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ nova_service_port }}/v2.1" trove_nova_compute_url: "{{ trove_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ nova_service_port }}/v2.1"
trove_cinder_url: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ cinder_service_port }}/v1" trove_cinder_url: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ cinder_service_port }}/v1"
trove_swift_url: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ swift_proxy_port }}/v1/AUTH_" trove_swift_url: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ swift_proxy_port }}/v1/AUTH_"
trove_neutron_url: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ neutron_service_port }}/" trove_neutron_url: "{{ trove_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ neutron_service_port }}/"
@ -127,6 +127,7 @@ trove_requires_pip_packages:
- httplib2 - httplib2
- python-glanceclient - python-glanceclient
- python-keystoneclient - python-keystoneclient
- python-memcached
- python-troveclient - python-troveclient
- virtualenv - virtualenv
- virtualenv-tools - virtualenv-tools

View File

@ -20,6 +20,7 @@
name: "{{ trove_api_program_name }}" name: "{{ trove_api_program_name }}"
state: "restarted" state: "restarted"
pattern: "{{ trove_api_program_name }}" pattern: "{{ trove_api_program_name }}"
failed_when: false
when: not trove_use_mod_wsgi | bool when: not trove_use_mod_wsgi | bool
- name: Restart trove conductor service - name: Restart trove conductor service
@ -27,12 +28,14 @@
name: "{{ trove_conductor_service_name }}" name: "{{ trove_conductor_service_name }}"
state: "restarted" state: "restarted"
pattern: "{{ trove_conductor_service_name }}" pattern: "{{ trove_conductor_service_name }}"
failed_when: false
- name: Restart trove taskmanager service - name: Restart trove taskmanager service
service: service:
name: "{{ trove_taskmanager_service_name }}" name: "{{ trove_taskmanager_service_name }}"
state: "restarted" state: "restarted"
pattern: "{{ trove_taskmanager_service_name }}" pattern: "{{ trove_taskmanager_service_name }}"
failed_when: false
- name: Restart Apache - name: Restart Apache
service: service:

View File

@ -16,6 +16,9 @@
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za> # (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
# (c) 2016 Paul Stevens <paul.stevens@is.co.za> # (c) 2016 Paul Stevens <paul.stevens@is.co.za>
- name: Perform a trove DB sync - name: Perform a trove DB sync
command: "{{ trove_bin }}/trove-manage db_sync {{ trove_db_sync_options }}" command: >
{{ trove_bin }}/trove-manage
--config-file=/etc/trove/{{ trove_conductor_program_name }}.conf
db_sync {{ trove_db_sync_options }}
become: yes become: yes
become_user: "{{ trove_system_user_name }}" become_user: "{{ trove_system_user_name }}"

View File

@ -6,6 +6,8 @@ trove_auth_url = {{ trove_auth_url }}
conductor_manager = trove.conductor.manager.Manager conductor_manager = trove.conductor.manager.Manager
rpc_backend={{ trove_rpc_backend }} rpc_backend={{ trove_rpc_backend }}
transport_url = rabbit://{% for host in trove_rabbitmq_servers.split(',') %}{{ trove_rabbitmq_userid }}:{{ trove_rabbitmq_password }}@{{ host }}:{{ trove_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ trove_rabbitmq_vhost }}{% endif %}{% endfor %} transport_url = rabbit://{% for host in trove_rabbitmq_servers.split(',') %}{{ trove_rabbitmq_userid }}:{{ trove_rabbitmq_password }}@{{ host }}:{{ trove_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ trove_rabbitmq_vhost }}{% endif %}{% endfor %}
{# There must be a blank line above or the following line will be appended to the previous. #}
control_exchange = {{ trove_control_exchange }} control_exchange = {{ trove_control_exchange }}
[profiler] [profiler]

View File

@ -5,6 +5,8 @@ debug = {{ debug }}
update_status_on_fail = True update_status_on_fail = True
rpc_backend={{ trove_rpc_backend }} rpc_backend={{ trove_rpc_backend }}
transport_url = rabbit://{% for host in trove_rabbitmq_servers.split(',') %}{{ trove_rabbitmq_userid }}:{{ trove_rabbitmq_password }}@{{ host }}:{{ trove_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ trove_rabbitmq_vhost }}{% endif %}{% endfor %} transport_url = rabbit://{% for host in trove_rabbitmq_servers.split(',') %}{{ trove_rabbitmq_userid }}:{{ trove_rabbitmq_password }}@{{ host }}:{{ trove_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ trove_rabbitmq_vhost }}{% endif %}{% endfor %}
{# There must be a blank line above or the following line will be appended to the previous. #}
control_exchange = {{ trove_control_exchange }} control_exchange = {{ trove_control_exchange }}
db_api_implementation = trove.db.sqlalchemy.api db_api_implementation = trove.db.sqlalchemy.api
trove_auth_url = {{ trove_auth_url }} trove_auth_url = {{ trove_auth_url }}
@ -48,6 +50,12 @@ dns_service_type = dns
network_driver = trove.network.nova.NovaNetwork network_driver = trove.network.nova.NovaNetwork
default_neutron_networks = default_neutron_networks =
# Nova
nova_compute_url = {{ trove_nova_compute_url }}
nova_proxy_admin_user = {{ trove_service_user_name }}
nova_proxy_admin_pass = {{ trove_service_password }}
nova_proxy_admin_tenant_name = {{ trove_service_project_name }}
# Trove Security Groups for Instances # Trove Security Groups for Instances
trove_security_groups_support = True trove_security_groups_support = True
trove_security_group_rule_cidr = 0.0.0.0/0 trove_security_group_rule_cidr = 0.0.0.0/0

View File

@ -8,6 +8,8 @@ bind_port = {{ trove_service_port }}
trove_api_workers={{ trove_api_workers | default(api_threads) }} trove_api_workers={{ trove_api_workers | default(api_threads) }}
rpc_backend={{ trove_rpc_backend }} rpc_backend={{ trove_rpc_backend }}
transport_url = rabbit://{% for host in trove_rabbitmq_servers.split(',') %}{{ trove_rabbitmq_userid }}:{{ trove_rabbitmq_password }}@{{ host }}:{{ trove_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ trove_rabbitmq_vhost }}{% endif %}{% endfor %} transport_url = rabbit://{% for host in trove_rabbitmq_servers.split(',') %}{{ trove_rabbitmq_userid }}:{{ trove_rabbitmq_password }}@{{ host }}:{{ trove_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ trove_rabbitmq_vhost }}{% endif %}{% endfor %}
{# There must be a blank line above or the following line will be appended to the previous. #}
control_exchange = {{ trove_control_exchange }} control_exchange = {{ trove_control_exchange }}
db_api_implementation = "trove.db.sqlalchemy.api" db_api_implementation = "trove.db.sqlalchemy.api"
trove_auth_url = {{ trove_auth_url }} trove_auth_url = {{ trove_auth_url }}
@ -46,6 +48,12 @@ dns_instance_entry_factory = trove.dns.designate.driver.DesignateInstanceEntryFa
dns_endpoint_url = http://127.0.0.1/v1/ dns_endpoint_url = http://127.0.0.1/v1/
dns_service_type = dns dns_service_type = dns
# Nova
nova_compute_url = {{ trove_nova_compute_url }}
nova_proxy_admin_user = {{ trove_service_user_name }}
nova_proxy_admin_pass = {{ trove_service_password }}
nova_proxy_admin_tenant_name = {{ trove_service_project_name }}
# Neutron # Neutron
network_driver = trove.network.nova.NovaNetwork network_driver = trove.network.nova.NovaNetwork
default_neutron_networks = default_neutron_networks =
@ -55,6 +63,7 @@ taskmanager_queue = taskmanager
# Auth # Auth
admin_roles = admin admin_roles = admin
auth_strategy = keystone
# Guest related conf # Guest related conf
agent_heartbeat_time = 10 agent_heartbeat_time = 10
@ -67,6 +76,26 @@ reboot_time_out = 60
# Trove api-paste file name # Trove api-paste file name
api_paste_config = api-paste.ini api_paste_config = api-paste.ini
[keystone_authtoken]
insecure = {{ keystone_service_internaluri_insecure | bool }}
auth_plugin = {{ trove_keystone_auth_plugin }}
auth_url = {{ keystone_service_adminuri }}
auth_uri = {{ keystone_service_internaluri }}
project_domain_id = {{ trove_service_project_domain_id }}
user_domain_id = {{ trove_service_user_domain_id }}
project_name = {{ trove_service_project_name }}
username = {{ trove_service_user_name }}
password = {{ trove_service_password }}
region_name = {{ keystone_service_region }}
memcached_servers = {{ memcached_servers }}
token_cache_time = 300
revocation_cache_time = 60
# if your memcached server is shared, use these settings to avoid cache poisoning
memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ memcached_encryption_key }}
[database] [database]
connection = "{{ trove_galera_connection_string }}" connection = "{{ trove_galera_connection_string }}"
idle_timeout = 3600 idle_timeout = 3600