Fluentd plugins rpm installation on CentOS

Currently, fluentd plugins are installed via gem install,
this may causes some issues when gems are updated upstream.

This patch uses the plugins packaged on CentOS opstools
repository.

The debian/ubuntu image has not been modified

Change-Id: Ib32ceaae0d9fa56c6ec25a47ae6f44259d3b6e6d
This commit is contained in:
Juan Badia Payno 2017-12-22 09:08:25 +01:00
parent d568df9bcc
commit ee127b9e76
1 changed files with 12 additions and 24 deletions

View File

@ -15,10 +15,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% set fluentd_packages = [
'fluentd',
'gcc-c++',
'hostname',
'make',
'ruby-devel'
'rubygem-fluent-plugin-elasticsearch',
'rubygem-fluent-plugin-grok-parser',
'rubygem-fluent-plugin-kubernetes_metadata_filter',
'rubygem-fluent-plugin-rewrite-tag-filter',
'rubygem-fluent-plugin-secure-forward'
] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
@ -53,30 +55,16 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block fluentd_plugins_install %}
{% set fluentd_plugins = [
'fluent-plugin-parser',
'fluent-plugin-kubernetes_metadata_filter',
'fluent-plugin-grep',
'fluent-plugin-secure-forward'
] %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
# NOTE: We use fluentd version is v12.0 so fluent-plugin-grok-parse version should be < 1.0.0.
# https://github.com/fluent/fluent-plugin-grok-parser
{% set fluentd_plugins = [
'activesupport:4.2.9',
'public_suffix:2.0.5',
'fluent-plugin-elasticsearch:1.10.2',
'fluent-plugin-grok-parser:0.3.1',
'fluent-plugin-rewrite-tag-filter:1.6.0'
] + fluentd_plugins %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% if base_distro in ['debian', 'ubuntu'] %}
{% set fluentd_plugins = [
'fluent-plugin-elasticsearch',
'fluent-plugin-grep',
'fluent-plugin-grok-parser:2.1.4',
'fluent-plugin-rewrite-tag-filter:2.0.0'
] + fluentd_plugins %}
'fluent-plugin-kubernetes_metadata_filter',
'fluent-plugin-parser',
'fluent-plugin-rewrite-tag-filter:2.0.0',
'fluent-plugin-secure-forward',
] %}
{% endif %}
{{ macros.install_fluent_plugins(fluentd_plugins | customizable("plugins")) }}