Customizations for gnocchi

This patchset contains customization of Dockerfiles
of gnocchi containers

Change-Id: I39f3cc44664225d3e7cbb735a7b70d5cd0f7ec47
Partially-implements: blueprint third-party-plugin-support
This commit is contained in:
Swapnil Kulkarni (coolsvap) 2016-07-23 10:09:30 +05:30
parent db4e2875b3
commit f7e18cab31
4 changed files with 36 additions and 48 deletions

View File

@ -1,27 +1,25 @@
FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}gnocchi-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 gnocchi_api_packages = [
RUN yum -y install \ 'openstack-gnocchi-api',
openstack-gnocchi-api \ 'openstack-gnocchi-carbonara',
openstack-gnocchi-carbonara \ 'openstack-gnocchi-indexer-sqlalchemy'
openstack-gnocchi-indexer-sqlalchemy \ ] %}
&& yum clean all
{% elif base_distro in ['ubuntu'] %} {% elif base_distro in ['ubuntu'] %}
{% set gnocchi_api_packages = ['gnocchi-api'] %}
RUN apt-get -y install --no-install-recommends \
gnocchi-api \
&& apt-get clean
{% endif %} {% endif %}
RUN {{ macros.install_packages(gnocchi_api_packages | customizable("packages")) }}
{% endif %} {% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start COPY extend_start.sh /usr/local/bin/kolla_gnocchi_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_gnocchi_extend_start
{% block gnocchi_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}
USER gnocchi USER gnocchi

View File

@ -1,28 +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'] %}
RUN yum -y install \ {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
openstack-gnocchi-common \ {% set gnocchi_base_packages = ['openstack-gnocchi-common'] %}
&& yum clean all {% elif base_distro in ['ubuntu'] %}
{% set gnocchi_base_packages = ['gnocchi-common'] %}
{% endif %}
RUN {{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
gnocchi-common \
&& apt-get clean
{% endif %}
{% elif install_type == 'source' %} {% elif install_type == 'source' %}
{% if base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
libpq-dev \
&& apt-get clean
{% endif %}
ADD gnocchi-base-archive /gnocchi-base-source ADD gnocchi-base-archive /gnocchi-base-source
RUN ln -s gnocchi-base-source/* gnocchi \ RUN ln -s gnocchi-base-source/* gnocchi \
@ -34,4 +24,4 @@ RUN ln -s gnocchi-base-source/* gnocchi \
{% endif %} {% endif %}
RUN usermod -a -G kolla gnocchi RUN usermod -a -G kolla gnocchi

View File

@ -1,21 +1,19 @@
FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}gnocchi-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 gnocchi_metricd_packages = ['openstack-gnocchi-metricd'] %}
RUN yum -y install \
openstack-gnocchi-metricd \
&& yum clean all
{% elif base_distro in ['ubuntu'] %} {% elif base_distro in ['ubuntu'] %}
{% set gnocchi_metricd_packages = ['gnocchi-metricd'] %}
RUN apt-get -y install --no-install-recommends \
gnocchi-metricd \
&& apt-get clean
{% endif %} {% endif %}
RUN {{ macros.install_packages(gnocchi_metricd_packages | customizable("packages")) }}
{% endif %} {% endif %}
{% block gnocchi_metricd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}

View File

@ -1,15 +1,17 @@
FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}gnocchi-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 gnocchi_statsd_packages = ['openstack-gnocchi-statsd'] %}
RUN yum -y install \
openstack-gnocchi-statsd \
&& yum clean all
{% endif %} {% endif %}
RUN {{ macros.install_packages(gnocchi_statsd_packages | customizable("packages")) }}
{% endif %} {% endif %}
{% block gnocchi_statsd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}