aboutsummaryrefslogtreecommitdiffstats
path: root/docker/instance_config.sh
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-03-25 16:34:26 +0800
committeryangyan <yangyanyj@chinamobile.com>2019-03-25 16:36:21 +0800
commit2462e08d2613753560d5565d625881beb640a563 (patch)
tree45fab4f8ce60284b3a528a6bddfbf9e4a41c8581 /docker/instance_config.sh
parenta18c2cc0aa47f71bc8435a37bca52e4258523e9c (diff)
change the way of create database
Change-Id: I4eb072f8e6dbfb964ce0faf8a668845a904078e6 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 04ec38e6..13a0a2c7 100755
--- a/docker/instance_config.sh
+++ b/docker/instance_config.sh
@@ -18,9 +18,13 @@ fi
MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1`
MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2`
echo "MYSQL_ADDR=$MYSQL_ADDR"
+MYSQL_USER=`echo $MYSQL_AUTH | cut -d: -f 1`
+MYSQL_ROOT_PASSWORD=`echo $MYSQL_AUTH | cut -d: -f 2`
sed -i "s|DB_IP.*|DB_IP = '$MYSQL_IP'|" vfc/nfvo/catalog/catalog/pub/config/config.py
sed -i "s|DB_PORT.*|DB_PORT = $MYSQL_PORT|" vfc/nfvo/catalog/catalog/pub/config/config.py
sed -i "s|REDIS_HOST.*|REDIS_HOST = '$MYSQL_IP'|" vfc/nfvo/catalog/catalog/pub/config/config.py
+sed -i "s|DB_USER.*|DB_USER = '$MYSQL_USER'|" vfc/nfvo/catalog/catalog/pub/config/config.py
+sed -i "s|DB_PASSWD.*|DB_PASSWD = '$MYSQL_ROOT_PASSWORD'|" vfc/nfvo/catalog/catalog/pub/config/config.py
cat vfc/nfvo/catalog/catalog/pub/config/config.py