kolla-ansible/docker/magnum/magnum-base/Dockerfile.j2
Steven Dake 0e99b69de4 Implement a install_type and install_metatype
This prepares for the RHEL OSP implementation by making the build
tool convert all binary-* into an install_type of binary and * into
an install_metatype variable substitution inside the Dockerfiles.
Further binary-* is substituted as install_name to enable proper
building only.

Change-Id: Ib681b29176eb79a3cab12ec824313fdecb6e7a5f
Partially-Implements: blueprint rhel-based-image-support
2015-09-28 03:16:48 -07:00

30 lines
1.1 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
{% 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
{% elif base_distro in ['fedora'] %}
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 ['oraclelinux'] %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% elif install_type == 'source' %}
ADD magnum-base-archive /magnum-base-source
RUN ln -s magnum-base-source/* magnum \
&& useradd --user-group magnum \
&& pip --no-cache-dir install /magnum \
&& mkdir -p /etc/magnum /var/log/magnum /home/magnum \
&& cp -r /magnum/etc/* /etc/magnum/ \
&& chown -R magnum: /etc/magnum /var/log/magnum /home/magnum
{% endif %}