Support using external DBs in Monasca
This changes allows the user to configure a Monasca database which may be different from the default database. Partially-Implements: blueprint monasca-roles Change-Id: Ia905190b8037ecb1782a758c0b65581fe9024bf6
This commit is contained in:
parent
195fec4d8d
commit
6cbb5cbdb4
@ -144,7 +144,8 @@ monasca_services:
|
|||||||
####################
|
####################
|
||||||
monasca_database_name: "monasca"
|
monasca_database_name: "monasca"
|
||||||
monasca_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}monasca{% endif %}"
|
monasca_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}monasca{% endif %}"
|
||||||
monasca_database_address: "{{ database_address }}:{{ database_port }}"
|
monasca_database_address: "{{ database_address }}"
|
||||||
|
monasca_database_port: "{{ database_port }}"
|
||||||
|
|
||||||
monasca_influxdb_name: "monasca"
|
monasca_influxdb_name: "monasca"
|
||||||
monasca_influxdb_address: "{{ kolla_internal_fqdn }}"
|
monasca_influxdb_address: "{{ kolla_internal_fqdn }}"
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
kolla_toolbox:
|
kolla_toolbox:
|
||||||
module_name: mysql_db
|
module_name: mysql_db
|
||||||
module_args:
|
module_args:
|
||||||
login_host: "{{ database_address }}"
|
login_host: "{{ monasca_database_address }}"
|
||||||
login_port: "{{ database_port }}"
|
login_port: "{{ monasca_database_port }}"
|
||||||
login_user: "{{ database_user }}"
|
login_user: "{{ database_user }}"
|
||||||
login_password: "{{ database_password }}"
|
login_password: "{{ database_password }}"
|
||||||
name: "{{ monasca_database_name }}"
|
name: "{{ monasca_database_name }}"
|
||||||
@ -18,8 +18,8 @@
|
|||||||
kolla_toolbox:
|
kolla_toolbox:
|
||||||
module_name: mysql_user
|
module_name: mysql_user
|
||||||
module_args:
|
module_args:
|
||||||
login_host: "{{ database_address }}"
|
login_host: "{{ monasca_database_address }}"
|
||||||
login_port: "{{ database_port }}"
|
login_port: "{{ monasca_database_port }}"
|
||||||
login_user: "{{ database_user }}"
|
login_user: "{{ database_user }}"
|
||||||
login_password: "{{ database_password }}"
|
login_password: "{{ database_password }}"
|
||||||
name: "{{ monasca_database_user }}"
|
name: "{{ monasca_database_user }}"
|
||||||
|
@ -6,7 +6,7 @@ region = {{ openstack_region_name }}
|
|||||||
|
|
||||||
[database]
|
[database]
|
||||||
database = {{ monasca_database_name }}
|
database = {{ monasca_database_name }}
|
||||||
connection = mysql+pymysql://{{ monasca_database_user }}:{{ monasca_database_password }}@{{ monasca_database_address }}/{{ monasca_database_name }}
|
connection = mysql+pymysql://{{ monasca_database_user }}:{{ monasca_database_password }}@{{ monasca_database_address }}:{{ monasca_database_port }}/{{ monasca_database_name }}
|
||||||
|
|
||||||
[influxdb]
|
[influxdb]
|
||||||
database_name = {{ monasca_influxdb_name }}
|
database_name = {{ monasca_influxdb_name }}
|
||||||
|
@ -11,8 +11,8 @@ notification_retry_topic = {{ monasca_alarm_notifications_retry_topic }}
|
|||||||
periodic = {{ monasca_periodic_notifications_period }}:{{ monasca_periodic_notifications_topic }}
|
periodic = {{ monasca_periodic_notifications_period }}:{{ monasca_periodic_notifications_topic }}
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
host = {{ database_address }}
|
host = {{ monasca_database_address }}
|
||||||
port = {{ database_port }}
|
port = {{ monasca_database_port }}
|
||||||
user = {{ monasca_database_user }}
|
user = {{ monasca_database_user }}
|
||||||
passwd = {{ monasca_database_password }}
|
passwd = {{ monasca_database_password }}
|
||||||
db = {{ monasca_database_name }}
|
db = {{ monasca_database_name }}
|
||||||
|
@ -109,7 +109,7 @@ sporadicMetricNamespaces:
|
|||||||
|
|
||||||
database:
|
database:
|
||||||
driverClass: org.drizzle.jdbc.DrizzleDriver
|
driverClass: org.drizzle.jdbc.DrizzleDriver
|
||||||
url: "jdbc:drizzle://{{ monasca_database_address }}/{{ monasca_database_name }}"
|
url: "jdbc:drizzle://{{ monasca_database_address }}:{{ monasca_database_port }}/{{ monasca_database_name }}"
|
||||||
user: "{{ monasca_database_user }}"
|
user: "{{ monasca_database_user }}"
|
||||||
password: "{{ monasca_database_password }}"
|
password: "{{ monasca_database_password }}"
|
||||||
properties:
|
properties:
|
||||||
@ -126,7 +126,7 @@ database:
|
|||||||
# hibernate provider class
|
# hibernate provider class
|
||||||
providerClass: com.zaxxer.hikari.hibernate.HikariConnectionProvider
|
providerClass: com.zaxxer.hikari.hibernate.HikariConnectionProvider
|
||||||
databaseName: "{{ monasca_database_name }}"
|
databaseName: "{{ monasca_database_name }}"
|
||||||
serverName: "{{ database_address }}"
|
serverName: "{{ monasca_database_address }}"
|
||||||
portNumber: "{{ database_port }}"
|
portNumber: "{{ monasca_database_port }}"
|
||||||
# hibernate auto configuration parameter
|
# hibernate auto configuration parameter
|
||||||
autoConfig: validate
|
autoConfig: validate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user