Edit services roles to support database sharding
Depends-On: https://review.opendev.org/c/openstack/kolla/+/769385 Depends-On: https://review.opendev.org/c/openstack/kolla/+/765781 Change-Id: I3c4182a6556dafd2c936eaab109a068674058fca
This commit is contained in:
parent
c31471fa84
commit
baad47ac61
@ -1031,6 +1031,11 @@ nova_safety_upgrade: "no"
|
||||
# Valid options are [ none, novnc, spice ]
|
||||
nova_console: "novnc"
|
||||
|
||||
#######################
|
||||
# Nova Database
|
||||
#######################
|
||||
nova_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
|
||||
#######################
|
||||
# Murano options
|
||||
#######################
|
||||
|
@ -63,6 +63,20 @@ aodh_database_name: "aodh"
|
||||
aodh_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}aodh{% endif %}"
|
||||
aodh_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
aodh_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ aodh_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
aodh_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
aodh_database_shard:
|
||||
users:
|
||||
- user: "{{ aodh_database_user }}"
|
||||
password: "{{ aodh_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ aodh_database_name }}"
|
||||
shard_id: "{{ aodh_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Notification
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ aodh_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ aodh_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ aodh_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ aodh_database_user }}"
|
||||
password: "{{ aodh_database_password }}"
|
||||
|
@ -48,6 +48,19 @@ barbican_database_name: "barbican"
|
||||
barbican_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}barbican{% endif %}"
|
||||
barbican_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
barbican_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ barbican_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
barbican_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
barbican_database_shard:
|
||||
users:
|
||||
- user: "{{ barbican_database_user }}"
|
||||
password: "{{ barbican_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ barbican_database_name }}"
|
||||
shard_id: "{{ barbican_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ barbican_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ barbican_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ barbican_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ barbican_database_user }}"
|
||||
password: "{{ barbican_database_password }}"
|
||||
|
@ -41,6 +41,19 @@ blazar_database_name: "blazar"
|
||||
blazar_database_user: "blazar"
|
||||
blazar_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
blazar_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ blazar_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
blazar_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
blazar_database_shard:
|
||||
users:
|
||||
- user: "{{ blazar_database_user }}"
|
||||
password: "{{ blazar_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ blazar_database_name }}"
|
||||
shard_id: "{{ blazar_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ blazar_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ blazar_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ blazar_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ blazar_database_name }}"
|
||||
password: "{{ blazar_database_password }}"
|
||||
|
@ -59,6 +59,20 @@ cinder_database_name: "cinder"
|
||||
cinder_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}cinder{% endif %}"
|
||||
cinder_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
cinder_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ cinder_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
cinder_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
cinder_database_shard:
|
||||
users:
|
||||
- user: "{{ cinder_database_user }}"
|
||||
password: "{{ cinder_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ cinder_database_name }}"
|
||||
shard_id: "{{ cinder_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ cinder_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ cinder_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ cinder_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ cinder_database_user }}"
|
||||
password: "{{ cinder_database_password }}"
|
||||
|
@ -36,6 +36,19 @@ cloudkitty_database_name: "cloudkitty"
|
||||
cloudkitty_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}cloudkitty{% endif %}"
|
||||
cloudkitty_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
cloudkitty_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ cloudkitty_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
cloudkitty_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
cloudkitty_database_shard:
|
||||
users:
|
||||
- user: "{{ cloudkitty_database_user }}"
|
||||
password: "{{ cloudkitty_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ cloudkitty_database_name }}"
|
||||
shard_id: "{{ cloudkitty_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ cloudkitty_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ cloudkitty_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ cloudkitty_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ cloudkitty_database_user }}"
|
||||
password: "{{ cloudkitty_database_password }}"
|
||||
|
@ -33,6 +33,20 @@ cyborg_database_name: "cyborg"
|
||||
cyborg_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}cyborg{% endif %}"
|
||||
cyborg_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
cyborg_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ cyborg_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
cyborg_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
cyborg_database_shard:
|
||||
users:
|
||||
- user: "{{ cyborg_database_user }}"
|
||||
password: "{{ cyborg_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ cyborg_database_name }}"
|
||||
shard_id: "{{ cyborg_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ cyborg_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ cyborg_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ cyborg_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ cyborg_database_user }}"
|
||||
password: "{{ cyborg_database_password }}"
|
||||
|
@ -78,6 +78,19 @@ designate_database_name: "designate"
|
||||
designate_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}designate{% endif %}"
|
||||
designate_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
designate_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ designate_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
designate_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
designate_database_shard:
|
||||
users:
|
||||
- user: "{{ designate_database_user }}"
|
||||
password: "{{ designate_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ designate_database_name }}"
|
||||
shard_id: "{{ designate_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ designate_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ item }}"
|
||||
run_once: True
|
||||
@ -23,7 +23,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ designate_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ item.database_user }}"
|
||||
password: "{{ item.database_password }}"
|
||||
|
@ -38,6 +38,20 @@ freezer_es_protocol: "{{ internal_protocol }}"
|
||||
freezer_es_address: "{{ elasticsearch_address }}"
|
||||
freezer_es_port: "{{ elasticsearch_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
freezer_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ freezer_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
freezer_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
freezer_database_shard:
|
||||
users:
|
||||
- user: "{{ freezer_database_user }}"
|
||||
password: "{{ freezer_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ freezer_database_name }}"
|
||||
shard_id: "{{ freezer_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
####################
|
||||
|
@ -5,7 +5,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ freezer_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ freezer_database_name }}"
|
||||
become: true
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ freezer_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ freezer_database_user }}"
|
||||
password: "{{ freezer_database_password }}"
|
||||
|
@ -104,6 +104,19 @@ glance_database_name: "glance"
|
||||
glance_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}glance{% endif %}"
|
||||
glance_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
glance_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ glance_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
glance_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
glance_database_shard:
|
||||
users:
|
||||
- user: "{{ glance_database_user }}"
|
||||
password: "{{ glance_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ glance_database_name }}"
|
||||
shard_id: "{{ glance_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# HAProxy
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ glance_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ glance_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ glance_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ glance_database_user }}"
|
||||
password: "{{ glance_database_password }}"
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ glance_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
variable: log_bin_trust_function_creators
|
||||
value: 1
|
||||
@ -42,7 +42,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ glance_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
variable: log_bin_trust_function_creators
|
||||
value: 0
|
||||
|
@ -17,7 +17,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ glance_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
variable: log_bin_trust_function_creators
|
||||
value: 1
|
||||
@ -107,7 +107,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ glance_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
variable: log_bin_trust_function_creators
|
||||
value: 0
|
||||
|
@ -51,6 +51,19 @@ gnocchi_database_name: "gnocchi"
|
||||
gnocchi_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}gnocchi{% endif %}"
|
||||
gnocchi_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
gnocchi_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ gnocchi_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
gnocchi_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
gnocchi_database_shard:
|
||||
users:
|
||||
- user: "{{ gnocchi_database_user }}"
|
||||
password: "{{ gnocchi_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ gnocchi_database_name }}"
|
||||
shard_id: "{{ gnocchi_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ gnocchi_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ gnocchi_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ gnocchi_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ gnocchi_database_user }}"
|
||||
password: "{{ gnocchi_database_password }}"
|
||||
|
@ -26,6 +26,20 @@ grafana_database_name: "grafana"
|
||||
grafana_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}grafana{% endif %}"
|
||||
grafana_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
grafana_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ grafana_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
grafana_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
grafana_database_shard:
|
||||
users:
|
||||
- user: "{{ grafana_database_user }}"
|
||||
password: "{{ grafana_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ grafana_database_name }}"
|
||||
shard_id: "{{ grafana_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Datasource
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ grafana_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ grafana_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ grafana_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ grafana_database_user }}"
|
||||
password: "{{ grafana_database_password }}"
|
||||
|
@ -62,6 +62,19 @@ heat_database_name: "heat"
|
||||
heat_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}heat{% endif %}"
|
||||
heat_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
heat_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ heat_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
heat_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
heat_database_shard:
|
||||
users:
|
||||
- user: "{{ heat_database_user }}"
|
||||
password: "{{ heat_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ heat_database_name }}"
|
||||
shard_id: "{{ heat_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ heat_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ heat_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ heat_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ heat_database_user }}"
|
||||
password: "{{ heat_database_password }}"
|
||||
|
@ -84,6 +84,20 @@ horizon_database_name: "horizon"
|
||||
horizon_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}horizon{% endif %}"
|
||||
horizon_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
horizon_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ horizon_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
horizon_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
horizon_database_shard:
|
||||
users:
|
||||
- user: "{{ horizon_database_user }}"
|
||||
password: "{{ horizon_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ horizon_database_name }}"
|
||||
shard_id: "{{ horizon_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ horizon_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ horizon_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ horizon_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ horizon_database_user }}"
|
||||
password: "{{ horizon_database_password }}"
|
||||
|
@ -96,6 +96,22 @@ ironic_inspector_database_name: "ironic_inspector"
|
||||
ironic_inspector_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}ironic_inspector{% endif %}"
|
||||
ironic_inspector_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
ironic_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ ironic_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
ironic_database_shard:
|
||||
users:
|
||||
- user: "{{ ironic_database_user }}"
|
||||
password: "{{ ironic_database_password }}"
|
||||
- user: "{{ ironic_inspector_database_user }}"
|
||||
password: "{{ ironic_inspector_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ ironic_database_name }}"
|
||||
shard_id: "{{ ironic_database_shard_id }}"
|
||||
- schema: "{{ ironic_inspector_database_name }}"
|
||||
shard_id: "{{ ironic_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ ironic_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ item.database_name }}"
|
||||
run_once: True
|
||||
@ -27,7 +27,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ ironic_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ item.database_user }}"
|
||||
password: "{{ item.database_password }}"
|
||||
|
@ -68,6 +68,19 @@ keystone_database_name: "keystone"
|
||||
keystone_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}keystone{% endif %}"
|
||||
keystone_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
keystone_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ keystone_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
keystone_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
keystone_database_shard:
|
||||
users:
|
||||
- user: "{{ keystone_database_user }}"
|
||||
password: "{{ keystone_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ keystone_database_name }}"
|
||||
shard_id: "{{ keystone_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Fernet
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ keystone_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ keystone_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ keystone_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ keystone_database_user }}"
|
||||
password: "{{ keystone_database_password }}"
|
||||
|
@ -10,7 +10,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ keystone_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
variable: log_bin_trust_function_creators
|
||||
value: 1
|
||||
@ -39,7 +39,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ keystone_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
variable: log_bin_trust_function_creators
|
||||
value: 0
|
||||
|
@ -39,6 +39,19 @@ magnum_database_name: "magnum"
|
||||
magnum_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}magnum{% endif %}"
|
||||
magnum_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
magnum_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ magnum_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
magnum_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
magnum_database_shard:
|
||||
users:
|
||||
- user: "{{ magnum_database_user }}"
|
||||
password: "{{ magnum_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ magnum_database_name }}"
|
||||
shard_id: "{{ magnum_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Magnum
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ magnum_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ magnum_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ magnum_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ magnum_database_user }}"
|
||||
password: "{{ magnum_database_password }}"
|
||||
|
@ -54,6 +54,19 @@ manila_database_name: "manila"
|
||||
manila_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}manila{% endif %}"
|
||||
manila_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
manila_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ manila_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
manila_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
manila_database_shard:
|
||||
users:
|
||||
- user: "{{ manila_database_user }}"
|
||||
password: "{{ manila_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ manila_database_name }}"
|
||||
shard_id: "{{ manila_database_shard_id }}"
|
||||
|
||||
|
||||
#####################
|
||||
## Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ manila_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ manila_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ manila_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ manila_database_user }}"
|
||||
password: "{{ manila_database_password }}"
|
||||
|
@ -120,3 +120,4 @@ enable_mariadb_clustercheck: "{{ enable_haproxy }}"
|
||||
# Sharding
|
||||
####################
|
||||
mariadb_shard_database_user: "{% if mariadb_loadbalancer == 'haproxy' %}{{ database_user }}{% else %}{{ mariadb_shard_root_user_prefix }}{{ mariadb_shard_id | string }}{% endif %}"
|
||||
mariadb_database_shard: "{{ mariadb_shards_info }}"
|
||||
|
@ -50,6 +50,20 @@ masakari_database_name: "masakari"
|
||||
masakari_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}masakari{% endif %}"
|
||||
masakari_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
masakari_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ masakari_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
masakari_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
masakari_database_shard:
|
||||
users:
|
||||
- user: "{{ masakari_database_user }}"
|
||||
password: "{{ masakari_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ masakari_database_name }}"
|
||||
shard_id: "{{ masakari_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ masakari_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ masakari_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ masakari_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ masakari_database_user }}"
|
||||
password: "{{ masakari_database_password }}"
|
||||
|
@ -52,6 +52,19 @@ mistral_database_name: "mistral"
|
||||
mistral_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}mistral{% endif %}"
|
||||
mistral_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
mistral_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ mistral_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
mistral_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
mistral_database_shard:
|
||||
users:
|
||||
- user: "{{ mistral_database_user }}"
|
||||
password: "{{ mistral_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ mistral_database_name }}"
|
||||
shard_id: "{{ mistral_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ mistral_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ mistral_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ mistral_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ mistral_database_user }}"
|
||||
password: "{{ mistral_database_password }}"
|
||||
|
@ -95,6 +95,21 @@ monasca_influxdb_retention_policy:
|
||||
duration: "1w"
|
||||
replication_count: 1
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
monasca_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ monasca_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
monasca_database_shard:
|
||||
users:
|
||||
- user: "{{ monasca_database_user }}"
|
||||
password: "{{ monasca_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ monasca_database_name }}"
|
||||
shard_id: "{{ monasca_database_shard_id }}"
|
||||
- schema: "{{ monasca_grafana_database_name }}"
|
||||
shard_id: "{{ monasca_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Monasca
|
||||
####################
|
||||
|
@ -1,12 +1,12 @@
|
||||
---
|
||||
- name: Creating monasca database
|
||||
- name: Creating monasca databases
|
||||
become: true
|
||||
kolla_toolbox:
|
||||
module_name: mysql_db
|
||||
module_args:
|
||||
login_host: "{{ monasca_database_address }}"
|
||||
login_port: "{{ monasca_database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ monasca_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ item }}"
|
||||
run_once: True
|
||||
@ -23,7 +23,7 @@
|
||||
module_args:
|
||||
login_host: "{{ monasca_database_address }}"
|
||||
login_port: "{{ monasca_database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ monasca_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ monasca_database_user }}"
|
||||
password: "{{ monasca_database_password }}"
|
||||
|
@ -34,6 +34,19 @@ murano_database_name: "murano"
|
||||
murano_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}murano{% endif %}"
|
||||
murano_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
murano_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ murano_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
murano_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
murano_database_shard:
|
||||
users:
|
||||
- user: "{{ murano_database_user }}"
|
||||
password: "{{ murano_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ murano_database_name }}"
|
||||
shard_id: "{{ murano_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ murano_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ murano_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ murano_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ murano_database_user }}"
|
||||
password: "{{ murano_database_password }}"
|
||||
|
@ -206,6 +206,19 @@ neutron_database_name: "neutron"
|
||||
neutron_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}neutron{% endif %}"
|
||||
neutron_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
neutron_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ neutron_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
neutron_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
neutron_database_shard:
|
||||
users:
|
||||
- user: "{{ neutron_database_user }}"
|
||||
password: "{{ neutron_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ neutron_database_name }}"
|
||||
shard_id: "{{ neutron_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ neutron_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ neutron_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ neutron_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ neutron_database_user }}"
|
||||
password: "{{ neutron_database_password }}"
|
||||
|
@ -136,7 +136,7 @@ nova_cell_serialproxy_group: 'nova-serialproxy'
|
||||
####################
|
||||
# Database
|
||||
####################
|
||||
nova_cell_database_admin_user: "{{ database_user }}"
|
||||
nova_cell_database_admin_user: "{{ nova_cell_database_shard_root_user }}"
|
||||
nova_cell_database_admin_password: "{{ database_password }}"
|
||||
|
||||
nova_cell_database_name: "{{ 'nova_' ~ nova_cell_name if nova_cell_name else 'nova' }}"
|
||||
@ -156,6 +156,23 @@ nova_api_database_address: "{{ database_address | put_address_in_context('url')
|
||||
# Optional group for cell database. If this is not defined, then the top level database is used.
|
||||
# nova_cell_database_group:
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
# If nova-cell is used and proxied through proxysql
|
||||
# define nova_cell_database_shard_id to shard_id
|
||||
# where cell's DB will be installed.
|
||||
#
|
||||
# If nova-cell is not used and DBs are proxied
|
||||
# through proxysql shards are same:
|
||||
# - nova_cell_database_shard_id = nova_database_shard_id
|
||||
nova_cell_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ nova_cell_database_shard_id | default(nova_database_shard_id) }}{% else %}{{ database_user }}{% endif %}"
|
||||
nova_cell_database_shard:
|
||||
users:
|
||||
- user: "{{ nova_cell_database_user }}"
|
||||
password: "{{ nova_cell_database_password }}"
|
||||
rules: "{% set rules = [] %}{% for host in groups['nova-conductor'] %}{{ rules.append({'schema': 'nova_' ~ hostvars[host]['nova_cell_name'] if hostvars[host]['nova_cell_name'] is defined else 'nova', 'shard_id': hostvars[host]['nova_cell_database_shard_id'] if (hostvars[host]['nova_cell_name'] is defined and hostvars[host]['nova_cell_database_shard_id'] is defined ) else nova_database_shard_id}) }}{% endfor %}{{ rules }}"
|
||||
|
||||
####################
|
||||
# RabbitMQ
|
||||
####################
|
||||
|
@ -72,6 +72,25 @@ nova_api_database_name: "nova_api"
|
||||
nova_api_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}nova_api{% endif %}"
|
||||
nova_api_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
nova_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ nova_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
nova_database_shard:
|
||||
users:
|
||||
- user: "{{ nova_database_user }}"
|
||||
password: "{{ nova_database_password }}"
|
||||
- user: "{{ nova_api_database_user }}"
|
||||
password: "{{ nova_api_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ nova_database_name }}"
|
||||
shard_id: "{{ nova_database_shard_id }}"
|
||||
- schema: "{{ nova_cell0_database_name }}"
|
||||
shard_id: "{{ nova_database_shard_id }}"
|
||||
- schema: "{{ nova_api_database_name }}"
|
||||
shard_id: "{{ nova_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ nova_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ item }}"
|
||||
run_once: True
|
||||
@ -23,7 +23,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ nova_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ item.database_username }}"
|
||||
password: "{{ item.database_password }}"
|
||||
|
@ -70,6 +70,19 @@ octavia_database_name: "octavia"
|
||||
octavia_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}octavia{% endif %}"
|
||||
octavia_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
octavia_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ octavia_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
octavia_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
octavia_database_shard:
|
||||
users:
|
||||
- user: "{{ octavia_database_user }}"
|
||||
password: "{{ octavia_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ octavia_database_name }}"
|
||||
shard_id: "{{ octavia_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ octavia_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ octavia_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ octavia_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ octavia_database_user }}"
|
||||
password: "{{ octavia_database_password }}"
|
||||
|
@ -31,6 +31,20 @@ placement_database_name: "placement"
|
||||
placement_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}placement{% endif %}"
|
||||
placement_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
placement_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ placement_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
placement_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
placement_database_shard:
|
||||
users:
|
||||
- user: "{{ placement_database_user }}"
|
||||
password: "{{ placement_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ placement_database_name }}"
|
||||
shard_id: "{{ placement_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ placement_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ placement_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ placement_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ placement_database_user }}"
|
||||
password: "{{ placement_database_password }}"
|
||||
|
@ -1,20 +1,27 @@
|
||||
---
|
||||
- name: Creating prometheus database user and setting permissions
|
||||
become: true
|
||||
vars:
|
||||
shard_id: "{{ item.key }}"
|
||||
shard_root_user: "{{ mariadb_shard_root_user_prefix }}{{ shard_id | string }}"
|
||||
shard_host: "{{ mariadb_shards_info.shards[shard_id].hosts[0] }}"
|
||||
kolla_toolbox:
|
||||
module_name: mysql_user
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_port: "{{ mariadb_port }}"
|
||||
login_user: "{{ shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ prometheus_mysql_exporter_database_user }}"
|
||||
password: "{{ prometheus_mysql_exporter_database_password }}"
|
||||
host: "%"
|
||||
priv: "*.*:PROCESS,SLAVE MONITOR,SELECT"
|
||||
append_privs: "yes"
|
||||
with_dict: "{{ mariadb_shards_info.shards }}"
|
||||
loop_control:
|
||||
label: "{{ shard_host }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups['prometheus'][0] }}"
|
||||
when:
|
||||
- inventory_hostname == groups['prometheus'][0]
|
||||
- enable_prometheus_mysqld_exporter | bool
|
||||
- not use_preconfigured_databases | bool
|
||||
|
@ -37,6 +37,19 @@ sahara_database_name: "sahara"
|
||||
sahara_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}sahara{% endif %}"
|
||||
sahara_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
sahara_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ sahara_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
sahara_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
sahara_database_shard:
|
||||
users:
|
||||
- user: "{{ sahara_database_user }}"
|
||||
password: "{{ sahara_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ sahara_database_name }}"
|
||||
shard_id: "{{ sahara_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ sahara_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ sahara_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ sahara_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ sahara_database_user }}"
|
||||
password: "{{ sahara_database_password }}"
|
||||
|
@ -53,6 +53,19 @@ senlin_database_name: "senlin"
|
||||
senlin_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}senlin{% endif %}"
|
||||
senlin_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
senlin_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ senlin_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
senlin_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
senlin_database_shard:
|
||||
users:
|
||||
- user: "{{ senlin_database_user }}"
|
||||
password: "{{ senlin_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ senlin_database_name }}"
|
||||
shard_id: "{{ senlin_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ senlin_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ senlin_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ senlin_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ senlin_database_user }}"
|
||||
password: "{{ senlin_database_password }}"
|
||||
|
@ -65,6 +65,19 @@ solum_database_name: "solum"
|
||||
solum_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}solum{% endif %}"
|
||||
solum_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
solum_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ solum_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
solum_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
solum_database_shard:
|
||||
users:
|
||||
- user: "{{ solum_database_user }}"
|
||||
password: "{{ solum_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ solum_database_name }}"
|
||||
shard_id: "{{ solum_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ solum_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ solum_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ solum_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ solum_database_user }}"
|
||||
password: "{{ solum_database_password }}"
|
||||
|
@ -39,6 +39,20 @@ tacker_database_name: "tacker"
|
||||
tacker_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}tacker{% endif %}"
|
||||
tacker_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
tacker_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ tacker_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
tacker_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
tacker_database_shard:
|
||||
users:
|
||||
- user: "{{ tacker_database_user }}"
|
||||
password: "{{ tacker_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ tacker_database_name }}"
|
||||
shard_id: "{{ tacker_database_shard_id }}"
|
||||
|
||||
|
||||
########
|
||||
# Docker
|
||||
########
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ tacker_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ tacker_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ tacker_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ tacker_database_user }}"
|
||||
password: "{{ tacker_database_password }}"
|
||||
|
@ -44,6 +44,19 @@ trove_database_name: "trove"
|
||||
trove_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}trove{% endif %}"
|
||||
trove_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
trove_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ trove_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
trove_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
trove_database_shard:
|
||||
users:
|
||||
- user: "{{ trove_database_user }}"
|
||||
password: "{{ trove_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ trove_database_name }}"
|
||||
shard_id: "{{ trove_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ trove_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ trove_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ trove_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ trove_database_user }}"
|
||||
password: "{{ trove_database_password }}"
|
||||
|
@ -59,6 +59,20 @@ vitrage_database_name: "vitrage"
|
||||
vitrage_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}vitrage{% endif %}"
|
||||
vitrage_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
vitrage_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ vitrage_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
vitrage_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
vitrage_database_shard:
|
||||
users:
|
||||
- user: "{{ vitrage_database_user }}"
|
||||
password: "{{ vitrage_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ vitrage_database_name }}"
|
||||
shard_id: "{{ vitrage_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
####################
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ vitrage_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ vitrage_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ vitrage_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ vitrage_database_user }}"
|
||||
password: "{{ vitrage_database_password }}"
|
||||
|
@ -44,6 +44,19 @@ watcher_database_name: "watcher"
|
||||
watcher_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}watcher{% endif %}"
|
||||
watcher_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
watcher_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ watcher_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
watcher_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
watcher_database_shard:
|
||||
users:
|
||||
- user: "{{ watcher_database_user }}"
|
||||
password: "{{ watcher_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ watcher_database_name }}"
|
||||
shard_id: "{{ watcher_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
# Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ watcher_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ watcher_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ watcher_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ watcher_database_user }}"
|
||||
password: "{{ watcher_database_password }}"
|
||||
|
@ -64,6 +64,19 @@ zun_database_name: "zun"
|
||||
zun_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}zun{% endif %}"
|
||||
zun_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
|
||||
|
||||
####################
|
||||
# Database sharding
|
||||
####################
|
||||
zun_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ zun_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
|
||||
zun_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
|
||||
zun_database_shard:
|
||||
users:
|
||||
- user: "{{ zun_database_user }}"
|
||||
password: "{{ zun_database_password }}"
|
||||
rules:
|
||||
- schema: "{{ zun_database_name }}"
|
||||
shard_id: "{{ zun_database_shard_id }}"
|
||||
|
||||
|
||||
####################
|
||||
## Docker
|
||||
|
@ -6,7 +6,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ zun_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ zun_database_name }}"
|
||||
run_once: True
|
||||
@ -21,7 +21,7 @@
|
||||
module_args:
|
||||
login_host: "{{ database_address }}"
|
||||
login_port: "{{ database_port }}"
|
||||
login_user: "{{ database_user }}"
|
||||
login_user: "{{ zun_database_shard_root_user }}"
|
||||
login_password: "{{ database_password }}"
|
||||
name: "{{ zun_database_user }}"
|
||||
password: "{{ zun_database_password }}"
|
||||
|
Loading…
Reference in New Issue
Block a user