Use LXC reverse proxy in OpenStack-CI

This patch implements the use of the images.linuxcontainers.org
reverse proxy when in nodepool. The same implementation as used
for MariaDB and UCA is used - this is not optimal as nodepool
settings may change, but this will do for now.

Depends-On: Ia6b149f157e5697d36fdea3dc65cb2ac4815a1a4
Change-Id: I558663e31264e35a4916c7b636a09cee3910408b
This commit is contained in:
Jesse Pretorius 2017-08-10 12:00:43 +01:00 committed by Kevin Carter (cloudnull)
parent 499e3c5315
commit 2b2bd4de69
2 changed files with 12 additions and 0 deletions

View File

@ -77,6 +77,13 @@
- nodepool_dir.stat.exists
- bootstrap_host_ubuntu_repo is defined
- name: Set the LXC image repository URL in OpenStack-CI
set_fact:
lxc_image_cache_server: "{{ bootstrap_host_ubuntu_repo | netloc_no_port }}:8080/images.linuxcontainers"
when:
- nodepool_dir.stat.exists | bool
- bootstrap_host_ubuntu_repo is defined
- name: Set the package cache timeout to 60 mins in OpenStack-CI
set_fact:
cache_timeout: 3600

View File

@ -161,6 +161,11 @@ galera_repo_url: {{ galera_repo_url }}
galera_client_apt_repo_url: {{ galera_repo_url }}
{% endif %}
{% if lxc_image_cache_server is defined %}
## images.linuxcontainers.org reverse proxy
lxc_image_cache_server: {{ lxc_image_cache_server }}
{% endif %}
{% if cache_timeout is defined %}
## Package cache timeout
cache_timeout: {{ cache_timeout }}