From 8cf4ffa22f1a1a20d2f2adf659d300c7df3d37ba Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Wed, 19 Aug 2015 16:58:12 +0000 Subject: [PATCH] Fix binary builds for oraclelinux templates * Enable some extra repos for oraclelinux in the base template. * Disable magnum binary builds for oraclelinux due to unavailable python-docker-py dependency Change-Id: Iaf8826dc0f9ff93a40e5ad3d1c0fd1fb6ef2e048 Closes-Bug: 1486636 --- docker_templates/base/Dockerfile.j2 | 14 ++++++++++++-- docker_templates/magnum/magnum-base/Dockerfile.j2 | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docker_templates/base/Dockerfile.j2 b/docker_templates/base/Dockerfile.j2 index fb7ff4f625..c185b2553f 100644 --- a/docker_templates/base/Dockerfile.j2 +++ b/docker_templates/base/Dockerfile.j2 @@ -3,7 +3,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} {% if install_type == 'binary' %} - {% if base_distro == 'centos' %} + {% if base_distro in ['centos', 'oraclelinux'] %} # Set up repositories # This repository provides all dependencies used by RDO OpenStack @@ -15,13 +15,23 @@ RUN curl http://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/yum.r # This repository turns off auth in PAM so we can operate on Ubuntu 14.04 RUN curl https://copr.fedoraproject.org/coprs/sdake/pam.noaudit/repo/epel-7/sdake-pam.noaudit-epel-7.repo -o /etc/yum.repos.d/sdake-pam.noaudit-epel-7.repo +{% if base_distro == 'centos' %} # CentOS 7.1 workaround for conflicting packages with libvirt RUN rpm -e --nodeps systemd-container systemd-container-libs \ && rpm -e --nodeps yum-plugin-fastestmirror \ && yum -d 10 -y install systemd systemd-libs systemd-devel \ && yum clean all +{% endif %} - # Endif for base_distro centos +{% if base_distro == 'oraclelinux' %} +RUN yum install -y \ + yum-utils \ + https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + && yum clean all +RUN yum-config-manager --enable ol7_optional_latest ol7_addons +{% endif %} + + # Endif for base_distro centos/oraclelinux {% elif base_distro == 'fedora' %} # Set up repositories diff --git a/docker_templates/magnum/magnum-base/Dockerfile.j2 b/docker_templates/magnum/magnum-base/Dockerfile.j2 index c49da1cd5d..b955329f03 100644 --- a/docker_templates/magnum/magnum-base/Dockerfile.j2 +++ b/docker_templates/magnum/magnum-base/Dockerfile.j2 @@ -2,7 +2,7 @@ FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} MAINTAINER Kolla Project (https://launchpad.net/kolla) {% if install_type == 'binary' %} - {% if base_distro in ['centos', 'oraclelinux'] %} + {% if base_distro in ['centos'] %} RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7/sdake-openstack-magnum-epel-7.repo -o /etc/yum.repos.d/sdake-openstack-magnum-epel-7.repo @@ -10,7 +10,7 @@ RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7 RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/fedora-22/sdake-openstack-magnum-fedora-22.repo -o /etc/yum.repos.d/sdake-openstack-magnum-f22.repo - {% elif base_distro in ['ubuntu', 'debian'] %} + {% elif base_distro in ['ubuntu', 'debian', 'oraclelinux'] %} RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false