Use infra Docker registry mirror during CI

The mirror caches images from Dockerhub, and should reduce load on the
cloud and improve download times.

Change-Id: I2b52fa6371118e28c1d601e8b90065897f24f41d
This commit is contained in:
Mark Goddard 2018-11-08 14:19:23 +00:00
parent d0e9c50fd2
commit 016d23aa83
5 changed files with 22 additions and 0 deletions

View File

@ -31,6 +31,9 @@ docker_registry:
# CA of docker registry
docker_registry_ca:
# List of Docker registry mirrors.
docker_registry_mirrors: []
# MTU to pass through to containers not using net=host
docker_daemon_mtu: 1500

View File

@ -1,4 +1,11 @@
{
{%- if docker_registry_mirrors | length > 0 %}
"registry-mirrors": [
{%- for mirror in docker_registry_mirrors %}
"{{ mirror }}"{%- if not loop.last -%},{%- endif %}
{%- endfor %}
],
{%- endif %}
"storage-driver": "{% if docker_storage_driver == 'devicemapper' %}devicemapper{% else %}overlay{% endif %}",
{% if docker_daemon_mtu %}
"mtu": {{ docker_daemon_mtu }},

View File

@ -3,6 +3,10 @@
# Ansible is run directly on the controller.
disable_selinux_do_reboot: false
# Use the OpenStack infra's Dockerhub mirror.
docker_registry_mirrors:
- "http://{{ zuul_site_mirror_fqdn }}:8081/registry-1.docker/"
kolla_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['git.openstack.org/openstack/kolla'].src_dir }}"
kolla_source_version: "{{ zuul.projects['git.openstack.org/openstack/kolla'].checkout }}"
kolla_ansible_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['git.openstack.org/openstack/kolla-ansible'].src_dir }}"

View File

@ -3,6 +3,10 @@
# Ansible is run directly on the controller.
disable_selinux_do_reboot: false
# Use the OpenStack infra's Dockerhub mirror.
docker_registry_mirrors:
- "http://{{ zuul_site_mirror_fqdn }}:8081/registry-1.docker/"
{% if not previous_release | default(false) %}
kolla_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['git.openstack.org/openstack/kolla'].src_dir }}"
kolla_source_version: "{{ zuul.projects['git.openstack.org/openstack/kolla'].checkout }}"

View File

@ -3,6 +3,10 @@
# Ansible is run directly on the controller.
disable_selinux_do_reboot: false
# Use the OpenStack infra's Dockerhub mirror.
docker_registry_mirrors:
- "http://{{ zuul_site_mirror_fqdn }}:8081/registry-1.docker/"
kolla_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['git.openstack.org/openstack/kolla'].src_dir }}"
kolla_source_version: "{{ zuul.projects['git.openstack.org/openstack/kolla'].checkout }}"
kolla_ansible_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['git.openstack.org/openstack/kolla-ansible'].src_dir }}"