Configure DB addresses for each service
To enable partitioning of DB traffic by-service, each service needs to use a custom connection string. Defaulting the service address to a common galera_address makes things continue to work by default. While the galera_address could be overridden on a container or host basis this requires repeating that behavior across each infra node in the inventory. Providing service-specific connection address variables simplifies the management somewhat for large deployments and may reduce error rates. The service install playbooks now default the service-specific variables instead of galera_address to the internal lb vip from inventory to maintain the ease-of-use currently available. Any value for a service-specific variable set in user_variables.yml will override the value in the playbook's vars to provide selective customization as needed. Change-Id: I4c98bf906a0c1cb11ddd41277a855dce22ff646a Closes-Bug: 1462529
This commit is contained in:
parent
973a28ef11
commit
3d1b45ea4c
@ -98,7 +98,7 @@
|
||||
- "cinder-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
cinder_galera_address: "{{ internal_lb_vip_address }}"
|
||||
glance_host: "{{ internal_lb_vip_address }}"
|
||||
ansible_hostname: "{{ container_name }}"
|
||||
cinder_storage_address: "{{ container_address }}"
|
||||
|
@ -82,6 +82,6 @@
|
||||
- "glance-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
glance_galera_address: "{{ internal_lb_vip_address }}"
|
||||
ansible_hostname: "{{ container_name }}"
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
|
@ -57,7 +57,7 @@
|
||||
- "heat-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
heat_galera_address: "{{ internal_lb_vip_address }}"
|
||||
ansible_hostname: "{{ container_name }}"
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
vars_files:
|
||||
|
@ -57,7 +57,7 @@
|
||||
- "horizon-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
horizon_galera_address: "{{ internal_lb_vip_address }}"
|
||||
ansible_hostname: "{{ container_name }}"
|
||||
horizon_server_name: "{{ container_name }}"
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
|
@ -58,6 +58,6 @@
|
||||
- "keystone-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
keystone_galera_address: "{{ internal_lb_vip_address }}"
|
||||
ansible_hostname: "{{ container_name }}"
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
|
@ -103,7 +103,7 @@
|
||||
- "neutron-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
neutron_galera_address: "{{ internal_lb_vip_address }}"
|
||||
ansible_hostname: "{{ container_name }}"
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
bind_prefix: "{{ provider_network_bind_prefix|default('') }}"
|
||||
|
@ -99,7 +99,7 @@
|
||||
- "nova-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
nova_galera_address: "{{ internal_lb_vip_address }}"
|
||||
ansible_hostname: "{{ container_name }}"
|
||||
ansible_ssh_host: "{{ container_address }}"
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
|
@ -18,4 +18,4 @@ This role will install the following:
|
||||
roles:
|
||||
- { role: "os_cinder", tags: [ "os-cinder" ] }
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
cinder_galera_address: "{{ internal_lb_vip_address }}"
|
||||
|
@ -17,7 +17,7 @@
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ cinder_galera_address }}"
|
||||
name: "{{ cinder_galera_database }}"
|
||||
state: "present"
|
||||
tags:
|
||||
@ -27,7 +27,7 @@
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ cinder_galera_address }}"
|
||||
name: "{{ cinder_galera_user }}"
|
||||
password: "{{ cinder_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -92,7 +92,7 @@ nfs_shares_config={{ cinder_nfs_client.nfs_shares_config }}
|
||||
{% endif %}
|
||||
|
||||
[database]
|
||||
connection = mysql://{{ cinder_galera_user }}:{{ cinder_container_mysql_password }}@{{ galera_address }}/{{ cinder_galera_database }}?charset=utf8
|
||||
connection = mysql://{{ cinder_galera_user }}:{{ cinder_container_mysql_password }}@{{ cinder_galera_address }}/{{ cinder_galera_database }}?charset=utf8
|
||||
|
||||
[oslo_messaging_rabbit]
|
||||
rabbit_port = {{ rabbitmq_port }}
|
||||
|
@ -19,4 +19,4 @@ This role will install the following:
|
||||
vars:
|
||||
external_lb_vip_address: 172.16.24.1
|
||||
internal_lb_vip_address: 192.168.0.1
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
glance_galera_address: "{{ internal_lb_vip_address }}"
|
||||
|
@ -17,7 +17,7 @@
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ glance_galera_address }}"
|
||||
name: "{{ glance_galera_database }}"
|
||||
state: "present"
|
||||
tags:
|
||||
@ -27,7 +27,7 @@
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ glance_galera_address }}"
|
||||
name: "{{ glance_galera_user }}"
|
||||
password: "{{ glance_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -48,7 +48,7 @@ image_cache_dir = {{ glance_system_user_home }}/cache/
|
||||
task_executor = {{ glance_task_executor }}
|
||||
|
||||
[database]
|
||||
connection = mysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ galera_address }}/{{ glance_galera_database }}?charset=utf8
|
||||
connection = mysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ glance_galera_address }}/{{ glance_galera_database }}?charset=utf8
|
||||
|
||||
[keystone_authtoken]
|
||||
auth_plugin = {{ glance_keystone_auth_plugin }}
|
||||
|
@ -6,4 +6,4 @@ fatal_deprecations = {{ glance_fatal_deprecations }}
|
||||
use_syslog = False
|
||||
|
||||
[database]
|
||||
connection = mysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ galera_address }}/{{ glance_galera_database }}?charset=utf8
|
||||
connection = mysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ glance_galera_address }}/{{ glance_galera_database }}?charset=utf8
|
||||
|
@ -18,7 +18,7 @@ api_limit_max = 1000
|
||||
limit_param_default = 25
|
||||
|
||||
[database]
|
||||
connection = mysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ galera_address }}/{{ glance_galera_database }}?charset=utf8
|
||||
connection = mysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ glance_galera_address }}/{{ glance_galera_database }}?charset=utf8
|
||||
|
||||
[keystone_authtoken]
|
||||
auth_plugin = {{ glance_keystone_auth_plugin }}
|
||||
|
@ -21,6 +21,6 @@ This role will install the following:
|
||||
vars:
|
||||
external_lb_vip_address: 172.16.24.1
|
||||
internal_lb_vip_address: 192.168.0.1
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
heat_galera_address: "{{ internal_lb_vip_address }}"
|
||||
keystone_admin_user_name: admin
|
||||
keystone_admin_tenant_name: admin
|
||||
|
@ -17,7 +17,7 @@
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ heat_galera_address }}"
|
||||
name: "{{ heat_galera_database }}"
|
||||
state: "present"
|
||||
tags:
|
||||
@ -27,7 +27,7 @@
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ heat_galera_address }}"
|
||||
name: "{{ heat_galera_user }}"
|
||||
password: "{{ heat_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -35,7 +35,7 @@ endpoint_type = {{ heat_clients_endpoint }}
|
||||
endpoint_type = {{ heat_clients_heat_endpoint }}
|
||||
|
||||
[database]
|
||||
connection = mysql://{{ heat_galera_user }}:{{ heat_container_mysql_password }}@{{ galera_address }}/{{ heat_galera_database }}?charset=utf8
|
||||
connection = mysql://{{ heat_galera_user }}:{{ heat_container_mysql_password }}@{{ heat_galera_address }}/{{ heat_galera_database }}?charset=utf8
|
||||
|
||||
[ec2authtoken]
|
||||
auth_uri = {{ keystone_service_internalurl }}
|
||||
|
@ -16,4 +16,4 @@ This role will install the following:
|
||||
roles:
|
||||
- { role: "os_horizon", tags: [ "os-horizon" ] }
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
horizon_galera_address: "{{ internal_lb_vip_address }}"
|
||||
|
@ -17,7 +17,7 @@
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ horizon_galera_address }}"
|
||||
name: "{{ horizon_galera_database }}"
|
||||
state: "present"
|
||||
tags:
|
||||
@ -27,7 +27,7 @@
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ horizon_galera_address }}"
|
||||
name: "{{ horizon_galera_user }}"
|
||||
password: "{{ horizon_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -136,7 +136,7 @@ SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'HOST': '{{ galera_address }}',
|
||||
'HOST': '{{ horizon_galera_address }}',
|
||||
'NAME': '{{ horizon_galera_database }}',
|
||||
'USER': '{{ horizon_galera_user }}',
|
||||
'PASSWORD': '{{ horizon_container_mysql_password }}',
|
||||
|
@ -19,4 +19,4 @@ This role will install the following:
|
||||
vars:
|
||||
external_lb_vip_address: 172.16.24.1
|
||||
internal_lb_vip_address: 192.168.0.1
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
keystone_galera_address: "{{ internal_lb_vip_address }}"
|
||||
|
@ -17,7 +17,7 @@
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ keystone_galera_address }}"
|
||||
name: "{{ keystone_galera_database }}"
|
||||
state: "present"
|
||||
tags:
|
||||
@ -27,7 +27,7 @@
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ keystone_galera_address }}"
|
||||
name: "{{ keystone_galera_user }}"
|
||||
password: "{{ keystone_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -47,7 +47,7 @@ methods = {{ keystone_auth_methods }}
|
||||
|
||||
|
||||
[database]
|
||||
connection = mysql://{{ keystone_galera_user }}:{{ keystone_container_mysql_password }}@{{ galera_address }}/{{ keystone_galera_database }}?charset=utf8
|
||||
connection = mysql://{{ keystone_galera_user }}:{{ keystone_container_mysql_password }}@{{ keystone_galera_address }}/{{ keystone_galera_database }}?charset=utf8
|
||||
idle_timeout = {{ keystone_database_idle_timeout }}
|
||||
min_pool_size = {{ keystone_database_min_pool_size }}
|
||||
max_pool_size = {{ keystone_database_max_pool_size }}
|
||||
|
@ -17,4 +17,4 @@ This role will install the following:
|
||||
roles:
|
||||
- { role: "os_neutron", tags: [ "os-neutron" ] }
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
neutron_galera_address: "{{ internal_lb_vip_address }}"
|
||||
|
@ -17,7 +17,7 @@
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ neutron_galera_address }}"
|
||||
name: "{{ neutron_galera_database }}"
|
||||
state: "present"
|
||||
tags:
|
||||
@ -27,7 +27,7 @@
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ neutron_galera_address }}"
|
||||
name: "{{ neutron_galera_user }}"
|
||||
password: "{{ neutron_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -119,7 +119,7 @@ check_revocations_for_cached = False
|
||||
{% if inventory_hostname in groups['neutron_server'] %}
|
||||
|
||||
[database]
|
||||
connection = mysql://{{ neutron_galera_user }}:{{ neutron_container_mysql_password }}@{{ galera_address }}/{{ neutron_galera_database }}?charset=utf8
|
||||
connection = mysql://{{ neutron_galera_user }}:{{ neutron_container_mysql_password }}@{{ neutron_galera_address }}/{{ neutron_galera_database }}?charset=utf8
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
@ -24,4 +24,4 @@ This role will install the following:
|
||||
roles:
|
||||
- { role: "os_nova", tags: [ "os-nova" ] }
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
nova_galera_address: "{{ internal_lb_vip_address }}"
|
||||
|
@ -17,7 +17,7 @@
|
||||
mysql_db:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ nova_galera_address }}"
|
||||
name: "{{ nova_galera_database }}"
|
||||
state: "present"
|
||||
tags:
|
||||
@ -27,7 +27,7 @@
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "{{ galera_address }}"
|
||||
login_host: "{{ nova_galera_address }}"
|
||||
name: "{{ nova_galera_user }}"
|
||||
password: "{{ nova_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -176,7 +176,7 @@ check_revocations_for_cached = False
|
||||
|
||||
{% if inventory_hostname not in groups['nova_compute'] %}
|
||||
[database]
|
||||
connection = mysql://{{ nova_galera_user }}:{{ nova_container_mysql_password }}@{{ galera_address }}/{{ nova_galera_database }}?charset=utf8
|
||||
connection = mysql://{{ nova_galera_user }}:{{ nova_container_mysql_password }}@{{ nova_galera_address }}/{{ nova_galera_database }}?charset=utf8
|
||||
max_overflow = {{ nova_db_max_overflow }}
|
||||
max_pool_size = {{ nova_db_max_pool_size }}
|
||||
pool_timeout = {{ nova_db_pool_timeout }}
|
||||
|
@ -18,4 +18,3 @@ This role will install the following:
|
||||
vars:
|
||||
external_lb_vip_address: 172.16.24.1
|
||||
internal_lb_vip_address: 192.168.0.1
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
|
Loading…
Reference in New Issue
Block a user