aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2020-03-16 15:16:31 +0000
committerMark Goddard <mark@stackhpc.com>2020-04-15 14:17:40 +0100
commit788978211326093e10795c611971ca8911e2a986 (patch)
tree988b081b5d4973bbf93b037a82f540bd6bd28986
parent53443c5c712f4ec23b859105e94bcd90abc27762 (diff)
downloadkolla-788978211326093e10795c611971ca8911e2a986.tar.gz
kolla-788978211326093e10795c611971ca8911e2a986.zip
CentOS 8: Switch last mentions of yum to dnf
Change-Id: I31e9742793cfb1abff9749083c9ce86000dae1af Partially-Implements: blueprint centos-rhel-8
-rw-r--r--doc/source/admin/image-building.rst2
-rw-r--r--docker/base/Dockerfile.j22
-rw-r--r--docker/bifrost/bifrost-base/Dockerfile.j24
-rw-r--r--docker/cyborg/cyborg-agent/Dockerfile.j22
-rw-r--r--docker/logstash/Dockerfile.j22
-rwxr-xr-xkolla/image/build.py4
-rwxr-xr-xtools/validate-install-command.sh4
7 files changed, 11 insertions, 9 deletions
diff --git a/doc/source/admin/image-building.rst b/doc/source/admin/image-building.rst
index 41e556e39..2f53588aa 100644
--- a/doc/source/admin/image-building.rst
+++ b/doc/source/admin/image-building.rst
@@ -164,7 +164,7 @@ Build OpenStack from source
When building images, there are two methods of the OpenStack install. One is
``binary``. Another is ``source``. The ``binary`` means that OpenStack will be
-installed from apt/yum. And the ``source`` means that OpenStack will be
+installed from apt/dnf. And the ``source`` means that OpenStack will be
installed from source code. The default method of the OpenStack install is
``binary``. It can be changed to ``source`` using the ``-t`` option:
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index a0a0ffebe..07dcc9461 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -51,11 +51,13 @@ RUN CURRENT_DISTRO_RELEASE=$(awk '{match($0, /[0-9]+/,version)}END{print version
&& cat /tmp/kolla_bashrc >> /etc/bashrc \
&& sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/dnf/dnf.conf
+{% block base_dnf_conf %}
{% block base_yum_conf %}
COPY dnf.conf /etc/dnf/dnf.conf
{% endblock %}
+{% endblock %}
# Install what is needed for en_US.UTF-8
{% block base_centos_distro_sync_and_languages %}
diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/docker/bifrost/bifrost-base/Dockerfile.j2
index 9efeef674..72521cbe2 100644
--- a/docker/bifrost/bifrost-base/Dockerfile.j2
+++ b/docker/bifrost/bifrost-base/Dockerfile.j2
@@ -34,7 +34,7 @@ WORKDIR /bifrost
{% if base_package_type == 'rpm' %}
{# Remove updated RabbitMQ packages since these are not supported by Bifrost yet. #}
RUN rm -f /etc/yum.repos.d/rabbitmq_rabbitmq-server.repo \
- && yum clean all && rm -rf /var/yum/cache
+ && dnf clean all && rm -rf /var/dnf/cache
{% elif base_package_type == 'deb' %}
RUN sed -e "s/.*mariadb.*//Ig" -e "s/.*rabbitmq.*//Ig" -i /etc/apt/sources.list \
&& apt-get purge -y mariadb* mysql*
@@ -55,7 +55,7 @@ RUN echo " " && \
{%- if base_package_type == 'deb' %}
apt-get clean && rm -rf /var/lib/apt/lists/*'
{%- else %}
- yum clean all && rm -rf /var/yum/cache'
+ dnf clean all && rm -rf /var/dnf/cache'
{%- endif %}
{% endblock %}
{% endif %}
diff --git a/docker/cyborg/cyborg-agent/Dockerfile.j2 b/docker/cyborg/cyborg-agent/Dockerfile.j2
index 97e3790dd..c50c5fc9f 100644
--- a/docker/cyborg/cyborg-agent/Dockerfile.j2
+++ b/docker/cyborg/cyborg-agent/Dockerfile.j2
@@ -39,7 +39,7 @@ RUN curl -sSL -o /tmp/opae-libs.rpm ${opae_libs_rpm_url} \
&& echo "${opae_libs_rpm_sha1sum} /tmp/opae-libs.rpm" | sha1sum -c \
&& curl -sSL -o /tmp/opae-devel.rpm ${opae_devel_rpm_url} \
&& echo "${opae_devel_rpm_sha1sum} /tmp/opae-devel.rpm" | sha1sum -c \
- && yum -y install /tmp/opae-libs.rpm /tmp/opae-devel.rpm \
+ && dnf -y install /tmp/opae-libs.rpm /tmp/opae-devel.rpm \
&& rm -f /tmp/opae-libs.rpm /tmp/opae-devel.rpm
# NOTE(Bai Yongjun) Required packages are only supported Ubuntu16.04
diff --git a/docker/logstash/Dockerfile.j2 b/docker/logstash/Dockerfile.j2
index 66a77296b..3e8bcdb1f 100644
--- a/docker/logstash/Dockerfile.j2
+++ b/docker/logstash/Dockerfile.j2
@@ -47,7 +47,7 @@ ENV logstash_rpm_url=https://download.elastic.co/logstash/logstash/packages/cent
ENV logstash_rpm_sha1sum=68c5e78c3d941f06f77d638c0756b6aea715bec5
RUN curl -sSL -o /tmp/logstash.rpm ${logstash_rpm_url} \
&& echo "${logstash_rpm_sha1sum} /tmp/logstash.rpm" | sha1sum -c \
- && yum -y install /tmp/logstash.rpm \
+ && dnf -y install /tmp/logstash.rpm \
&& rm -f /tmp/logstash.rpm
{% elif base_package_type == 'deb' %}
diff --git a/kolla/image/build.py b/kolla/image/build.py
index 7f5c833e4..dec484af6 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -833,8 +833,8 @@ class KollaWorker(object):
for config in rpm_setup_config:
if config.endswith('.rpm'):
- # RPM files can be installed with yum from file path or url
- cmd = "RUN yum -y install {}".format(config)
+ # RPM files can be installed with dnf from file path or url
+ cmd = "RUN dnf -y install {}".format(config)
elif config.endswith('.repo'):
if config.startswith('http'):
# Curl http://url/etc.repo to /etc/yum.repos.d/etc.repo
diff --git a/tools/validate-install-command.sh b/tools/validate-install-command.sh
index bc7409690..eff67d5cf 100755
--- a/tools/validate-install-command.sh
+++ b/tools/validate-install-command.sh
@@ -3,8 +3,8 @@
RES=0
for dockerfile in "$@"; do
- if grep "apt-get install\|yum install" "$dockerfile"; then
- echo "ERROR: $dockerfile has incorrectly formatted install command Should be in the form 'apt-get|yum -y install ...'" >&2
+ if grep "apt-get install\|dnf install" "$dockerfile"; then
+ echo "ERROR: $dockerfile has incorrectly formatted install command Should be in the form 'apt-get|dnf -y install ...'" >&2
RES=1
fi
done