Convert all DB config to nested
Change-Id: Iab018288f1a884a72ff687d89b68ca08df47ba06
This commit is contained in:
parent
e641c7ee57
commit
0b817fce6d
|
@ -1,4 +1,6 @@
|
|||
configs:
|
||||
db_max_timeout: 60
|
||||
db_root_password: password
|
||||
mariadb_port: 3306
|
||||
db:
|
||||
max_timeout: 60
|
||||
root_password: password
|
||||
mariadb:
|
||||
port: 3306
|
||||
|
|
|
@ -23,8 +23,8 @@ function bootstrap_db {
|
|||
wait $(jobs -p)
|
||||
}
|
||||
|
||||
DB_ROOT_PASSWORD="{{ db_root_password }}"
|
||||
DB_MAX_TIMEOUT="{{ db_max_timeout }}"
|
||||
DB_ROOT_PASSWORD="{{ db.root_password }}"
|
||||
DB_MAX_TIMEOUT="{{ db.max_timeout }}"
|
||||
|
||||
# Only update permissions if permissions need to be updated
|
||||
if [[ $(stat -c %U:%G /var/lib/mysql) != "mysql:mysql" ]]; then
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[mysqld]
|
||||
bind-address = {{ network_topology["private"]["address"] }}
|
||||
port = {{ mariadb_port }}
|
||||
port = {{ mariadb.port }}
|
||||
|
||||
datadir=/var/lib/mysql/
|
||||
log-error=/var/log/ccp/mysql/mysql.log
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
test -f /tmp/mariadb_ok && nc -z {{ network_topology["private"]["address"] }} {{ mariadb_port }}
|
||||
test -f /tmp/mariadb_ok && nc -z {{ network_topology["private"]["address"] }} {{ mariadb.port }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
service:
|
||||
name: mariadb
|
||||
ports:
|
||||
- {{ mariadb_port }}
|
||||
- {{ mariadb.port }}
|
||||
containers:
|
||||
- name: mariadb
|
||||
image: mariadb
|
||||
|
|
Loading…
Reference in New Issue