Change more repo url to infra mirror
Change-Id: I7e9fd2760ae3202f3a84833bb65edfdcffa67fe4
This commit is contained in:
parent
2a58003253
commit
5feb113033
@ -1,6 +1,14 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
vars:
|
vars:
|
||||||
kolla_inventory_path: "{{ zuul.project.src_dir }}/inventory"
|
kolla_inventory_path: "{{ zuul.project.src_dir }}/inventory"
|
||||||
|
nodepool_rdo_proxy: "{{ 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_opendaylight_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/opendaylight/"
|
||||||
|
nodepool_oraclelinux_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/oraclelinux/"
|
||||||
tasks:
|
tasks:
|
||||||
- name: generate kolla inventory file
|
- name: generate kolla inventory file
|
||||||
copy:
|
copy:
|
||||||
@ -35,12 +43,6 @@
|
|||||||
mode: 666
|
mode: 666
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Prepare mirror configuration
|
|
||||||
set_fact:
|
|
||||||
nodepool_rdo_proxy: "{{ zuul_site_mirror_fqdn }}:8080/rdo"
|
|
||||||
nodepool_pypi_mirror: "{{ zuul_site_mirror_fqdn }}:8080/pypi/simple"
|
|
||||||
nodepool_mirror_host: "{{ zuul_site_mirror_fqdn }}"
|
|
||||||
|
|
||||||
- name: Ensure /etc/kolla exists
|
- name: Ensure /etc/kolla exists
|
||||||
file:
|
file:
|
||||||
path: /etc/kolla
|
path: /etc/kolla
|
||||||
@ -53,24 +55,10 @@
|
|||||||
src: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/tests/templates/kolla-build.conf.j2"
|
src: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/tests/templates/kolla-build.conf.j2"
|
||||||
dest: /etc/kolla/kolla-build.conf
|
dest: /etc/kolla/kolla-build.conf
|
||||||
|
|
||||||
- set_fact:
|
|
||||||
template_override_path: zuul.executor.work_root + '/' + zuul.project.src_dir '/tests/templates/pip.conf.j2'
|
|
||||||
|
|
||||||
- name: Prepare pip.conf
|
|
||||||
template:
|
|
||||||
src: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/tests/templates/pip.conf.j2"
|
|
||||||
dest: /etc/kolla/pip.conf
|
|
||||||
|
|
||||||
- name: Read contents of pip.conf
|
|
||||||
command: "cat /etc/kolla/pip.conf"
|
|
||||||
register: pip_conf_file
|
|
||||||
|
|
||||||
- name: Template override
|
- name: Template override
|
||||||
template:
|
template:
|
||||||
src: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/tests/templates/template_overrides.j2"
|
src: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/tests/templates/template_overrides.j2"
|
||||||
dest: /etc/kolla/template_overrides.j2
|
dest: /etc/kolla/template_overrides.j2
|
||||||
vars:
|
|
||||||
pip_conf: "{{ pip_conf_file.stdout | b64encode }}"
|
|
||||||
|
|
||||||
- shell:
|
- shell:
|
||||||
cmd: |
|
cmd: |
|
||||||
|
@ -7,3 +7,6 @@ tag = {{ zuul.branch | basename }}
|
|||||||
push = false
|
push = false
|
||||||
logs_dir = /tmp/logs/build
|
logs_dir = /tmp/logs/build
|
||||||
template_override = /etc/kolla/template_overrides.j2
|
template_override = /etc/kolla/template_overrides.j2
|
||||||
|
|
||||||
|
[opendaylight]
|
||||||
|
location = {{ nodepool_opendaylight_proxy}}/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.2-Carbon/distribution-karaf-0.6.2-Carbon.tar.gz
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
[global]
|
|
||||||
timeout = 60
|
|
||||||
index-url = {{ nodepool_pypi_mirror }}
|
|
||||||
trusted-host = {{ nodepool_mirror_host }}
|
|
@ -4,13 +4,32 @@
|
|||||||
{% block base_header %}
|
{% block base_header %}
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
RUN echo $(base64 -w0 "{{ pip_conf }}") | base64 -d > /etc/pip.conf
|
ENV PIP_INDEX_URL {{ nodepool_pypi_mirror }}
|
||||||
|
ENV PIP_TRUSTED_HOST {{ nodepool_mirror_host }}
|
||||||
|
|
||||||
|
RUN echo registry={{ nodepool_npmjs_proxy }} > /etc/npmrc \
|
||||||
|
&& mkdir -p /usr/etc \
|
||||||
|
&& ln -s /etc/npmrc /usr/etc/npmrc
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
{% if base_distro == 'ubuntu' %}
|
{% if base_distro == 'ubuntu' %}
|
||||||
|
|
||||||
RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated
|
RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated
|
||||||
|
{% elif base_distro == 'centos' %}
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
{% elif base_distro == 'oraclelinux' %}
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
RUN sed -i -e "s|^baseurl=http://yum.oracle.com/repo/OracleLinux|baseurl={{ nodepool_oraclelinux_proxy }}|" \
|
||||||
|
/etc/yum.repos.d/public-yum-ol7.repo
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@ -19,27 +38,26 @@ RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-
|
|||||||
{% endraw %}
|
{% 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 }}|" \
|
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|g" \
|
||||||
/etc/yum.repos.d/CentOS-Base.repo \
|
-e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|g" \
|
||||||
&& sed -i -e "/^mirrorlist/d" \
|
-e "s|^baseurl=https://packages.elastic.co|baseurl={{ nodepool_elastic_proxy }}|g" \
|
||||||
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
|
-e "s|^baseurl=https://packagecloud.io/grafana|baseurl={{ nodepool_grafana_proxy }}|g" \
|
||||||
/etc/yum.repos.d/epel.repo \
|
-e "s|^baseurl=https://trunk.rdoproject.org|baseurl=http://{{ nodepool_rdo_proxy }}|g" \
|
||||||
&& sed -i -e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
/etc/yum.repos.d/*.repo
|
||||||
/etc/yum.repos.d/CentOS-Ceph-Jewel.repo \
|
|
||||||
&& sed -i -e "s|^baseurl=https://trunk.rdoproject.org|baseurl=http://{{ nodepool_rdo_proxy }}|" \
|
|
||||||
/etc/yum.repos.d/delorean.repo
|
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
{% elif base_distro == "oraclelinux" %}
|
{% elif base_distro == "oraclelinux" %}
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
RUN sed -i -e "/^mirrorlist/d" \
|
RUN sed -i -e "/^mirrorlist/d" \
|
||||||
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
|
-e "/^metalink/d" \
|
||||||
/etc/yum.repos.d/epel.repo \
|
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|g" \
|
||||||
&& sed -i -e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|g" \
|
||||||
/etc/yum.repos.d/CentOS-Ceph-Jewel.repo \
|
-e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|g" \
|
||||||
&& sed -i -e "s|^baseurl=https://trunk.rdoproject.org|baseurl=http://{{ nodepool_rdo_proxy }}|" \
|
-e "s|^baseurl=https://packages.elastic.co|baseurl={{ nodepool_elastic_proxy }}|g" \
|
||||||
/etc/yum.repos.d/delorean.repo
|
-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" \
|
||||||
|
/etc/yum.repos.d/*.repo
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
{% elif base_distro == "ubuntu" %}
|
{% elif base_distro == "ubuntu" %}
|
||||||
|
Loading…
Reference in New Issue
Block a user