From 2b2bd4de69e1844f4801b0bb61e32c64ff8a942d Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 10 Aug 2017 12:00:43 +0100 Subject: [PATCH] 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 --- tests/roles/bootstrap-host/tasks/prepare_aio_config.yml | 7 +++++++ .../bootstrap-host/templates/user_variables.aio.yml.j2 | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml index 040f91b223..46049c53e0 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml @@ -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 diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index ff1bb532bc..1c16c135c4 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -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 }}