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

View File

@ -1,28 +1,18 @@
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', 'rhel'] %}
RUN yum -y install \
openstack-gnocchi-common \
&& yum clean all
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set gnocchi_base_packages = ['openstack-gnocchi-common'] %}
{% 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' %}
{% 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
RUN ln -s gnocchi-base-source/* gnocchi \
@ -34,4 +24,4 @@ RUN ln -s gnocchi-base-source/* gnocchi \
{% 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 }}
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-gnocchi-metricd \
&& yum clean all
{% set gnocchi_metricd_packages = ['openstack-gnocchi-metricd'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
gnocchi-metricd \
&& apt-get clean
{% set gnocchi_metricd_packages = ['gnocchi-metricd'] %}
{% endif %}
RUN {{ macros.install_packages(gnocchi_metricd_packages | customizable("packages")) }}
{% endif %}
{% block gnocchi_metricd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

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