From 0063495b00409651c3bd02a7b3a31ba5b6ea40c0 Mon Sep 17 00:00:00 2001 From: Andreas Scheuring Date: Fri, 26 Aug 2016 10:29:20 +0200 Subject: [PATCH] Make PIP_GET_PIP_URL configurable via local.conf The default get_pip url regulary times out when starting devstack from behind company firewalls. Making this a configureable variable, user can make use of internal git-pip.py mirrors without modifying any code. Change-Id: I66a5534d51ab23a4d8586c27d37b4b6b8a6892c9 --- tools/install_pip.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/install_pip.sh b/tools/install_pip.sh index 12676998d2..a5ccb19399 100755 --- a/tools/install_pip.sh +++ b/tools/install_pip.sh @@ -24,7 +24,20 @@ set -o xtrace FILES=$TOP_DIR/files -PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py +# The URL from where the get-pip.py file gets downloaded. If a local +# get-pip.py mirror is available, PIP_GET_PIP_URL can be set to that +# mirror in local.conf to avoid download timeouts. +# Example: +# PIP_GET_PIP_URL="http://local-server/get-pip.py" +# +# Note that if get-pip.py already exists in $FILES this script will +# not re-download or check for a new version. For example, this is +# done by openstack-infra diskimage-builder elements as part of image +# preparation [1]. This prevents any network access, which can be +# unreliable in CI situations. +# [1] http://git.openstack.org/cgit/openstack-infra/project-config/tree/nodepool/elements/cache-devstack/source-repository-pip + +PIP_GET_PIP_URL=${PIP_GET_PIP_URL:-"https://bootstrap.pypa.io/get-pip.py"} LOCAL_PIP="$FILES/$(basename $PIP_GET_PIP_URL)" GetDistro