Improve dry-ness of base dockerfile.j2

The delorean repositories no longer have a separate location for
openvswitch.  Now openvswitch is located in delorean-deps.repo
and the rest of delorean master is located in the delorean.repo
file.  These files can be installed for both RDO and SOURCE, but
not for RHOS.  This patch uses the install_metatype to make a
determination as to when to install these two repos.  In the
process, we can remove the source RPM installation.

Closes-Bug: #1508326
(cherry picked from commit c7a9835b68)
Change-Id: Ieedddd9d7ee234b6acdb03f7043d57c18e024951
This commit is contained in:
Steven Dake 2015-10-21 04:53:36 -04:00
parent a3a8a4fda4
commit 1fb1fcb4de
1 changed files with 4 additions and 14 deletions

View File

@ -47,12 +47,11 @@ COPY ceph.yum.repo /etc/yum.repos.d/ceph.repo
RUN yum install -y http://www.percona.com/redir/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm \
&& sed -i 's|$releasever|centos/latest|g' /etc/yum.repos.d/percona-release.repo
{% if install_metatype == 'rdo' %}
{% if install_metatype in ['rdo', 'mixed'] %}
# This repository provides latest packages built from liberty stable branches
RUN yum -y install \
http://rdoproject.org/repos/openstack-liberty/rdo-release-liberty.rpm \
&& yum clean all
# These repos provide latest packages built from trunk master into RPMs
RUN curl http://trunk.rdoproject.org/centos7/current-passed-ci/delorean.repo -o /etc/yum.repos.d/delorean.repo
RUN curl http://trunk.rdoproject.org/centos7/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
{% endif %}
# endif for repo setup for all RHEL except RHEL OSP
@ -132,15 +131,6 @@ RUN yum install -y \
{% if install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
# This repository provides latest packages built from liberty stable branches
RUN yum -y install \
http://rdoproject.org/repos/openstack-liberty/rdo-release-liberty.rpm \
&& yum clean all
{% endif %}
# Update packages
RUN yum -y install \
curl \