5547b5fe78
Previously, the database container was configured for use with Kubernetes. This patch removed any k8s dependencies, adds a script to manage mysql server.cnf settings and splits data and app containers. Splitting the containers provides additional portability and operational efficiencies compared to host mounts. Change-Id: I80656450c02dda5f2959d187eec20d5877dc54a2
25 lines
893 B
Bash
Executable File
25 lines
893 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /opt/kolla/kolla-common.sh
|
|
|
|
: ${BIND_ADDRESS:=$PUBLIC_IP}
|
|
: ${DB_ROOT_PASSWORD:=$DB_ROOT_PASSWORD}
|
|
: ${DEFAULT_STORAGE_ENGINE:=innodb}
|
|
: ${COLLATION_SERVER:=utf8_general_ci}
|
|
: ${INIT_CONNECT:=SET NAMES utf8}
|
|
: ${CHAR_SET_SERVER:=utf8}
|
|
: ${INNODB_FILE_PER_TABLE:=true}
|
|
: ${DATADIR:=/var/lib/mysql}
|
|
: ${TEMP_FILE:='/tmp/mysql-first-time.sql'}
|
|
|
|
server_cnf=/etc/my.cnf.d/server.cnf
|
|
|
|
crudini --set $server_cnf mysqld bind-address $BIND_ADDRESS
|
|
crudini --set $server_cnf mysqld default-storage-engine $DEFAULT_STORAGE_ENGINE
|
|
crudini --set $server_cnf mysqld collation-server $COLLATION_SERVER
|
|
crudini --set $server_cnf mysqld init-connect "'${INIT_CONNECT}'"
|
|
crudini --set $server_cnf mysqld character-set-server $CHAR_SET_SERVER
|
|
if [ "${INNODB_FILE_PER_TABLE}" == "true" ] || ["${INNODB_FILE_PER_TABLE}" == "True" ] ; then
|
|
crudini --set $server_cnf mysqld innodb_file_per_table 1
|
|
fi
|