Merge "support no_proxy environment variable"
This commit is contained in:
commit
ceaa75fdb3
1
AUTHORS
1
AUTHORS
@ -29,6 +29,7 @@ Josh Kearney <josh@jk0.org>
|
|||||||
Justin Shepherd <galstrom21@gmail.com>
|
Justin Shepherd <galstrom21@gmail.com>
|
||||||
Ken Pepple <ken.pepple@rabbityard.com>
|
Ken Pepple <ken.pepple@rabbityard.com>
|
||||||
Kiall Mac Innes <kiall@managedit.ie>
|
Kiall Mac Innes <kiall@managedit.ie>
|
||||||
|
Osamu Habuka <xiu.yushen@gmail.com>
|
||||||
Russell Bryant <rbryant@redhat.com>
|
Russell Bryant <rbryant@redhat.com>
|
||||||
Scott Moser <smoser@ubuntu.com>
|
Scott Moser <smoser@ubuntu.com>
|
||||||
Thierry Carrez <thierry@openstack.org>
|
Thierry Carrez <thierry@openstack.org>
|
||||||
|
@ -17,6 +17,7 @@ function apt_get() {
|
|||||||
[[ "$(id -u)" = "0" ]] && sudo="env"
|
[[ "$(id -u)" = "0" ]] && sudo="env"
|
||||||
$sudo DEBIAN_FRONTEND=noninteractive \
|
$sudo DEBIAN_FRONTEND=noninteractive \
|
||||||
http_proxy=$http_proxy https_proxy=$https_proxy \
|
http_proxy=$http_proxy https_proxy=$https_proxy \
|
||||||
|
no_proxy=$no_proxy \
|
||||||
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@"
|
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,6 +487,7 @@ function pip_install {
|
|||||||
$SUDO_PIP PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
$SUDO_PIP PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
||||||
HTTP_PROXY=$http_proxy \
|
HTTP_PROXY=$http_proxy \
|
||||||
HTTPS_PROXY=$https_proxy \
|
HTTPS_PROXY=$https_proxy \
|
||||||
|
NO_PROXY=$no_proxy \
|
||||||
$CMD_PIP install --use-mirrors $@
|
$CMD_PIP install --use-mirrors $@
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -521,6 +523,7 @@ function setup_develop() {
|
|||||||
$SUDO_CMD \
|
$SUDO_CMD \
|
||||||
HTTP_PROXY=$http_proxy \
|
HTTP_PROXY=$http_proxy \
|
||||||
HTTPS_PROXY=$https_proxy \
|
HTTPS_PROXY=$https_proxy \
|
||||||
|
NO_PROXY=$no_proxy \
|
||||||
python setup.py develop \
|
python setup.py develop \
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -574,6 +577,7 @@ function yum_install() {
|
|||||||
local sudo="sudo"
|
local sudo="sudo"
|
||||||
[[ "$(id -u)" = "0" ]] && sudo="env"
|
[[ "$(id -u)" = "0" ]] && sudo="env"
|
||||||
$sudo http_proxy=$http_proxy https_proxy=$https_proxy \
|
$sudo http_proxy=$http_proxy https_proxy=$https_proxy \
|
||||||
|
no_proxy=$no_proxy \
|
||||||
yum install -y "$@"
|
yum install -y "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
9
stack.sh
9
stack.sh
@ -60,16 +60,21 @@ fi
|
|||||||
source $TOP_DIR/stackrc
|
source $TOP_DIR/stackrc
|
||||||
|
|
||||||
# HTTP and HTTPS proxy servers are supported via the usual environment variables
|
# HTTP and HTTPS proxy servers are supported via the usual environment variables
|
||||||
# ``http_proxy`` and ``https_proxy``. They can be set in ``localrc`` if necessary
|
# ``http_proxy`` and ``https_proxy``. Additionally if you would like to access
|
||||||
|
# to specific server directly and not through the proxy server, you can use
|
||||||
|
# ``no_proxy`` environment variable. They can be set in ``localrc`` if necessary
|
||||||
# or on the command line::
|
# or on the command line::
|
||||||
#
|
#
|
||||||
# http_proxy=http://proxy.example.com:3128/ ./stack.sh
|
# http_proxy=http://proxy.example.com:3128/ no_proxy=repo.example.net ./stack.sh
|
||||||
if [[ -n "$http_proxy" ]]; then
|
if [[ -n "$http_proxy" ]]; then
|
||||||
export http_proxy=$http_proxy
|
export http_proxy=$http_proxy
|
||||||
fi
|
fi
|
||||||
if [[ -n "$https_proxy" ]]; then
|
if [[ -n "$https_proxy" ]]; then
|
||||||
export https_proxy=$https_proxy
|
export https_proxy=$https_proxy
|
||||||
fi
|
fi
|
||||||
|
if [[ -n "$no_proxy" ]]; then
|
||||||
|
export no_proxy=$no_proxy
|
||||||
|
fi
|
||||||
|
|
||||||
# Destination path for installation ``DEST``
|
# Destination path for installation ``DEST``
|
||||||
DEST=${DEST:-/opt/stack}
|
DEST=${DEST:-/opt/stack}
|
||||||
|
Loading…
Reference in New Issue
Block a user