Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dependencies for fluentd 1.15 #338

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 15 additions & 21 deletions base-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2018 VMware, Inc. All Rights Reserved.
# Copyright © 2022 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause
# Similar to https://github.com/drecom/docker-centos-ruby/blob/2.6.5-slim/Dockerfile

Expand Down Expand Up @@ -57,14 +57,10 @@ RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import \
&& rvm requirements \
&& rvm install --disable-binary $RUBY_VERSION --default \
&& gem update --system --no-document \
&& gem install bundler -v '>= 2.3.4' --default --no-document \
&& gem install cgi -v '>= 0.1.1' --default --no-document \
&& gem install rexml -v '>= 3.2.5' --default --no-document \
&& gem install json -v '>= 2.6.1' --default --no-document \
&& gem install webrick -v '>= 1.7.0' --default --no-document \
&& gem install bundler -v '>= 2.3.22' --default --no-document \
&& bundler install \
&& gem uninstall bundler \
&& gem uninstall rake -v 13.0.6 \
&& gem uninstall bigdecimal \
&& rm -rf $RUBY_PATH/lib/ruby/gems/2.7.0/specifications/default/rexml-3.2.3.1.gemspec \
&& rm -rf $RUBY_PATH/lib/ruby/gems/2.7.0/specifications/default/rdoc-6.2.1.1.gemspec \
&& rm -rf $RUBY_PATH/lib/ruby/gems/2.7.0/specifications/default/json-2.3.0.gemspec \
Expand All @@ -81,18 +77,16 @@ COPY --from=rubybuild $RUBY_PATH $RUBY_PATH
# Not sure why this is needed: see https://github.com/fluent/fluentd-kubernetes-daemonset/blob/master/docker-image/v1.13/debian-elasticsearch7/Dockerfile
# skip runtime bundler installation
ENV FLUENTD_DISABLE_BUNDLER_INJECTION 1
# start with a valid empty file
COPY failsafe.conf /fluentd/failsafe.conf
# custom entrypoint
COPY entrypoint.sh /fluentd/entrypoint.sh

COPY failsafe.conf entrypoint.sh Gemfile Gemfile.lock /fluentd/

USER root

ENTRYPOINT ["/fluentd/entrypoint.sh"]
# Pin all fluentd plugin gem versions with Gemfile.lock here:
COPY Gemfile /fluentd/Gemfile
COPY Gemfile.lock /fluentd/Gemfile.lock

RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \
&& tdnf clean all \
&& tdnf upgrade -y \
&& tdnf erase -y toybox \
&& buildDeps="\
gmp-devel \
Expand All @@ -116,8 +110,8 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \
gdbm-devel \
openssl-devel" \
&& tdnf install -y $buildDeps util-linux systemd net-tools findutils \
&& wget https://raw.githubusercontent.com/fluent/fluentd-kubernetes-daemonset/master/docker-image/v1.13/debian-elasticsearch7/plugins/parser_kubernetes.rb -P /fluentd/plugins \
&& wget https://raw.githubusercontent.com/fluent/fluentd-kubernetes-daemonset/master/docker-image/v1.13/debian-elasticsearch7/plugins/parser_multiline_kubernetes.rb -P /fluentd/plugins \
&& wget https://raw.githubusercontent.com/fluent/fluentd-kubernetes-daemonset/master/docker-image/v1.15/debian-elasticsearch7/plugins/parser_kubernetes.rb -P /fluentd/plugins \
&& wget https://raw.githubusercontent.com/fluent/fluentd-kubernetes-daemonset/master/docker-image/v1.15/debian-elasticsearch7/plugins/parser_multiline_kubernetes.rb -P /fluentd/plugins \
&& echo 'gem: --no-document' >> /etc/gemrc \
&& bundle config silence_root_warning true \
&& cd /fluentd \
Expand All @@ -129,7 +123,7 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \
&& gem install fluent-plugin-detect-exceptions-*.gem \
&& rm -rf /fluentd/fluent-plugin-detect-exceptions \
&& cd /fluentd \
&& git clone https://github.com/Cryptophobia/fluent-plugin-google-cloud.git fluent-plugin-google-cloud \
&& git clone https://github.com/slimm609/fluent-plugin-google-cloud.git fluent-plugin-google-cloud \
&& cd fluent-plugin-google-cloud \
&& gem build fluent-plugin-google-cloud.gemspec \
&& gem install fluent-plugin-google-cloud-*.gem \
Expand All @@ -145,19 +139,19 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \
&& cd /tmp/jemalloc-3.6.0 \
&& ./configure && make \
&& mv -v lib/libjemalloc.so* /usr/lib \
&& rm -rf /tmp/jemalloc-3.6.0 \
&& rm -rf /tmp/jemalloc-3.6.0 /tmp/jemalloc-3.6.0.tar.bz2 \
&& cd /fluentd \
&& tdnf clean all \
&& gem sources --clear-all \
&& ln -s $(which fluentd) /usr/local/bundle/bin/fluentd \
&& tdnf remove -y $buildDeps \
&& tdnf clean all \
&& gem uninstall google-protobuf --version 3.17.3 --force && gem cleanup \
&& gem uninstall google-protobuf --version 3.17.3 --force \
&& gem uninstall bundler \
&& gem cleanup \
&& rm -rf $RUBY_PATH/lib/ruby/gems/2.7.0/cache $RUBY_PATH/lib/ruby/gems/2.7.0/doc/ /usr/share/doc /root/.bundle/cache

# Make sure fluentd picks jemalloc 3.6.0 lib as default
ENV LD_PRELOAD="/usr/lib/libjemalloc.so"
ENV RUBYLIB="/usr/local/lib/ruby/gems/2.7.0/gems/resolv-0.2.1/lib"

EXPOSE 24444 5140
COPY plugins /fluentd/plugins
19 changes: 7 additions & 12 deletions base-image/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,20 @@ gem 'oj', '3.13.10'
gem 'ffi'
gem 'fluent-plugin-amqp', "0.14.0"
gem 'fluent-plugin-azure-loganalytics', "0.7.0"
gem 'fluent-plugin-cloudwatch-logs', "0.14.2"
gem 'fluent-plugin-cloudwatch-logs', "0.14.3"
gem 'fluent-plugin-concat', "2.5.0"
gem 'fluent-plugin-datadog', "0.14.2"
#This gem has been forked because maintainers take too long to support v1 fluentd plugin API:
#gem 'fluent-plugin-detect-exceptions', "0.0.14", :git => "https://github.com/Cryptophobia/fluent-plugin-detect-exceptions.git"
gem 'fluent-plugin-elasticsearch', "5.2.2"
gem 'fluent-plugin-elasticsearch', "5.2.3"
gem 'fluent-plugin-gelf-hs', "1.0.8"
#gem 'fluent-plugin-google-cloud', :git => "https://github.com/Cryptophobia/fluent-plugin-google-cloud.git"
gem 'fluent-plugin-grafana-loki', "1.2.16"
gem 'fluent-plugin-grafana-loki', "1.2.18"
gem 'fluent-plugin-grok-parser', "2.6.2"
gem 'fluent-plugin-json-in-json-2', "1.0.2"
gem 'fluent-plugin-kafka', "0.17.3"
gem 'fluent-plugin-kafka', "0.18.1"
gem 'fluent-plugin-kinesis', "3.4.2"
gem 'fluent-plugin-kubernetes_metadata_filter', "2.13.0"
gem 'fluent-plugin-kubernetes_sumologic', "2.4.2"
gem 'fluent-plugin-kubernetes', "0.3.1"
gem 'fluent-plugin-logentries', "0.2.10"
#DEPRECATION: If the fix does not work, time for this gem to be deprecated:
#gem 'fluent-plugin-loggly', '0.1.0.pre', :git => "https://github.com/Cryptophobia/fluent-plugin-loggly.git"
gem 'fluent-plugin-logzio', "0.0.22"
gem 'fluent-plugin-mail', "0.3.0"
gem 'fluent-plugin-mongo', "1.5.0"
Expand All @@ -39,14 +34,14 @@ gem 'fluent-plugin-redis', "0.3.5"
gem 'fluent-plugin-remote_syslog', "1.0.0"
gem 'fluent-plugin-rewrite-tag-filter', "2.4.0"
gem 'fluent-plugin-route', "1.0.0"
gem 'fluent-plugin-s3', "1.6.1"
gem 'fluent-plugin-splunk-hec', "1.2.13"
gem 'fluent-plugin-s3', "1.7.1"
gem 'fluent-plugin-splunk-hec', "1.3.0"
gem 'fluent-plugin-splunkhec', "2.2"
gem 'fluent-plugin-sumologic_output', "1.7.3"
gem 'fluent-plugin-systemd', "1.0.5"
gem 'fluent-plugin-uri-parser', "0.3.0"
gem 'fluent-plugin-verticajson', "0.0.6"
gem 'fluent-plugin-vmware-loginsight', "1.0.0"
gem 'fluent-plugin-vmware-loginsight', "1.3.0"
gem 'fluent-plugin-vmware-log-intelligence', "2.0.6"
# fluent-plugin-mysqlslowquery is dependency for fluent-plugin-vmware-log-intelligence
gem 'fluent-plugin-mysqlslowquery', "0.0.9"
Expand Down
Loading