summaryrefslogtreecommitdiffstats
path: root/docker/instance_config.sh
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-03-25 15:01:42 +0800
committeryangyan <yangyanyj@chinamobile.com>2019-03-25 15:01:58 +0800
commit6ac6fa2ab9c44ce965f24435b2429421132bf5d1 (patch)
tree13727282f045d344946e1c5fb61a742fae13bdbf /docker/instance_config.sh
parent7b731ee2dce023f0a5fa922b0ce13d3f2493f18a (diff)
change the way of create database
Change-Id: Ib75b63ebea6f444e66b1c3d5f98e5dfed058f976 Issue-ID: VFC-1312 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'docker/instance_config.sh')
-rwxr-xr-xdocker/instance_config.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/docker/instance_config.sh b/docker/instance_config.sh
index dc811d3f..073d0e6f 100755
--- a/docker/instance_config.sh
+++ b/docker/instance_config.sh
@@ -29,10 +29,14 @@ fi
# Configure MYSQL
MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1`
MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2`
+MYSQL_USER=`echo $MYSQL_AUTH | cut -d: -f 1`
+MYSQL_ROOT_PASSWORD=`echo $MYSQL_AUTH | cut -d: -f 2
echo "MYSQL_ADDR=$MYSQL_ADDR"
sed -i "s|DB_IP.*|DB_IP = '$MYSQL_IP'|" vfc/nfvo/lcm/lcm/pub/config/config.py
sed -i "s|DB_PORT.*|DB_PORT = $MYSQL_PORT|" vfc/nfvo/lcm/lcm/pub/config/config.py
sed -i "s|REDIS_HOST.*|REDIS_HOST = '$MYSQL_IP'|" vfc/nfvo/lcm/lcm/pub/config/config.py
+sed -i "s|DB_USER.*|DB_USER = '$MYSQL_USER'|" vfc/nfvo/lcm/lcm/pub/config/config.py
+sed -i "s|DB_PASSWD.*|DB_PASSWD = '$MYSQL_ROOT_PASSWORD'|" vfc/nfvo/lcm/lcm/pub/config/config.py
cat vfc/nfvo/lcm/lcm/pub/config/config.py