X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=nsb_setup.sh;h=1f534498046fdb831612bf5cadb575e15b18fbee;hb=093ab6a10558456c0cf61091d69648638e311143;hp=cb44839afc5f97d0ccba608808dbc43880fcefc9;hpb=868db57177cdbbebf8d160ca049cdf81fda3a2f4;p=yardstick.git diff --git a/nsb_setup.sh b/nsb_setup.sh index cb44839af..1f5344980 100755 --- a/nsb_setup.sh +++ b/nsb_setup.sh @@ -42,6 +42,16 @@ proxy_env: https_proxy: ${https_proxy} no_proxy: ${no_proxy} EOF + + mkdir -p /etc/systemd/system/docker.service.d + cat < /etc/systemd/system/docker.service.d/http-proxy.conf +--- +[Service] +Environment="HTTP_PROXY=${http_proxy}" "HTTPS_PROXY=${https_proxy}" "NO_PROXY=${no_proxy}" +EOF + + systemctl daemon-reload + systemctl restart docker fi apt-get update > /dev/null 2>&1 @@ -53,12 +63,20 @@ for i in "${pkg[@]}"; do fi done -pip install ansible==2.3.2 shade==1.17.0 docker-py==1.10.6 +pip install ansible==2.5.5 shade==1.22.2 docker-py==1.10.6 ANSIBLE_SCRIPTS="ansible" +if [[ -n ${1} ]]; then + yardstick_docker_image="-e yardstick_docker_image=${1}" +else + yardstick_docker_image="" +fi + +# no quotes for yardstick_docker_image so when empty it is removed as whitespace cd ${ANSIBLE_SCRIPTS} &&\ ansible-playbook \ -e img_property="nsb" \ + ${yardstick_docker_image} \ -e YARD_IMG_ARCH='amd64' ${extra_args}\ - -i yardstick-install-inventory.ini nsb_setup.yml + -i install-inventory.ini nsb_setup.yml