Merge "Customizations for magnum"

This commit is contained in:
Jenkins 2016-08-05 11:32:27 +00:00 committed by Gerrit Code Review
commit ecd7de0346
3 changed files with 21 additions and 30 deletions

View File

@ -1,25 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}magnum-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-magnum-api \
&& yum clean all
{% set magnum_api_packages = ['openstack-magnum-api'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
magnum-api\
&& apt-get clean
{% set magnum_api_packages = ['magnum-api'] %}
{% endif %}
RUN {{ macros.install_packages(magnum_api_packages | customizable("packages")) }}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_magnum_extend_start
RUN chmod 755 /usr/local/bin/kolla_magnum_extend_start
{% block magnum_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER magnum

View File

@ -1,21 +1,17 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
{% set magnum_base_packages = ['openstack-magnum-common'] %}
RUN curl -L https://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/yum.repos.d/delorean.repo \
&& yum -y install \
openstack-magnum-common \
&& yum clean all
RUN curl -L https://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/yum.repos.d/delorean.repo
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
magnum-common \
&& apt-get clean
{% set magnum_base_packages = ['magnum-common'] %}
{% endif %}
RUN {{ macros.install_packages(magnum_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
ADD magnum-base-archive /magnum-base-source

View File

@ -1,21 +1,18 @@
FROM {{ namespace }}/{{ image_prefix }}magnum-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-magnum-conductor \
tar \
&& yum clean all
{% set magnum_conductor_packages = [
'openstack-magnum-conductor',
'tar'
] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
magnum-conductor\
&& apt-get clean
{% set magnum_conductor_packages = ['magnum-conductor'] %}
{% endif %}
RUN {{ macros.install_packages(magnum_conductor_packages | customizable("packages")) }}
# Install kubectl binary (ugh)
RUN cd /tmp \
@ -26,6 +23,8 @@ RUN cd /tmp \
{% endif %}
{% block magnum_conductor_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER magnum