aboutsummaryrefslogtreecommitdiff
path: root/docker/macros.j2
diff options
context:
space:
mode:
authorMartin Mágr <mmagr@redhat.com>2017-10-17 13:52:44 +0200
committerMartin Mágr <mmagr@redhat.com>2017-11-24 15:14:32 +0100
commitdd4fe190d0b7a92c72565091c99baba5b4ec6f4f (patch)
tree4c31cd0226f5797b1947b82a75bc37f3e744886d /docker/macros.j2
parent27ab91b2abfc7e5e3906c335fe29698a6ca34527 (diff)
downloadkolla-dd4fe190d0b7a92c72565091c99baba5b4ec6f4f.tar.gz
kolla-dd4fe190d0b7a92c72565091c99baba5b4ec6f4f.zip
Clean fluentd_plugins_install block
fluentd_plugins_install should contain only plugin installation operations, so that the override does not have to handle irrelevant operations Change-Id: I8f810d194a1e638683df1f445c187b8d98629730
Diffstat (limited to 'docker/macros.j2')
-rw-r--r--docker/macros.j211
1 files changed, 11 insertions, 0 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2
index 5294ddacf..dfb85447b 100644
--- a/docker/macros.j2
+++ b/docker/macros.j2
@@ -80,3 +80,14 @@ RUN apt-get update \
RUN curl -o /usr/bin/kubectl http://storage.googleapis.com/kubernetes-release/release/v1.5.4/bin/linux/${KUBE_ARCH}/kubectl \
&& chmod 755 /usr/bin/kubectl
{% endmacro %}
+
+
+{% macro install_fluent_plugins(plugins) -%}
+{% if plugins is defined and plugins|length > 0 -%}
+ {% if base_distro in ['centos', 'oraclelinux', 'rhel'] -%}
+ RUN ulimit -n 65536 && gem install --minimal-deps {{ plugins | join(' ') }}
+ {%- elif base_distro in ['debian', 'ubuntu'] -%}
+ RUN ulimit -n 65536 && td-agent-gem install {{ plugins | join(' ') }}
+ {%- endif %}
+{%- endif %}
+{%- endmacro %}