1c147e4def
- Updated the required variables to be sorted so that they are better visible one on each line - Removed variable defaults from each service scripts and added them to tools/genenv file which holds all default values Change-Id: Ia7b1b08ba3f963b46b81434ce84f476d56890a93 Closes-Bug: #1476494 Closes-Bug: #1467652
32 lines
938 B
Bash
Executable File
32 lines
938 B
Bash
Executable File
#!/bin/bash
|
|
|
|
. /opt/kolla/kolla-common.sh
|
|
. /opt/kolla/config-heat.sh
|
|
. /openrc
|
|
|
|
check_required_vars HEAT_DB_NAME \
|
|
HEAT_DB_PASSWORD \
|
|
HEAT_DB_USER \
|
|
HEAT_DOMAIN_PASS \
|
|
INIT_HEAT_DB
|
|
fail_unless_db
|
|
|
|
if [ "${INIT_HEAT_DB}" == "true" ]; then
|
|
mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
|
|
CREATE DATABASE IF NOT EXISTS ${HEAT_DB_NAME} DEFAULT CHARACTER SET utf8;
|
|
GRANT ALL PRIVILEGES ON ${HEAT_DB_NAME}.* TO
|
|
'${HEAT_DB_USER}'@'%' IDENTIFIED BY '${HEAT_DB_PASSWORD}'
|
|
EOF
|
|
|
|
/usr/bin/heat-manage db_sync
|
|
|
|
# If the database needs to be created, assume keystone-setup is allowed to
|
|
# run as well.
|
|
heat-keystone-setup-domain \
|
|
--stack-user-domain-name heat_user_domain \
|
|
--stack-domain-admin heat_domain_admin \
|
|
--stack-domain-admin-password ${HEAT_DOMAIN_PASS}
|
|
fi
|
|
|
|
exec /usr/bin/heat-engine
|