Skip to content
Snippets Groups Projects
Commit f7e18cab authored by Swapnil Kulkarni (coolsvap)'s avatar Swapnil Kulkarni (coolsvap)
Browse files

Customizations for gnocchi

This patchset contains customization of Dockerfiles
of gnocchi containers

Change-Id: I39f3cc44664225d3e7cbb735a7b70d5cd0f7ec47
Partially-implements: blueprint third-party-plugin-support
parent db4e2875
No related branches found
No related tags found
No related merge requests found
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
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-gnocchi-common \
&& yum clean all
{% import "macros.j2" as macros with context %}
{% elif base_distro in ['ubuntu'] %}
{% if install_type == 'binary' %}
RUN apt-get -y install --no-install-recommends \
gnocchi-common \
&& apt-get clean
{% 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")) }}
{% 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
\ No newline at end of file
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 }}
......
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 }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment