zuul-jobs/doc/source/mirror.rst
James E. Blair 7941c3bdad Add mirror_info documentation
This is designed to be a flexible system which can replace
the current ad-hoc mirrors used by the configure-mirror
and other roles in this repo.

Change-Id: I20adef837c5f961624fe0f7adbc93d2cf8f7761a
2019-07-19 12:49:18 -07:00

3.5 KiB

Mirror Configuration

Many roles in zuul-jobs can be made aware of local mirrors of Internet services. If site mirrors are present, they expect to find a variable named mirror_info, or zuul_site_mirror_info if that is not defined. This variable is a dictionary which holds keys for each type of mirror that one or more roles in zuul-jobs can work with.

Note

The following example defines a local variable zuul_site_local_mirror_host for convenience, but it is not part of the API -- it is only used in defining the mirror info dictionary.

For example:

zuul_site_local_mirror_host: "mirror.{{ nodepool.region | lower }}.{{ nodepool.cloud | lower }}.example.org"

zuul_site_mirror_info:
  pypi:
    url: https://{{ zuul_site_local_mirror_host }}/pypi/simple
  wheel:
    url: https://{{ zuul_site_local_mirror_host }}/wheel
  fedora:
    url: https://{{ zuul_site_local_mirror_host }}/fedora
  opensuse:
    url: https://{{ zuul_site_local_mirror_host }}/opensuse
  debian:
    - url: https://{{ zuul_site_local_mirror_host }}/debian
      components: ['main']
    - url: https://{{ zuul_site_local_mirror_host }}/debian-security
      components: ['main']
  ubuntu:
    - url: https://{{ zuul_site_local_mirror_host }}/ubuntu
      components: ['main', 'universe']
      trusted: true
    - url: https://{{ zuul_site_local_mirror_host }}/ubuntu-security
      components: ['main', 'universe']
      trusted: true
  dockerhub:
    url: https://{{ zuul_site_local_mirror_host }}:8082/

A dictionary which contains information about the various mirrors available. Each type of mirror is a key in this dictionary; if it is not present, then the site does not have that mirror.

The URL for a PyPI mirror.

The URL for a Python wheel mirror.

The URL for a Fedora mirror.

The URL for an EPEL mirror.

The URL for an openSUSE mirror.

The URL for a Docker Hub mirror.