Skip to content

Commit

Permalink
Adding SASL_SSL dependencies for the rdkafka plugin
Browse files Browse the repository at this point in the history
Signed-off-by: nauman.rana1 <[email protected]>
  • Loading branch information
nauman.rana1 committed Jan 15, 2020
1 parent dfc6792 commit 24456da
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
40 changes: 24 additions & 16 deletions templates/Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,30 @@ ENV GEM_HOME /fluentd/vendor/bundle/ruby/2.6.0
ENV FLUENTD_DISABLE_BUNDLER_INJECTION 1

COPY Gemfile* /fluentd/
RUN buildDeps="sudo make gcc g++ libc-dev libffi-dev<% if target == "graylog" %> build-essential patch zlib1g-dev liblzma-dev<% elsif target == "kafka" %> build-essential autoconf automake libtool pkg-config<% end %><% if requires_git %> git<% end %>" \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install \
-y --no-install-recommends \
$buildDeps net-tools \
&& gem install bundler --version 1.16.2 \
&& bundle config silence_root_warning true \
&& bundle install --gemfile=/fluentd/Gemfile --path=/fluentd/vendor/bundle \
&& SUDO_FORCE_REMOVE=yes \
apt-get purge -y --auto-remove \
-o APT::AutoRemove::RecommendsImportant=false \
$buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& gem sources --clear-all \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem

RUN buildDeps="sudo make gcc g++ libc-dev libffi-dev<% if target == "graylog" %> build-essential patch zlib1g-dev liblzma-dev \
<% elsif target == "kafka" %> build-essential autoconf automake libtool pkg-config python <% end %><% if requires_git %> git<% end %>" \
runtimeDeps="<% if target == "kafka" %>krb5-kdc libsasl2-modules-gssapi-mit libsasl2-dev <% end %> " \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install \
-y --no-install-recommends \
$buildDeps $runtimeDeps net-tools \
&& gem install bundler --version 1.16.2 \
&& bundle config silence_root_warning true \
&& bundle install --gemfile=/fluentd/Gemfile --path=/fluentd/vendor/bundle \
&& SUDO_FORCE_REMOVE=yes \
apt-get purge -y --auto-remove \
-o APT::AutoRemove::RecommendsImportant=false \
$buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& gem sources --clear-all \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem \
<% if target == "kafka" %> \
&& ldconfig -p | grep -q "libsasl2.so$" \
&& ldconfig -p | grep -q "libsasl2.so.2" \
<% end %>

# Copy configuration files
COPY ./conf/fluent.conf /fluentd/etc/
Expand Down
3 changes: 2 additions & 1 deletion templates/Gemfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ gem "fluent-plugin-remote_syslog"
gem "fluent-plugin-kubernetes_remote_syslog"
<% end %>
<% when "kafka" %>
gem "fluent-plugin-kafka", "~> 0.7.9"
gem "rdkafka", "~> 0.7.0"
gem "fluent-plugin-kafka", "~> 0.12.2"
gem "snappy", "~> 0.0.15"
<% when "kinesis" %>
<% if is_v1 %>
Expand Down

0 comments on commit 24456da

Please sign in to comment.