Merge "Customizations for heka"

This commit is contained in:
Jenkins 2016-08-18 11:08:01 +00:00 committed by Gerrit Code Review
commit 38a7ec7685

View File

@ -1,22 +1,23 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% import "macros.j2" as macros with context %}
RUN yum -y install \ {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka-0_10_0-linux-amd64.rpm \ {% set heka_packages = [
&& yum clean all \ 'https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka-0_10_0-linux-amd64.rpm'
&& useradd --user-group heka \ ] %}
RUN useradd --user-group heka \
&& mkdir /etc/heka && mkdir /etc/heka
{% elif base_distro in ['ubuntu', 'debian'] %} {% elif base_distro in ['ubuntu', 'debian'] %}
{% set heka_packages = [
RUN curl --location https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka_0.10.0_amd64.deb -o heka_0.10.0_amd64.deb \ 'https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka_0.10.0_amd64.deb'
&& dpkg -i heka_0.10.0_amd64.deb \ ] %}
&& rm -f heka_0.10.0_amd64.deb
{% endif %} {% endif %}
RUN {{ macros.install_packages(heka_packages | customizable("packages")) }}
COPY plugins/modules /usr/share/heka/lua_modules/ COPY plugins/modules /usr/share/heka/lua_modules/
COPY plugins/decoders /usr/share/heka/lua_decoders/ COPY plugins/decoders /usr/share/heka/lua_decoders/
COPY plugins/encoders /usr/share/heka/lua_encoders/ COPY plugins/encoders /usr/share/heka/lua_encoders/
@ -29,6 +30,8 @@ RUN usermod -a -G kolla heka \
&& chmod 755 /usr/local/bin/kolla_extend_start \ && chmod 755 /usr/local/bin/kolla_extend_start \
&& chown -R heka: /usr/share/heka /etc/heka && chown -R heka: /usr/share/heka /etc/heka
{% block heka_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}
USER heka USER heka