Customizations for trove

This patchset contains customization of Dockerfiles
of trove containers

Change-Id: I402e6e7e705a088fa834640fb0676fd05c4073ff
Partially-implements: blueprint third-party-plugin-support
This commit is contained in:
Swapnil Kulkarni (coolsvap) 2016-07-23 15:01:42 +05:30
parent 5a21032fb0
commit d03f1bbf5f
5 changed files with 45 additions and 50 deletions

View File

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

View File

@ -1,21 +1,18 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set trove_base_packages = ['openstack-trove-common'] %}
RUN yum -y install \
openstack-trove-common \
&& yum clean all
{% elif base_distro in ['ubuntu'] %} {% elif base_distro in ['ubuntu'] %}
{% set trove_base_packages = ['trove-common'] %}
RUN apt-get -y install --no-install-recommends \
trove-common \
&& apt-get clean
{% endif %} {% endif %}
RUN {{ macros.install_packages(trove_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %} {% elif install_type == 'source' %}
ADD trove-base-archive /trove-base-source ADD trove-base-archive /trove-base-source
@ -29,3 +26,6 @@ RUN ln -s trove-base-source/* trove \
{% endif %} {% endif %}
RUN usermod -a -G kolla trove RUN usermod -a -G kolla trove
{% block trove_base_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set trove_conductor_packages = ['openstack-trove-conductor'] %}
RUN yum -y install \
openstack-trove-conductor \
&& yum clean all
{% elif base_distro in ['ubuntu'] %} {% elif base_distro in ['ubuntu'] %}
{% set trove_conductor_packages = ['trove-conductor'] %}
RUN apt-get -y install --no-install-recommends \
trove-conductor \
&& apt-get clean
{% endif %} {% endif %}
RUN {{ macros.install_packages(trove_conductor_packages | customizable("packages")) }}
{% endif %} {% endif %}
{% block trove_conductor_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}
USER trove USER trove

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set trove_guestagent_packages = ['openstack-trove-guestagent'] %}
RUN yum -y install \
openstack-trove-guestagent \
&& yum clean all
{% elif base_distro in ['ubuntu'] %} {% elif base_distro in ['ubuntu'] %}
{% set trove_guestagent_packages = ['trove-guestagent'] %}
RUN apt-get -y install --no-install-recommends \
trove-guestagent \
&& apt-get clean
{% endif %} {% endif %}
RUN {{ macros.install_packages(trove_guestagent_packages | customizable("packages")) }}
{% endif %} {% endif %}
{% block trove_guestagent_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}
USER trove USER trove

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set trove_taskmanager_packages = ['openstack-trove-taskmanager'] %}
RUN yum -y install \
openstack-trove-taskmanager \
&& yum clean all
{% elif base_distro in ['ubuntu'] %} {% elif base_distro in ['ubuntu'] %}
{% set trove_taskmanager_packages = ['trove-taskmanager'] %}
RUN apt-get -y install --no-install-recommends \
trove-taskmanager \
&& apt-get clean
{% endif %} {% endif %}
RUN {{ macros.install_packages(trove_taskmanager_packages | customizable("packages")) }}
{% endif %} {% endif %}
{% block trove_taskmanager_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}
USER trove USER trove