diff options
Diffstat (limited to 'lcm/docker')
-rwxr-xr-x | lcm/docker/docker-entrypoint.sh | 4 | ||||
-rwxr-xr-x | lcm/docker/instance_config.sh | 4 | ||||
-rwxr-xr-x | lcm/docker/instance_init.sh | 10 |
3 files changed, 11 insertions, 7 deletions
diff --git a/lcm/docker/docker-entrypoint.sh b/lcm/docker/docker-entrypoint.sh index ae9f6d7b..0e1abc93 100755 --- a/lcm/docker/docker-entrypoint.sh +++ b/lcm/docker/docker-entrypoint.sh @@ -22,8 +22,8 @@ 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_PROTO:$MSB_ADDR/msb -k > /dev/null - res=$i? + curl -sS -m 1 $MSB_PROTO://$MSB_ADDR/msb -k > /dev/null + res=$? if [ $res -ne 0 ]; then break fi diff --git a/lcm/docker/instance_config.sh b/lcm/docker/instance_config.sh index 64543a40..18dbd6b8 100755 --- a/lcm/docker/instance_config.sh +++ b/lcm/docker/instance_config.sh @@ -20,6 +20,10 @@ if [ $SERVICE_IP ]; then sed -i "s|\"ip\": \".*\"|\"ip\": \"$SERVICE_IP\"|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py fi +if [ $REG_TO_MSB_WHEN_START ]; then + sed -i "s|REG_TO_MSB_WHEN_START = .*|REG_TO_MSB_WHEN_START = '$REG_TO_MSB_WHEN_START'|" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py +fi + sed -i "s/127.0.0.1:80/$MSB_IP:$MSB_PORT/" vfc/gvnfm/vnflcm/lcm/lcm/pub/config/config.py # Configure MYSQL diff --git a/lcm/docker/instance_init.sh b/lcm/docker/instance_init.sh index b226f219..aa04c5d8 100755 --- a/lcm/docker/instance_init.sh +++ b/lcm/docker/instance_init.sh @@ -3,12 +3,12 @@ MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1` MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2` -if [ $MYSQL_AUTH ]; then - MYSQL_ROOT_USER=`echo $MYSQL_AUTH | cut -d: -f 1` - MYSQL_ROOT_PASSWORD=`echo $MYSQL_AUTH | cut -d: -f 2` +if [ $MYSQL_ROOT_USER ] && [ $MYSQL_ROOT_PASSWORD ]; then + MYSQL_ROOT_USER=$MYSQL_ROOT_USER + MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD else - MYSQL_ROOT_USER="root" - MYSQL_ROOT_PASSWORD="root" + MYSQL_ROOT_USER="root" + MYSQL_ROOT_PASSWORD="root" fi function create_database { |