base: enable rabbitmq and elasticsearch repos for ppc64le

We use the fact that 'rabbitmq-server' package is 'noarch' and reuse
x86-64 repository for ppc64le architecture.

Package installs and runs.

Change-Id: I7a8b22dacc0626561ea261fc198d5ce4912902e1
This commit is contained in:
Marcin Juszkiewicz 2019-09-17 13:08:29 +02:00
parent 919304f12b
commit 2241efb2eb
1 changed files with 16 additions and 0 deletions

View File

@ -103,12 +103,28 @@ COPY yum.conf /etc/yum.conf
'https://packages.grafana.com/gpg.key',
'https://packagecloud.io/gpg.key',
] %}
{% elif base_arch == 'ppc64le' %}
{% set base_yum_repo_files = [
'elasticsearch.repo',
'rabbitmq_rabbitmq-server.repo'
] %}
{% set base_yum_repo_keys = [
'https://artifacts.elastic.co/GPG-KEY-elasticsearch',
'https://packagecloud.io/gpg.key',
] %}
{% endif %}
{%- for repo_file in base_yum_repo_files | customizable('yum_repo_files') %}
COPY {{ repo_file }} /etc/yum.repos.d/{{ repo_file }}
{%- endfor %}
# NOTE(hrw): 'rabbitmq-server' is 'noarch' so we can install it on ppc64le from
# repo for other architecture.
{% if base_arch == 'ppc64le' %}
RUN sed -i -e 's/\$basearch/x86_64/g' /etc/yum.repos.d/rabbitmq_rabbitmq-server.repo
{% endif %}
{% block base_centos_repo_overrides_post_copy %}{% endblock %}
{{ macros.install_packages(base_yum_url_packages | customizable("yum_url_packages")) }}