X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=nsb_setup.sh;h=335db8dd237a3893bcc2c7e307f8711cc7cf00c3;hb=bdf55c2a6f000e0ca6462a9df4a0d411c3dd029e;hp=85bd7b2c431403d7020359e92985862b07aa26b9;hpb=6138d2c4115f87ff71b2084cc1021701e2697c2a;p=yardstick.git diff --git a/nsb_setup.sh b/nsb_setup.sh index 85bd7b2c4..335db8dd2 100755 --- a/nsb_setup.sh +++ b/nsb_setup.sh @@ -13,41 +13,127 @@ # See the License for the specific language governing permissions and # limitations under the License. -apt-get update > /dev/null 2>&1 -pkg=(python-pip build-essential libssl-dev libffi-dev python3-dev python-dev) -for i in "${pkg[@]}"; do - dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed" - if [ "$?" -eq "1" ]; then - apt-get -y install "${i}"; +usage() +{ + cat < /tmp/proxy.yml --- proxy_env: - http_proxy: $http_proxy - https_proxy: $https_proxy - no_proxy: $no_proxy + http_proxy: ${http_proxy} + 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 +pkg=(python-pip build-essential libssl-dev libffi-dev python3-dev python-dev) +for i in "${pkg[@]}"; do + dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed" + if [ "$?" -eq "1" ]; then + apt-get -y install "${i}"; + fi +done + +pip install ansible==2.5.5 shade==1.22.2 docker-py==1.10.6 + ANSIBLE_SCRIPTS="ansible" cd ${ANSIBLE_SCRIPTS} &&\ ansible-playbook \ - -e img_modify_playbook='ubuntu_server_cloudimg_modify_samplevnfs.yml' \ + -e img_property="nsb" \ -e YARD_IMG_ARCH='amd64' ${extra_args}\ - -i yardstick-install-inventory.ini nsb_setup.yml + -i install-inventory.ini nsb_setup.yml +