diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-05-18 16:25:01 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-05-18 16:25:01 +0000 |
| commit | 6d80053d035213eb52f132c615fe73198d1f3315 (patch) | |
| tree | 50dca97e1ddcfcb7c2c20e414e37178587e57613 /dev | |
| parent | 868d1f42fed351bcb48490748485c91b2fee0a24 (diff) | |
| parent | d2a62c96cdbb12b2811e5d04e70adaadbd0cd350 (diff) | |
| download | kolla-6d80053d035213eb52f132c615fe73198d1f3315.tar.gz kolla-6d80053d035213eb52f132c615fe73198d1f3315.zip | |
Merge "Improve Vagrants bootstrap.sh proxy support"
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/vagrant/bootstrap.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/dev/vagrant/bootstrap.sh b/dev/vagrant/bootstrap.sh index ace58ecba..7e8a006b0 100644 --- a/dev/vagrant/bootstrap.sh +++ b/dev/vagrant/bootstrap.sh @@ -21,7 +21,8 @@ else REGISTRY_PORT=5000 SUPPORT_NODE=support01 fi -REGISTRY=operator.local:${REGISTRY_PORT} +REGISTRY_URL="operator.local" +REGISTRY=${REGISTRY_URL}:${REGISTRY_PORT} ADMIN_PROTOCOL="http" function _ensure_lsb_release { @@ -30,9 +31,9 @@ function _ensure_lsb_release { fi if [[ -x $(which apt-get 2>/dev/null) ]]; then - sudo apt-get install -y lsb-release + apt-get install -y lsb-release elif [[ -x $(which yum 2>/dev/null) ]]; then - sudo yum -y install redhat-lsb-core + yum -y install redhat-lsb-core fi } @@ -124,6 +125,20 @@ EOF exit 1 fi + if [[ "${http_proxy}" != "" ]]; then + mkdir -p /etc/systemd/system/docker.service.d + cat >/etc/systemd/system/docker.service.d/http-proxy.conf <<-EOF +[Service] +Environment="HTTP_PROXY=${http_proxy}" "HTTPS_PROXY=${https_proxy}" +"NO_PROXY=localhost,127.0.0.1,${REGISTRY_URL}" +EOF + + if [[ "$(grep http_ /etc/bashrc)" == "" ]]; then + echo "export http_proxy=${http_proxy}" >> /etc/bashrc + echo "export https_proxy=${https_proxy}" >> /etc/bashrc + fi + fi + systemctl daemon-reload systemctl enable docker systemctl start docker |
