summaryrefslogtreecommitdiffstats
path: root/docker/instance_init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/instance_init.sh')
-rwxr-xr-xdocker/instance_init.sh16
1 files changed, 3 insertions, 13 deletions
diff --git a/docker/instance_init.sh b/docker/instance_init.sh
index 8cf31ca6..fdf64736 100755
--- a/docker/instance_init.sh
+++ b/docker/instance_init.sh
@@ -12,25 +12,15 @@ else
MYSQL_ROOT_PASSWORD="root"
fi
-
function create_database {
-
cd /service/vfc/nfvo/lcm/resources/bin
bash initDB.sh $MYSQL_ROOT_USER $MYSQL_ROOT_PASSWORD $MYSQL_PORT $MYSQL_IP
+}
- }
function migrate_database {
cd /service/vfc/nfvo/lcm
- python manage.py makemigrations database
-# python manage.py migrate --fake
python manage.py migrate
}
-
-GET_NSLCM_DB="show databases like 'vfcnfvolcm';"
-NSLCM_DB=`mysql -u$MYSQL_ROOT_USER -p$MYSQL_ROOT_PASSWORD -P$MYSQL_PORT -h$MYSQL_IP -e "GET_NSLCM_DB"`
-if [[ "$NSLCM_DB" == "" ]]; then
- create_database
- migrate_database
-fi
-
+create_database
+migrate_database