aboutsummaryrefslogtreecommitdiff
path: root/tools/setup_gate.sh
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-12 01:51:29 +0000
committerGerrit Code Review <review@openstack.org>2016-02-12 01:51:30 +0000
commit51e9046ea79a95fb26ea629b593cb4197246725e (patch)
treee7c44c9088a74a8449fd4aecd5ed59d13afd53c9 /tools/setup_gate.sh
parentba6326a1203a3e3339a2369361c2013548866ec7 (diff)
parent0921308a97dd80be207ba61ff32abe3af0f3bb05 (diff)
downloadkolla-51e9046ea79a95fb26ea629b593cb4197246725e.tar.gz
kolla-51e9046ea79a95fb26ea629b593cb4197246725e.zip
Merge "Use Infra provided mirrors in gate"
Diffstat (limited to 'tools/setup_gate.sh')
-rwxr-xr-xtools/setup_gate.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh
index 79ea00a65..882f0e00f 100755
--- a/tools/setup_gate.sh
+++ b/tools/setup_gate.sh
@@ -13,6 +13,23 @@ function setup_config {
tox -e genconfig
# Copy configs
sudo cp -a etc/kolla /etc/
+
+ if [[ "${DISTRO}" == "Debian" ]]; then
+ # Optimize the repos to take advantage of the Infra provided mirrors for Ubuntu
+ sed -i 's|^#apt_sources_list.*|apt_sources_list = /etc/kolla/sources.list|' /etc/kolla/kolla-build.conf
+ sudo cp /etc/apt/sources.list /etc/kolla/sources.list
+ # Append non-infra provided repos to list
+ cat << EOF | sudo tee -a /etc/kolla/sources.list
+deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/liberty main
+deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main
+deb http://repo.percona.com/apt trusty main
+deb http://download.ceph.com/debian-hammer/ trusty main
+EOF
+ fi
+
+ # Use Infra provided pypi
+ echo "RUN echo $(base64 -w0 /etc/pip.conf) | base64 -d > /etc/pip.conf" | sudo tee /etc/kolla/header
+ sed -i 's|^#include_header.*|include_header = /etc/kolla/header|' /etc/kolla/kolla-build.conf
}
function detect_distro {
@@ -39,7 +56,6 @@ function setup_ssh {
function setup_inventory {
local counter=0
- detect_distro
if [[ "${DISTRO}" == "Debian" ]]; then
ANSIBLE_CONNECTION_TYPE=ssh
else
@@ -84,6 +100,7 @@ function setup_logging {
mkdir -p /tmp/logs/{ansible,build}
}
+detect_distro
setup_logging
tools/dump_info.sh
setup_ssh