From 0340bc4043bd65fbc975c11a86ba89e20293be0a Mon Sep 17 00:00:00 2001 From: Ryan Hallisey Date: Tue, 3 Nov 2015 23:30:35 -0500 Subject: [PATCH] Fix RHEL builds Register with RHEL on the host machine and use yum to setup the repos in the container. Change-Id: I38aaf43fffaf7a235e69b330d5d9f0f1be31fe83 Backport: Liberty Closes-Bug: #1513088 --- docker/base/Dockerfile.j2 | 8 ++++---- kolla/cmd/build.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 755060231e..378826c475 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -58,8 +58,8 @@ RUN curl http://trunk.rdoproject.org/centos7/delorean-deps.repo -o /etc/yum.repo {% if install_metatype == 'rhos' %} # Turn on the RHOS 7.0 repo for RHOS -RUN subscription-manager repos --enable rhel-7-server-rpms \ - && subscription-manager repos --enable rhel-7-server-openstack-7.0-rpms +RUN yum-config-manager --enable rhel-7-server-rpms \ + && yum-config-manager --enable rhel-7-server-openstack-7.0-rpms {% endif %} @@ -82,8 +82,8 @@ RUN rpm -e --nodeps systemd-container systemd-container-libs \ RUN yum install -y \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ && yum clean all \ - && subscription-manager repos --enable rhel-7-server-optional-rpms \ - && subscription-manager repos --enable rhel-7-server-extras-rpms + && yum-config-manager --enable rhel-7-server-optional-rpms \ + && yum-config-manager --enable rhel-7-server-extras-rpms {% endif %} # Endif for base_distro RHEL diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index 94da59e6f6..e51612c41e 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -326,6 +326,8 @@ class KollaWorker(object): self.install_metatype = 'rdo' elif self.install_type == 'source': self.install_metatype = 'mixed' + elif self.install_type == 'rhel': + self.install_metatype = 'rhos' self.tag = config['tag'] self.include_header = config['include_header']