kolla-ansible/docker/gnocchi/gnocchi-base/Dockerfile.j2
Swapnil Kulkarni (coolsvap) f7e18cab31 Customizations for gnocchi
This patchset contains customization of Dockerfiles
of gnocchi containers

Change-Id: I39f3cc44664225d3e7cbb735a7b70d5cd0f7ec47
Partially-implements: blueprint third-party-plugin-support
2016-07-23 05:37:02 +00:00

27 lines
1008 B
Django/Jinja

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'] %}
{% 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 install_type == 'source' %}
ADD gnocchi-base-archive /gnocchi-base-source
RUN ln -s gnocchi-base-source/* gnocchi \
&& useradd --user-group gnocchi \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt tooz /gnocchi \
&& mkdir -p /etc/gnocchi /var/log/gnocchi /home/gnocchi \
&& cp -r /gnocchi/etc/* /etc/gnocchi/ \
&& chown -R gnocchi: /etc/gnocchi /var/log/gnocchi /home/gnocchi
{% endif %}
RUN usermod -a -G kolla gnocchi