Configure pip with a per-region mirror

Change-Id: Ib66363b425ab98366cd2705c7faf778ce0bceedc
Deponds-On: I48933ddb89a4a89cb22e1cb005469833f91c1f66
This commit is contained in:
James E. Blair 2014-09-04 11:12:19 -07:00
parent 590f79b946
commit 2224cd43e5
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,29 @@
#!/bin/bash -xe
# Copyright (C) 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
source /etc/nodepool/provider
cat >/home/jenkins/.pip/pip.conf <<EOF
[global]
index-url = http://pypi.$NODEPOOL_REGION.openstack.org/simple
EOF
cat >/home/jenkins/.pydistutils.cfg <<EOF
[easy_install]
index_url = http://pypi.$NODEPOOL_REGION.openstack.org/simple
EOF

View File

@ -37,3 +37,5 @@ fi
sudo chown -R root:root /etc/nodepool
sudo chmod 0755 /etc/nodepool
sudo chmod 0444 /etc/nodepool/*
/opt/nodepool-scripts/configure_mirror.sh

View File

@ -21,6 +21,7 @@ gearman-servers:
labels:
- name: devstack-precise
image: devstack-precise
ready-script: configure_mirror.sh
min-ready: 1
providers:
- name: hpcloud-b1
@ -38,6 +39,7 @@ labels:
- name: rax-iad
- name: bare-precise
image: bare-precise
ready-script: configure_mirror.sh
min-ready: 1
providers:
- name: hpcloud-b1
@ -50,6 +52,7 @@ labels:
- name: rax-iad
- name: devstack-trusty
image: devstack-trusty
ready-script: configure_mirror.sh
min-ready: 20
providers:
- name: hpcloud-b1
@ -62,6 +65,7 @@ labels:
- name: rax-iad
- name: bare-trusty
image: bare-trusty
ready-script: configure_mirror.sh
min-ready: 8
providers:
- name: hpcloud-b1
@ -74,6 +78,7 @@ labels:
- name: rax-iad
- name: bare-centos6
image: bare-centos6
ready-script: configure_mirror.sh
min-ready: 2
providers:
- name: hpcloud-b1
@ -86,6 +91,7 @@ labels:
- name: rax-iad
- name: py3k-precise
image: py3k-precise
ready-script: configure_mirror.sh
min-ready: 2
providers:
- name: hpcloud-b1
@ -126,6 +132,7 @@ labels:
- name: hpcloud-b5
- name: devstack-f20
image: devstack-f20
ready-script: configure_mirror.sh
min-ready: 1
providers:
- name: rax-dfw
@ -138,6 +145,7 @@ labels:
- name: hpcloud-b5
- name: devstack-f20-virt-preview
image: devstack-f20-virt-preview
ready-script: configure_mirror.sh
min-ready: 1
providers:
- name: rax-dfw
@ -145,6 +153,7 @@ labels:
- name: rax-iad
- name: devstack-centos7
image: devstack-centos7
ready-script: configure_mirror.sh
min-ready: 1
providers:
- name: rax-dfw