diff options
author | yangyan <yangyanyj@chinamobile.com> | 2019-03-26 10:37:42 +0800 |
---|---|---|
committer | yangyan <yangyanyj@chinamobile.com> | 2019-03-26 10:37:48 +0800 |
commit | 8b9c7dc264fcd762585d8f0d97b08bcf9bdf8efc (patch) | |
tree | a43abf224af929402fb537c6410121828a1c9149 /res/docker | |
parent | 1272c5b5b7ed4c5cfdfc07a50f5226a9012468bf (diff) |
update mysql and redis service name
Change-Id: I25e4c972b05fde8c596957150d1707220badb7a9
Issue-ID: VFC-1316
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'res/docker')
-rwxr-xr-x | res/docker/instance_config.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/res/docker/instance_config.sh b/res/docker/instance_config.sh index d6eedbd..f47b54f 100755 --- a/res/docker/instance_config.sh +++ b/res/docker/instance_config.sh @@ -20,8 +20,19 @@ 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` +#redis +REDIS_IP=`echo $REDIS_ADDR | cut -d: -f 1` +REDIS_PORT=`echo $REDIS_ADDR | cut -d: -f 2` + sed -i "s|DB_IP.*|DB_IP = '$MYSQL_IP'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py sed -i "s|DB_PORT.*|DB_PORT = $MYSQL_PORT|" vfc/gvnfm/vnfres/res/res/pub/config/config.py -sed -i "s|REDIS_HOST.*|REDIS_HOST = '$MYSQL_IP'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py +#redis +sed -i "s|REDIS_HOST.*|REDIS_HOST = '$REDIS_IP'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py +sed -i "s|REDIS_PORT.*|REDIS_PORT = '$REDIS_PORT'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py + +sed -i "s|DB_USER.*|DB_USER = '$MYSQL_USER'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py +sed -i "s|DB_PASSWD.*|DB_PASSWD = '$MYSQL_ROOT_PASSWORD'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py cat vfc/gvnfm/vnfres/res/res/pub/config/config.py |