
Since Kolla is run in the wild against PyPI mirrors which do not include the OpenDev-provided wheels, it might be nice to be able to test these scenarios in the CI. These jobs are added to the experimental queue so that they do not consume resources when not needed. Any Gerrit user may run them now to verify whether the change passes them. Change-Id: I9c33eeaf03be037651f82c831f0e07ab9a27752a
85 lines
2.7 KiB
Django/Jinja
85 lines
2.7 KiB
Django/Jinja
{% raw %}
|
|
{% extends parent_template %}
|
|
|
|
{% block base_header %}
|
|
{% endraw %}
|
|
|
|
ENV PIP_INDEX_URL {{ nodepool_pypi_mirror }}
|
|
ENV PIP_TRUSTED_HOST {{ nodepool_mirror_host }}
|
|
{% if use_infra_wheels_mirror | default(true) %}
|
|
ENV PIP_EXTRA_INDEX_URL {{ nodepool_wheel_mirror }}
|
|
{% endif %}
|
|
|
|
RUN echo registry={{ nodepool_npmjs_proxy }} > /etc/npmrc \
|
|
&& mkdir -p /usr/etc \
|
|
&& ln -s /etc/npmrc /usr/etc/npmrc
|
|
|
|
{% raw %}
|
|
{% if base_distro in ['debian', 'ubuntu'] %}
|
|
{% endraw %}
|
|
|
|
# NOTE(hrw): Debian 'buster' and Ubuntu 18.04 refuse to use unsigned repos
|
|
RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated \
|
|
&& echo 'Acquire::AllowInsecureRepositories "true";' > /etc/apt/apt.conf.d/99allow-insecure-repos
|
|
|
|
{% raw %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block base_centos_repo_overrides_post_copy %}
|
|
{% endraw %}
|
|
|
|
RUN sed -i \
|
|
-e "/^mirrorlist/ d" \
|
|
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
/etc/yum.repos.d/CentOS-*.repo
|
|
{% raw %}
|
|
{% endblock %}
|
|
|
|
{% block base_centos_repo_overrides_post_rpm %}
|
|
{% endraw %}
|
|
|
|
# FIXME(mgoddard): No CentOS8 RDO repos mirrored yet.
|
|
|
|
{% raw %}
|
|
{% endblock %}
|
|
|
|
{% block base_centos_repo_overrides_post_yum -%}
|
|
{%- endraw -%}
|
|
&& sed -i \
|
|
-e "/^mirrorlist/ d" \
|
|
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
-e "s|^#baseurl=https://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
-e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
-e "s|^baseurl=https://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
/etc/yum.repos.d/CentOS-*.repo \
|
|
&& sed -i \
|
|
-e "/^metalink/ d" \
|
|
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
-e "s|^#baseurl=https://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
/etc/yum.repos.d/epel*.repo
|
|
{%- raw -%}
|
|
{% endblock %}
|
|
|
|
{% block base_debian_after_sources_list %}
|
|
{% if base_distro == "debian" %}
|
|
{% endraw %}
|
|
|
|
RUN sed -i -e "s|http://deb.debian.org|http://{{ nodepool_mirror_host }}|" \
|
|
-e "s|http://security.debian.org|http://{{ nodepool_mirror_host }}|" \
|
|
/etc/apt/sources.list
|
|
|
|
{% raw %}
|
|
{% elif base_distro == "ubuntu" %}
|
|
{% endraw %}
|
|
|
|
RUN sed -i -e "s|mirror://mirrors.ubuntu.com/mirrors.txt|http://{{ nodepool_mirror_host }}/ubuntu/|" \
|
|
-e "s|http://ubuntu-cloud.archive.canonical.com/ubuntu|http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive|" \
|
|
-e "s|http://ports.ubuntu.com|http://{{ nodepool_mirror_host }}/ubuntu-ports|" \
|
|
/etc/apt/sources.list
|
|
|
|
{% raw %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% endraw %}
|