From 348dc0fd1300e462918b331d44813880b20c5512 Mon Sep 17 00:00:00 2001 From: Josh Lothian Date: Tue, 26 Jul 2016 13:59:16 -0400 Subject: [PATCH] Customizations for heka This patchset contains customization of Dockerfile for heka container. Change-Id: I86a76fda182c745ae33c75a83113f471ea220a0c Partially-implements: blueprint third-party-plugin-support --- docker/heka/Dockerfile.j2 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/docker/heka/Dockerfile.j2 b/docker/heka/Dockerfile.j2 index b2c326bbe5..0162b57262 100644 --- a/docker/heka/Dockerfile.j2 +++ b/docker/heka/Dockerfile.j2 @@ -1,22 +1,23 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} MAINTAINER {{ maintainer }} -{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} +{% import "macros.j2" as macros with context %} -RUN yum -y install \ - https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka-0_10_0-linux-amd64.rpm \ - && yum clean all \ - && useradd --user-group heka \ +{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + {% set heka_packages = [ + 'https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka-0_10_0-linux-amd64.rpm' + ] %} +RUN useradd --user-group heka \ && mkdir /etc/heka {% elif base_distro in ['ubuntu', 'debian'] %} - -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 \ - && dpkg -i heka_0.10.0_amd64.deb \ - && rm -f heka_0.10.0_amd64.deb - + {% set heka_packages = [ + 'https://github.com/mozilla-services/heka/releases/download/v0.10.0/heka_0.10.0_amd64.deb' + ] %} {% endif %} +RUN {{ macros.install_packages(heka_packages | customizable("packages")) }} + COPY plugins/modules /usr/share/heka/lua_modules/ COPY plugins/decoders /usr/share/heka/lua_decoders/ 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 \ && chown -R heka: /usr/share/heka /etc/heka +{% block heka_footer %}{% endblock %} +{% block footer %}{% endblock %} {{ include_footer }} USER heka