Skip to content
Snippets Groups Projects
Commit 88bdbf8d authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Add support to the base image for RHEL"

parents 35ea22ee 36099992
No related branches found
No related tags found
No related merge requests found
......@@ -84,3 +84,20 @@ Now the source type support ``url`` and ``git``. The ``build.ini`` looks like:
type = git
location = https://github.com/openstack/keystone
reference = stable/kilo
To build RHEL containers, it is necessary to use the -i (include header)
feature to include registration with RHN of the container runtime operating
system. To obtain a RHN username/password/pool id, contact Red Hat.
First create a file called rhel-include:
::
RUN subscription-manager register --user=<user-name> --password=<password> \
&& subscription-manager attach --pool <pool-id>
Then build RHEL containers:
::
build -b rhel -i ./rhel-include
......@@ -6,7 +6,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
ENV KOLLA_BASE_DISTRO {{ base_distro }}
ENV KOLLA_INSTALL_TYPE {{ install_type }}
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
# Turns on MariaDB repos throughout the build
COPY mariadb.yum.repo /etc/yum.repos.d/MariaDB.repo
......@@ -15,7 +15,7 @@ RUN yum install -y http://www.percona.com/redir/downloads/percona-release/redhat
&& sed -i 's|$releasever|centos/latest|g' /etc/yum.repos.d/percona-release.repo
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux'] %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
# Set up repositories
# This repository provides all dependencies used by RDO OpenStack
......@@ -29,6 +29,7 @@ RUN curl http://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/yum.r
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 install -y epel-release \
&& yum clean all
{% endif %}
......@@ -40,6 +41,14 @@ RUN yum install -y \
RUN yum-config-manager --enable ol7_optional_latest ol7_addons
{% endif %}
{% if base_distro == 'rhel' %}
RUN yum install -y \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& subscription-manager repos --enable rhel-7-server-optional-rpms \
&& subscription-manager repos --enable rhel-7-server-extras-rpms \
&& yum clean all
{% endif %}
# Endif for base_distro centos/oraclelinux
{% elif base_distro == 'fedora' %}
......@@ -48,12 +57,10 @@ RUN yum install -y https://rdo.fedorapeople.org/rdo-release.rpm \
&& yum -y install dnf dnf-plugins-core \
&& yum clean all
# Endif for base_distro fedora
{% endif %}
# Update packages
RUN yum update -y \
&& yum install -y epel-release \
&& yum clean all
# Install base packages
......@@ -171,7 +178,7 @@ RUN yum update -y \
# Endif for install_type source
{% endif %}
# Endif for base_distro centos,fedora,oraclelinux
# Endif for base_distro centos,fedora,oraclelinux,rhel
{% elif base_distro in ['ubuntu', 'debian'] %}
# This will prevent questions from being asked during the install
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment