From 0921308a97dd80be207ba61ff32abe3af0f3bb05 Mon Sep 17 00:00:00 2001 From: SamYaple Date: Sun, 7 Feb 2016 15:35:26 +0000 Subject: [PATCH] Use Infra provided mirrors in gate Both apt and pip mirrors are added here Related-Id: I26f5fc5cec224cf4f4ea361e0f71cecbf320fbb0 TrivialFix Change-Id: Ib3cb1d2c6fb27887e3ea819d277e21ea3a530f56 --- tools/setup_gate.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index 79ea00a653..882f0e00ff 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