Merge "Gate: Use OpenStack-CI apt mirrors"
This commit is contained in:
@@ -65,48 +65,6 @@ iptables -P OUTPUT ACCEPT
|
||||
if [ -f /etc/nodepool/provider -a -s /etc/nodepool/provider ]; then
|
||||
source /etc/nodepool/provider
|
||||
|
||||
# Get the fastest possible Linux mirror depending on the datacenter where the
|
||||
# tests are running.
|
||||
# The nodepool provider list can be found in:
|
||||
# https://github.com/openstack-infra/project-config/blob/master/nodepool/nodepool.yaml
|
||||
case ${NODEPOOL_PROVIDER} in
|
||||
"rax-dfw"*)
|
||||
export UBUNTU_REPO="http://dfw.mirror.rackspace.com/ubuntu"
|
||||
;;
|
||||
"rax-ord"*)
|
||||
export UBUNTU_REPO="http://ord.mirror.rackspace.com/ubuntu"
|
||||
;;
|
||||
"rax-iad"*)
|
||||
export UBUNTU_REPO="http://iad.mirror.rackspace.com/ubuntu"
|
||||
;;
|
||||
"hpcloud"*)
|
||||
export UBUNTU_REPO="http://${NODEPOOL_AZ}.clouds.archive.ubuntu.com/ubuntu"
|
||||
;;
|
||||
"ovh-gra1"*)
|
||||
export UBUNTU_REPO="http://ubuntu.mirrors.ovh.net/ubuntu"
|
||||
;;
|
||||
"ovh-bhs1"*)
|
||||
export UBUNTU_REPO="http://ubuntu.bhs.mirrors.ovh.net/ubuntu"
|
||||
;;
|
||||
"bluebox-sjc1"*)
|
||||
export UBUNTU_REPO="http://ord.mirror.rackspace.com/ubuntu"
|
||||
;;
|
||||
"internap-nyj01"*)
|
||||
export UBUNTU_REPO="http://iad.mirror.rackspace.com/ubuntu"
|
||||
;;
|
||||
"vexxhost-ca-ymq-1"*)
|
||||
export UBUNTU_REPO="http://ubuntu.mirror.vexxhost.com/ubuntu"
|
||||
;;
|
||||
"osic-cloud1"*)
|
||||
export UBUNTU_REPO="http://iad.mirror.rackspace.com/ubuntu"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${UBUNTU_REPO:-}" ]; then
|
||||
export BOOTSTRAP_OPTS="${BOOTSTRAP_OPTS} bootstrap_host_ubuntu_repo=${UBUNTU_REPO}"
|
||||
export BOOTSTRAP_OPTS="${BOOTSTRAP_OPTS} bootstrap_host_ubuntu_security_repo=${UBUNTU_REPO}"
|
||||
fi
|
||||
|
||||
# Update the libvirt cpu map with a gate64 cpu model. This enables nova
|
||||
# live migration for 64bit guest OSes on heterogenous cloud "hardware".
|
||||
export BOOTSTRAP_OPTS="${BOOTSTRAP_OPTS} bootstrap_host_libvirt_config=yes"
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
tags:
|
||||
- apt-install-prerequisites
|
||||
|
||||
- name: Determine the list of apt configuration files on the host
|
||||
command: "ls -1 /etc/apt/apt.conf.d"
|
||||
register: apt_conf_files
|
||||
tags:
|
||||
- apt-conf-files
|
||||
|
||||
- name: Determine the existing Ubuntu repo configuration
|
||||
shell: 'awk "/^deb .*ubuntu\/? {{ ansible_distribution_release }} main/ {print \$2; exit}" /etc/apt/sources.list'
|
||||
register: ubuntu_repo
|
||||
|
||||
@@ -147,3 +147,35 @@
|
||||
dest: /etc/openstack_deploy/user_variables.yml
|
||||
config_overrides: "{{ user_variables_overrides | default({}) }}"
|
||||
config_type: yaml
|
||||
|
||||
- name: Add user_apt_conf_files to contain the list of files to copy into containers
|
||||
file:
|
||||
path: /etc/openstack_deploy/user_apt_conf_files.yml
|
||||
state: touch
|
||||
when:
|
||||
- apt_conf_files is defined
|
||||
- apt_conf_files.stdout_lines | length > 0
|
||||
tags:
|
||||
- apt-conf-files
|
||||
|
||||
- name: Ensure that the first two lines in user_apt_conf_files are correct
|
||||
lineinfile:
|
||||
dest: /etc/openstack_deploy/user_apt_conf_files.yml
|
||||
line: "---\nlxc_container_cache_files:"
|
||||
insertbefore: BOF
|
||||
when:
|
||||
- apt_conf_files is defined
|
||||
- apt_conf_files.stdout_lines | length > 0
|
||||
tags:
|
||||
- apt-conf-files
|
||||
|
||||
- name: Add the list of dicts into user_apt_conf_files
|
||||
lineinfile:
|
||||
dest: /etc/openstack_deploy/user_apt_conf_files.yml
|
||||
line: " - { src: '/etc/apt/apt.conf.d/{{ item }}', dest: '/etc/apt/apt.conf.d/{{ item }}' }"
|
||||
with_items: apt_conf_files.stdout_lines
|
||||
when:
|
||||
- apt_conf_files is defined
|
||||
- apt_conf_files.stdout_lines | length > 0
|
||||
tags:
|
||||
- apt-conf-files
|
||||
|
||||
Reference in New Issue
Block a user