diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-08-05 11:32:18 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-08-05 11:32:18 +0000 |
| commit | ece1595081238ecbe114f02942265c9db87a0b17 (patch) | |
| tree | 9d029065abafd00debaffc5cedb345414377ed40 | |
| parent | e61cc1a2a57a55a082ba978f2794e633afb66e16 (diff) | |
| parent | f7e18cab31340c6934ab378f5483d2c84e761d10 (diff) | |
| download | kolla-ece1595081238ecbe114f02942265c9db87a0b17.tar.gz kolla-ece1595081238ecbe114f02942265c9db87a0b17.zip | |
Merge "Customizations for gnocchi"
| -rw-r--r-- | docker/gnocchi/gnocchi-api/Dockerfile.j2 | 26 | ||||
| -rw-r--r-- | docker/gnocchi/gnocchi-base/Dockerfile.j2 | 28 | ||||
| -rw-r--r-- | docker/gnocchi/gnocchi-metricd/Dockerfile.j2 | 18 | ||||
| -rw-r--r-- | docker/gnocchi/gnocchi-statsd/Dockerfile.j2 | 12 |
4 files changed, 36 insertions, 48 deletions
diff --git a/docker/gnocchi/gnocchi-api/Dockerfile.j2 b/docker/gnocchi/gnocchi-api/Dockerfile.j2 index 995cdeaca..6c4ac2530 100644 --- a/docker/gnocchi/gnocchi-api/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-api/Dockerfile.j2 @@ -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 diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 index 650b06b13..3c6d0f33e 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -1,28 +1,18 @@ 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 diff --git a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 b/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 index d4ac00ad1..19c1b1e0c 100644 --- a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 @@ -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 }} diff --git a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 index 900cab8e8..1bd44e0ab 100644 --- a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 @@ -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 }} |
