summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-04-16 12:13:17 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-04-16 12:15:05 +0800
commitdfe17e42ca2c6236a55f47a40a120a2a143b839d (patch)
treeeb9f301b556a1acddd99f25a489ac3124763a229 /docker
parent9a34158a3b25cc04d3a4a3771091bd243becdf09 (diff)
Fix docker init sh for nslcm
Change-Id: Ia94ec527150cffdd503a71b248968b7a98abf2c4 Issue-ID: VFC-1306 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'docker')
-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