Browse code

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

Andreas Scheuring authored on 2016/08/26 17:29:20
Showing 1 changed files
... ...
@@ -24,7 +24,20 @@ set -o xtrace
24 24
 
25 25
 FILES=$TOP_DIR/files
26 26
 
27
-PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
27
+# The URL from where the get-pip.py file gets downloaded. If a local
28
+# get-pip.py mirror is available, PIP_GET_PIP_URL can be set to that
29
+# mirror in local.conf to avoid download timeouts.
30
+# Example:
31
+#  PIP_GET_PIP_URL="http://local-server/get-pip.py"
32
+#
33
+# Note that if get-pip.py already exists in $FILES this script will
34
+# not re-download or check for a new version.  For example, this is
35
+# done by openstack-infra diskimage-builder elements as part of image
36
+# preparation [1].  This prevents any network access, which can be
37
+# unreliable in CI situations.
38
+# [1] http://git.openstack.org/cgit/openstack-infra/project-config/tree/nodepool/elements/cache-devstack/source-repository-pip
39
+
40
+PIP_GET_PIP_URL=${PIP_GET_PIP_URL:-"https://bootstrap.pypa.io/get-pip.py"}
28 41
 LOCAL_PIP="$FILES/$(basename $PIP_GET_PIP_URL)"
29 42
 
30 43
 GetDistro