summaryrefslogtreecommitdiffstats
path: root/lcm/docker
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2020-02-28 15:14:46 +0800
committeryangyan <yangyanyj@chinamobile.com>2020-02-28 15:14:51 +0800
commit39434e7941976c1fc0b00e55b114615c7b659473 (patch)
treefc445ae22e5b64b994759e1747ef1bcb31dff70e /lcm/docker
parent4c6798812e146d7fd8228bb9406e899a9b57fb39 (diff)
Change the value of the password after obtaining encryption and fix some typo error and regist REG_TO_MSB_WHEN_START to config.y
Change-Id: I45a0aedc2db77a191167fad724cc019acbc364f9 Issue-ID: VFC-1600 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'lcm/docker')
-rwxr-xr-xlcm/docker/docker-entrypoint.sh4
-rwxr-xr-xlcm/docker/instance_config.sh4
-rwxr-xr-xlcm/docker/instance_init.sh10
3 files changed, 11 insertions, 7 deletions
diff --git a/lcm/docker/docker-entrypoint.sh b/lcm/docker/docker-entrypoint.sh
index ae9f6d7b..0e1abc93 100755
--- a/lcm/docker/docker-entrypoint.sh
+++ b/lcm/docker/docker-entrypoint.sh
@@ -22,8 +22,8 @@ echo "MYSQL_ADDR=$MYSQL_ADDR"
# Wait for MSB initialization
echo "Wait for MSB initialization"
for i in {1..5}; do
- curl -sS -m 1 $MSB_PROTO:$MSB_ADDR/msb -k > /dev/null
- res=$i?
+ curl -sS -m 1 $MSB_PROTO://$MSB_ADDR/msb -k > /dev/null
+ res=$?
if [ $res -ne 0 ]; then
break
fi
diff --git a/lcm/docker/instance_config.sh b/lcm/docker/instance_config.sh
index 64543a40..18dbd6b8 100755
--- a/lcm/docker/instance_config.sh
+++ b/lcm/docker/instance_config.sh
@@ -20,6 +20,10 @@ if [ $SERVICE_IP ]; then
sed -i "s|\"ip\": \".*\"|\"ip\": \"$SERVICE_IP\"|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py
fi
+if [ $REG_TO_MSB_WHEN_START ]; then
+ sed -i "s|REG_TO_MSB_WHEN_START = .*|REG_TO_MSB_WHEN_START = '$REG_TO_MSB_WHEN_START'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py
+fi
+
sed -i "s/127.0.0.1:80/$MSB_IP:$MSB_PORT/" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py
# Configure MYSQL
diff --git a/lcm/docker/instance_init.sh b/lcm/docker/instance_init.sh
index b226f219..aa04c5d8 100755
--- a/lcm/docker/instance_init.sh
+++ b/lcm/docker/instance_init.sh
@@ -3,12 +3,12 @@
MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1`
MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2`
-if [ $MYSQL_AUTH ]; then
- MYSQL_ROOT_USER=`echo $MYSQL_AUTH | cut -d: -f 1`
- MYSQL_ROOT_PASSWORD=`echo $MYSQL_AUTH | cut -d: -f 2`
+if [ $MYSQL_ROOT_USER ] && [ $MYSQL_ROOT_PASSWORD ]; then
+ MYSQL_ROOT_USER=$MYSQL_ROOT_USER
+ MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
else
- MYSQL_ROOT_USER="root"
- MYSQL_ROOT_PASSWORD="root"
+ MYSQL_ROOT_USER="root"
+ MYSQL_ROOT_PASSWORD="root"
fi
function create_database {