From: gcalvino Date: Mon, 7 May 2018 08:31:04 +0000 (+0200) Subject: Change docker overlay gw MTU X-Git-Tag: v4.0.0~23 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=a40dfaffbd5297e9dae10ff871b62fbfde979830;p=osm%2Fdevops.git Change docker overlay gw MTU Signed-off-by: gcalvino Change-Id: I43c529bfe160ed7fac032a6984ea8a3f3ea4606e --- diff --git a/installers/install_osm.sh b/installers/install_osm.sh index 2cd7b59a..7cdf8bc4 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -576,6 +576,11 @@ function generate_docker_env_files() { function deploy_lightweight() { echo "Deploying lightweight build" + if [ "${DEFAULT_MTU}" != "1500" ]; then + DOCKER_NETS=`sg docker -c "docker network list" | awk '{print $2}' | egrep -v "^ID$" | paste -d " " -s` + DOCKER_GW_NET=`sg docker -c "docker network inspect ${DOCKER_NETS}" | grep Subnet | awk -F\" '{print $4}' | egrep "^172" | sort -u | tail -1 | awk -F\. '{if ($2 != 255) print $1"."$2+1"."$3"."$4; else print "-1";}'` + sg docker -c "docker network create --subnet ${DOCKER_GW_NET} --opt com.docker.network.bridge.name=docker_gwbridge --opt com.docker.network.bridge.enable_icc=false --opt com.docker.network.bridge.enable_ip_masquerade=true --opt com.docker.network.driver.mtu=${DEFAULT_MTU} docker_gwbridge" + fi newgrp docker << EONG docker swarm init --advertise-addr ${DEFAULT_IP} docker network create --driver=overlay --attachable --opt com.docker.network.driver.mtu=${DEFAULT_MTU} netOSM