From 9456cb60f814945aa6fdaf6e241613d0785eaf04 Mon Sep 17 00:00:00 2001 From: yangyan Date: Mon, 17 Feb 2020 17:50:54 +0800 Subject: Modify the request by msb with https Change-Id: I3d5ac977c3f3e664078428684aa50387fc71bdeb Issue-ID: VFC-1602 Signed-off-by: yangyan --- res/docker/docker-entrypoint.sh | 6 +++++- res/docker/instance_config.sh | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'res/docker') diff --git a/res/docker/docker-entrypoint.sh b/res/docker/docker-entrypoint.sh index a4caa72..ec53bd9 100755 --- a/res/docker/docker-entrypoint.sh +++ b/res/docker/docker-entrypoint.sh @@ -20,7 +20,11 @@ echo "MYSQL_ADDR=$MYSQL_ADDR" # Wait for MSB initialization echo "Wait for MSB initialization" for i in {1..5}; do - curl -sS -m 1 $MSB_ADDR > /dev/null && break + curl -sS -m 1 $MSB_PROTO:$MSB_ADDR/msb -k > /dev/null + res=$i? + if [ $res -ne 0 ]; then + break + fi sleep $i done diff --git a/res/docker/instance_config.sh b/res/docker/instance_config.sh index 5ad6b9f..6860429 100755 --- a/res/docker/instance_config.sh +++ b/res/docker/instance_config.sh @@ -1,8 +1,13 @@ #!/bin/bash +MSB_PROTO=`echo $MSB_PROTO` MSB_IP=`echo $MSB_ADDR | cut -d: -f 1` MSB_PORT=`echo $MSB_ADDR | cut -d: -f 2` +if [ $MSB_PROTO ]; then + sed -i "s|MSB_SERVICE_PROTOCOL = .*|MSB_SERVICE_PROTOCOL = '$MSB_PROTO'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py +fi + if [ $MSB_IP ]; then sed -i "s|MSB_SERVICE_IP.*|MSB_SERVICE_IP = '$MSB_IP'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py fi -- cgit 1.2.3-korg