aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-04-26 09:23:10 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-04-26 09:23:10 +0000
commitfd54ab5c79b16cdc1765517057b8eb0c988f60c8 (patch)
treed19878aeacf2c150e98da6259b8bee5d7b152a63 /tools
parent0aae33539c4790a3fd1ffeac1fd266d8d00ad70d (diff)
parent7cf8184eca909dc4d4cddff38ae457ab7e01f053 (diff)
Merge "OpenStack deployment using kolla"
Diffstat (limited to 'tools')
-rwxr-xr-xtools/virt_ci_rampup.sh26
1 files changed, 25 insertions, 1 deletions
diff --git a/tools/virt_ci_rampup.sh b/tools/virt_ci_rampup.sh
index d9aa23c22..aaf162cf7 100755
--- a/tools/virt_ci_rampup.sh
+++ b/tools/virt_ci_rampup.sh
@@ -13,9 +13,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+env_http_proxy=$(sed -ne "s/^http_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment)
+if [[ -z ${http_proxy} ]] && [[ ! -z ${env_http_proxy} ]]; then
+ export http_proxy=${env_http_proxy}
+fi
+env_https_proxy=$(sed -ne "s/^https_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment)
+if [[ -z ${https_proxy} ]] && [[ ! -z ${env_https_proxy} ]]; then
+ export https_proxy=${env_https_proxy}
+fi
+env_ftp_proxy=$(sed -ne "s/^ftp_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment)
+if [[ -z ${ftp_proxy} ]] && [[ ! -z ${env_ftp_proxy} ]]; then
+ export ftp_proxy=${env_ftp_proxy}
+fi
+if [[ ! -z ${http_proxy} ]] || [[ ! -z ${https_proxy} ]]; then
+ export no_proxy="${no_proxy}"
+ extra_args="${extra_args} -e @/tmp/proxy.yml "
+ cat <<EOF > /tmp/proxy.yml
+---
+proxy_env:
+ http_proxy: ${http_proxy}
+ https_proxy: ${https_proxy}
+ ftp_proxy: ${ftp_proxy}
+ no_proxy: ${no_proxy}
+EOF
+fi
ANSIBLE_SCRIPTS="${0%/*}/../ansible"
cd ${ANSIBLE_SCRIPTS} && \
sudo -EH ansible-playbook \
- -e RS_FILE='../etc/infra/infra_deploy.yaml' -e CLEAN_UP=False \
+ -e RS_FILE='../etc/infra/infra_deploy_two.yaml' -e CLEAN_UP=False ${extra_args} \
-i inventory.ini infra_deploy.yml