From b6c7a698a58b1c64329377fd27f2a52a8f918e5e Mon Sep 17 00:00:00 2001 From: LiZi Date: Mon, 16 Apr 2018 04:05:48 -0400 Subject: 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 --- docker/docker-entrypoint.sh | 5 +++++ docker/instance_config.sh | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'docker') 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 -- cgit 1.2.3-korg