summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiZi <li.zi30@zte.com.cn>2018-04-16 04:05:48 -0400
committerLiZi <li.zi30@zte.com.cn>2018-04-16 04:06:03 -0400
commitb6c7a698a58b1c64329377fd27f2a52a8f918e5e (patch)
tree1132b20a0e24b4fa7004a8ab317ec899e17f5b66
parent18f39804274b3ad1a3c6def3b106dc5636c45094 (diff)
Add REG_TO_MSB as env param.
When deployed with OOM, should not register service to MSB by itself. So Add REG_TO_MSB as env param to control the function register to MSB when start. Default value is True. Change-Id: I91c4eed048bfa819f701323015626ac54d3f35ec Issue-ID: MSB-98 Signed-off-by: LiZi <li.zi30@zte.com.cn>
-rwxr-xr-xdocker/docker-entrypoint.sh5
-rwxr-xr-xdocker/instance_config.sh4
2 files changed, 9 insertions, 0 deletions
diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh
index f02c9cce..f1cf4f23 100755
--- a/docker/docker-entrypoint.sh
+++ b/docker/docker-entrypoint.sh
@@ -5,6 +5,11 @@ if [ -z "$SERVICE_IP" ]; then
fi
echo "SERVICE_IP=$SERVICE_IP"
+if [ -z "$REG_TO_MSB" ]; then
+ export REG_TO_MSB=True
+fi
+echo "REG_TO_MSB=$REG_TO_MSB"
+
if [ -z "$MYSQL_ROOT_PASSWORD" ]; then
export MYSQL_ROOT_PASSWORD="root"
fi
diff --git a/docker/instance_config.sh b/docker/instance_config.sh
index c76770e3..2e0dfd57 100755
--- a/docker/instance_config.sh
+++ b/docker/instance_config.sh
@@ -11,6 +11,10 @@ if [ $MSB_PORT ]; then
sed -i "s|MSB_SERVICE_PORT.*|MSB_SERVICE_PORT = '$MSB_PORT'|" vfc/nfvo/catalog/catalog/pub/config/config.py
fi
+if [ $REG_TO_MSB ]; then
+ sed -i "s|REG_TO_MSB_WHEN_START.*|REG_TO_MSB_WHEN_START = '$REG_TO_MSB'|" vfc/nfvo/catalog/catalog/pub/config/config.py
+fi
+
if [ $SERVICE_IP ]; then
sed -i "s|\"ip\": \".*\"|\"ip\": \"$SERVICE_IP\"|" vfc/nfvo/catalog/catalog/pub/config/config.py
fi