2 # Copyright (c) 2017 Intel Corporation.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 apt-get update > /dev/null 2>&1
17 pkg=(python-pip build-essential libssl-dev libffi-dev python3-dev python-dev)
18 for i in "${pkg[@]}"; do
19 dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed"
20 if [ "$?" -eq "1" ]; then
21 apt-get -y install "${i}";
25 pip install ansible==2.3.2 shade==1.17.0 docker-py==1.10.6
28 extra_args="-e openrc_file=$1"
31 CONTROLLER_IP=$(echo ${OS_AUTH_URL} | sed -ne "s/http:\/\/\(.*\):.*/\1/p")
32 export no_proxy="localhost,127.0.0.1,${CONTROLLER_IP},$no_proxy"
35 if [ "$http_proxy" != "" ] || [ "$https_proxy" != "" ]; then
36 extra_args="${extra_args} -e @/tmp/proxy.yml"
38 cat <<EOF > /tmp/proxy.yml
41 http_proxy: $http_proxy
42 https_proxy: $https_proxy
47 ANSIBLE_SCRIPTS="ansible"
49 cd ${ANSIBLE_SCRIPTS} &&\
51 -e img_modify_playbook='ubuntu_server_cloudimg_modify_samplevnfs.yml' \
52 -e YARD_IMG_ARCH='amd64' ${extra_args}\
53 -i yardstick-install-inventory.ini nsb_setup.yml