aboutsummaryrefslogtreecommitdiffstats
path: root/docker/instance_config.sh
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-08-08 14:03:17 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-08-08 14:11:14 +0800
commit35b5bb6b423691ed1819732bae4e41864112810e (patch)
tree452fde436a5688e77c802f4bcc469bfd6e034539 /docker/instance_config.sh
parent007bfac568467b36154cb9cf43f83b38ad0e17d2 (diff)
Remove DB and redis service from catalog
Change-Id: I55361edccd5464702e828975694017b27a4f4f79 Issue-ID: VFC-978 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'docker/instance_config.sh')
-rwxr-xr-xdocker/instance_config.sh25
1 files changed, 4 insertions, 21 deletions
diff --git a/docker/instance_config.sh b/docker/instance_config.sh
index 4e29dc96..04ec38e6 100755
--- a/docker/instance_config.sh
+++ b/docker/instance_config.sh
@@ -15,29 +15,12 @@ if [ $SERVICE_IP ]; then
sed -i "s|\"ip\": \".*\"|\"ip\": \"$SERVICE_IP\"|" vfc/nfvo/catalog/catalog/pub/config/config.py
fi
-if [ $REDIS_HOST ]; then
- sed -i "s|REDIS_HOST.*|REDIS_HOST = '$REDIS_HOST'|" vfc/nfvo/catalog/catalog/pub/config/config.py
-fi
-
-#if [ $SDC_BASE_URL ]; then
-# sed -i "s|SDC_BASE_URL.*|SDC_BASE_URL = '$SDC_BASE_URL'|" vfc/nfvo/catalog/catalog/pub/config/config.py
-#fi
-
-sed -i "s|DB_NAME.*|DB_NAME = 'nfvocatalog'|" vfc/nfvo/catalog/catalog/pub/config/config.py
-sed -i "s|DB_USER.*|DB_USER = 'nfvocatalog'|" vfc/nfvo/catalog/catalog/pub/config/config.py
-sed -i "s|DB_PASSWD.*|DB_PASSWD = 'nfvocatalog'|" vfc/nfvo/catalog/catalog/pub/config/config.py
-
-# Configure MYSQL
-if [ -z "$MYSQL_ADDR" ]; then
- export MYSQL_IP=127.0.0.1
- export MYSQL_PORT=3306
- export MYSQL_ADDR=$MYSQL_IP:$MYSQL_PORT
-else
- MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1`
- MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2`
-fi
+MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1`
+MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2`
echo "MYSQL_ADDR=$MYSQL_ADDR"
+
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
cat vfc/nfvo/catalog/catalog/pub/config/config.py