Configure pip with a per-region mirror
Change-Id: Ib66363b425ab98366cd2705c7faf778ce0bceedc Deponds-On: I48933ddb89a4a89cb22e1cb005469833f91c1f66
This commit is contained in:
parent
590f79b946
commit
2224cd43e5
29
modules/openstack_project/files/nodepool/scripts/configure_mirror.sh
Executable file
29
modules/openstack_project/files/nodepool/scripts/configure_mirror.sh
Executable 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
|
@ -37,3 +37,5 @@ fi
|
|||||||
sudo chown -R root:root /etc/nodepool
|
sudo chown -R root:root /etc/nodepool
|
||||||
sudo chmod 0755 /etc/nodepool
|
sudo chmod 0755 /etc/nodepool
|
||||||
sudo chmod 0444 /etc/nodepool/*
|
sudo chmod 0444 /etc/nodepool/*
|
||||||
|
|
||||||
|
/opt/nodepool-scripts/configure_mirror.sh
|
||||||
|
@ -21,6 +21,7 @@ gearman-servers:
|
|||||||
labels:
|
labels:
|
||||||
- name: devstack-precise
|
- name: devstack-precise
|
||||||
image: devstack-precise
|
image: devstack-precise
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 1
|
min-ready: 1
|
||||||
providers:
|
providers:
|
||||||
- name: hpcloud-b1
|
- name: hpcloud-b1
|
||||||
@ -38,6 +39,7 @@ labels:
|
|||||||
- name: rax-iad
|
- name: rax-iad
|
||||||
- name: bare-precise
|
- name: bare-precise
|
||||||
image: bare-precise
|
image: bare-precise
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 1
|
min-ready: 1
|
||||||
providers:
|
providers:
|
||||||
- name: hpcloud-b1
|
- name: hpcloud-b1
|
||||||
@ -50,6 +52,7 @@ labels:
|
|||||||
- name: rax-iad
|
- name: rax-iad
|
||||||
- name: devstack-trusty
|
- name: devstack-trusty
|
||||||
image: devstack-trusty
|
image: devstack-trusty
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 20
|
min-ready: 20
|
||||||
providers:
|
providers:
|
||||||
- name: hpcloud-b1
|
- name: hpcloud-b1
|
||||||
@ -62,6 +65,7 @@ labels:
|
|||||||
- name: rax-iad
|
- name: rax-iad
|
||||||
- name: bare-trusty
|
- name: bare-trusty
|
||||||
image: bare-trusty
|
image: bare-trusty
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 8
|
min-ready: 8
|
||||||
providers:
|
providers:
|
||||||
- name: hpcloud-b1
|
- name: hpcloud-b1
|
||||||
@ -74,6 +78,7 @@ labels:
|
|||||||
- name: rax-iad
|
- name: rax-iad
|
||||||
- name: bare-centos6
|
- name: bare-centos6
|
||||||
image: bare-centos6
|
image: bare-centos6
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 2
|
min-ready: 2
|
||||||
providers:
|
providers:
|
||||||
- name: hpcloud-b1
|
- name: hpcloud-b1
|
||||||
@ -86,6 +91,7 @@ labels:
|
|||||||
- name: rax-iad
|
- name: rax-iad
|
||||||
- name: py3k-precise
|
- name: py3k-precise
|
||||||
image: py3k-precise
|
image: py3k-precise
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 2
|
min-ready: 2
|
||||||
providers:
|
providers:
|
||||||
- name: hpcloud-b1
|
- name: hpcloud-b1
|
||||||
@ -126,6 +132,7 @@ labels:
|
|||||||
- name: hpcloud-b5
|
- name: hpcloud-b5
|
||||||
- name: devstack-f20
|
- name: devstack-f20
|
||||||
image: devstack-f20
|
image: devstack-f20
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 1
|
min-ready: 1
|
||||||
providers:
|
providers:
|
||||||
- name: rax-dfw
|
- name: rax-dfw
|
||||||
@ -138,6 +145,7 @@ labels:
|
|||||||
- name: hpcloud-b5
|
- name: hpcloud-b5
|
||||||
- name: devstack-f20-virt-preview
|
- name: devstack-f20-virt-preview
|
||||||
image: devstack-f20-virt-preview
|
image: devstack-f20-virt-preview
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 1
|
min-ready: 1
|
||||||
providers:
|
providers:
|
||||||
- name: rax-dfw
|
- name: rax-dfw
|
||||||
@ -145,6 +153,7 @@ labels:
|
|||||||
- name: rax-iad
|
- name: rax-iad
|
||||||
- name: devstack-centos7
|
- name: devstack-centos7
|
||||||
image: devstack-centos7
|
image: devstack-centos7
|
||||||
|
ready-script: configure_mirror.sh
|
||||||
min-ready: 1
|
min-ready: 1
|
||||||
providers:
|
providers:
|
||||||
- name: rax-dfw
|
- name: rax-dfw
|
||||||
|
Loading…
x
Reference in New Issue
Block a user