897337cdd6
The only files in the docker image directories that differ majorly between distros are the Dockerfiles (e.g. different package manager mechanisms, different repo sources, etc). The supporting files such as the start.sh/check.sh and config files should largely stay the same between base images. This change moves these files up into a "common" directory, and symlinks them in the same way that the build script is managed. This means when adding a new base distro only new Dockerfiles need to be created. Also, if a distro does happen to require a vastly different start.sh script for example, one can choose to simply not symlink to the common and instead drop in a custom one. Implements: blueprint refactor-base-image-layout Change-Id: Ic4db69d31ff54a1fb95af4853a2e5ae490064284
25 lines
897 B
Bash
Executable File
25 lines
897 B
Bash
Executable File
#!/bin/bash
|
|
|
|
. /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
|