CI: Clean up Zuul repo mirrors for CentOS
- unify RDO mirror definition with others - drop definitions of unused mirrors: grafana, elastic - clean up the process of mirror substitution: - use the more common style of sed d command - apply more specific substitutions Change-Id: Idad2c6956cca647d4c865d6f6149ea37164db568 Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
This commit is contained in:
parent
c553afa308
commit
e7e0adad6d
@ -21,7 +21,7 @@ RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-
|
||||
{% elif base_distro == 'centos' %}
|
||||
{% endraw %}
|
||||
|
||||
RUN sed -i -e "/^mirrorlist/d" \
|
||||
RUN sed -i -e "/^mirrorlist/ d" \
|
||||
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
||||
/etc/yum.repos.d/CentOS-Base.repo
|
||||
|
||||
@ -33,15 +33,19 @@ RUN sed -i -e "/^mirrorlist/d" \
|
||||
{% if base_distro == "centos" %}
|
||||
{% endraw %}
|
||||
|
||||
RUN sed -i -e "/^mirrorlist/d" \
|
||||
-e "/^metalink/d" \
|
||||
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|g" \
|
||||
-e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|g" \
|
||||
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|g" \
|
||||
-e "s|^baseurl=https://packages.elastic.co|baseurl={{ nodepool_elastic_proxy }}|g" \
|
||||
-e "s|^baseurl=https://packagecloud.io/grafana|baseurl={{ nodepool_grafana_proxy }}|g" \
|
||||
-e "s|^baseurl=https://trunk.rdoproject.org|baseurl=http://{{ nodepool_rdo_proxy }}|g" \
|
||||
-e "s|^baseurl=https://cbs.centos.org/repos|baseurl={{ nodepool_cbs_centos_proxy }}|g" \
|
||||
## NOTE(yoctozepto): GPG key location is replaced for Percona repo only
|
||||
## TODO(yoctozepto): CentOS hits external EPEL repo for its repo package (epel-release-*.rpm), should use the mirrored
|
||||
RUN sed -i \
|
||||
-e "/^mirrorlist/ d" \
|
||||
-e "s|^#baseurl=http://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 }}|" \
|
||||
/etc/yum.repos.d/epel*.repo \
|
||||
&& sed -i \
|
||||
-e "s|https://trunk.rdoproject.org|{{ nodepool_rdo_proxy }}|g" \
|
||||
-e "s|https://cbs.centos.org/repos|{{ nodepool_cbs_centos_proxy }}|g" \
|
||||
-e "s|https://repo.percona.com|{{ nodepool_percona_proxy }}|g" \
|
||||
/etc/yum.repos.d/*.repo
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
---
|
||||
nodepool_rdo_proxy: "{{ zuul_site_mirror_fqdn }}:8080/rdo"
|
||||
nodepool_rdo_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/rdo"
|
||||
nodepool_pypi_mirror: "http://{{ zuul_site_mirror_fqdn }}:8080/pypi/simple"
|
||||
nodepool_mirror_host: "{{ zuul_site_mirror_fqdn }}"
|
||||
nodepool_npmjs_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/registry.npmjs/"
|
||||
nodepool_elastic_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/elastic/"
|
||||
nodepool_grafana_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/grafana/"
|
||||
nodepool_cbs_centos_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/cbs.centos"
|
||||
nodepool_percona_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/percona"
|
||||
|
Loading…
x
Reference in New Issue
Block a user