diff --git docker/monasca/monasca-api/extend_start.sh docker/monasca/monasca-api/extend_start.sh
index 6152e416a..5ea66ca4c 100644
--- docker/monasca/monasca-api/extend_start.sh
+++ docker/monasca/monasca-api/extend_start.sh
@@ -5,15 +5,7 @@ SERVICE="monasca-api"
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
- # Set the database name in the monasca database schema
- sed "s/USE \`mon\`;/USE \`${MONASCA_DATABASE_NAME}\`;/g" \
- /monasca-api/devstack/files/schema/mon_mysql.sql > /tmp/mon_mysql.sql
- # Load the schema
- mysql --host=${MONASCA_DATABASE_ADDRESS} \
- --port=${MONASCA_DATABASE_PORT} \
- --user=${MONASCA_DATABASE_USER} \
- --password=${MONASCA_DATABASE_PASSWORD} \
- < /tmp/mon_mysql.sql
+ monasca_db upgrade
exit 0
fi
Wasn't that handled with this commit?
commit ae8ce78e5517423 a9a971472bec061 079f1cabe7
Author: Doug Szumski <email address hidden>
Date: Wed Sep 19 16:34:04 2018 +0000
Use alembic migrations to deploy Monasca DB
Support has recently been added for managing the Monasca DB
with alembic. This change takes advantage of that.
Partially- Implements: blueprint monasca-containers 099e567b32de249 df9f0115e82
Change-Id: I89084ac0076eff
diff --git docker/ monasca/ monasca- api/extend_ start.sh docker/ monasca/ monasca- api/extend_ start.sh .5ea66ca4c 100644 monasca/ monasca- api/extend_ start.sh monasca/ monasca- api/extend_ start.sh "monasca- api" BOOTSTRAP[ @]}" ]]; then DATABASE_ NAME}\` ;/g" \ api/devstack/ files/schema/ mon_mysql. sql > /tmp/mon_mysql.sql ${MONASCA_ DATABASE_ ADDRESS} \ ${MONASCA_ DATABASE_ PORT} \ ${MONASCA_ DATABASE_ USER} \ ${MONASCA_ DATABASE_ PASSWORD} \
index 6152e416a.
--- docker/
+++ docker/
@@ -5,15 +5,7 @@ SERVICE=
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_
- # Set the database name in the monasca database schema
- sed "s/USE \`mon\`;/USE \`${MONASCA_
- /monasca-
- # Load the schema
- mysql --host=
- --port=
- --user=
- --password=
- < /tmp/mon_mysql.sql
+ monasca_db upgrade
exit 0
fi