Skip to content

Commit

Permalink
Upgrade fluent-bit version to 3.1.9 (#168)
Browse files Browse the repository at this point in the history
* Upgarde fluent-bit version to 3.1.9

* update version

* Upgrade fluent bit version to 3.1.5 testing

* install openssl with vcpkg

* change fluent bit version back to 3.1.9

* resolve syntax error

* syntax issue

* install openssl using vcpkg

* install openssl using vcpkg

* add vcpkg github address

* add vcpkg github address

* update cmake command

* revert back changes

* revert back the changes

* upgrade fluent bit version for dockerfile.windows

* Add vcpkg

* resolve syntax error
  • Loading branch information
gunnalahema authored Oct 31, 2024
1 parent 747dc5c commit 176ba0f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
RUN echo "Building for ${TARGETPLATFORM} architecture"
RUN make ${TARGETPLATFORM}

FROM fluent/fluent-bit:3.1.2
FROM fluent/fluent-bit:3.1.9

COPY --from=builder /go/src/github.com/newrelic/newrelic-fluent-bit-output/out_newrelic-linux-*.so /fluent-bit/bin/out_newrelic.so
COPY *.conf /fluent-bit/etc/
Expand Down
32 changes: 25 additions & 7 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# escape=`

ARG FLUENTBIT_VERSION=3.1.2
ARG FLUENTBIT_VERSION=3.1.9
ARG WINDOWS_VERSION=ltsc2019

#################################################
Expand Down Expand Up @@ -100,7 +100,7 @@ RUN echo Cloned branch v%FLUENTBIT_VERSION%
# - At the very last step, we build and copy the New Relic plugin inside the resulting runtime image #
# -------------------------------------------------------------------------------------------------------------#

RUN setx /M PATH "%PATH%;C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\WinFlexBison"
RUN setx /M PATH "%PATH%;C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\WinFlexBison;C:\dev\vcpkg"

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
WORKDIR /local
Expand Down Expand Up @@ -133,17 +133,35 @@ RUN Start-Process /local/vc_redist.x64.exe -ArgumentList '/install', '/quiet', '
Copy-Item -Path /Windows/System32/vccorlib140.dll -Destination /fluent-bit/bin/; `
Copy-Item -Path /Windows/System32/vcruntime140.dll -Destination /fluent-bit/bin/;

ENV VCPKG_VERSION=2024.05.24
# https://github.com/microsoft/vcpkg/blob/2024.05.24/scripts/bootstrap.ps1
ENV VCPKG_ROOT=/dev/vcpkg

WORKDIR /dev

RUN `
Invoke-WebRequest -OutFile /dev/vcpkg.zip https://github.com/microsoft/vcpkg/archive/refs/tags/${ENV:VCPKG_VERSION}.zip; `
Expand-Archive /dev/vcpkg.zip -Destination /dev; `
Remove-Item -Force /dev/vcpkg.zip; `
Rename-Item -Path /dev/vcpkg-${ENV:VCPKG_VERSION} -NewName vcpkg; `
/dev/vcpkg/bootstrap-vcpkg.bat;

RUN vcpkg install --recurse openssl --triplet x64-windows-static; `
vcpkg install --recurse libyaml --triplet x64-windows-static;



# Install Chocolatey and OpenSSL: https://github.com/StefanScherer/dockerfiles-windows/blob/main/openssl/Dockerfile
ENV chocolateyUseWindowsCompression false
RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); `
choco feature disable --name showDownloadProgress ; `
choco install -y openssl;

choco feature disable --name showDownloadProgress ;
# choco install -y openssl;
# Build Fluent Bit from source - context must be the root of the Git repo
WORKDIR /src/build
# COPY . /src/
COPY . /src/

RUN cmake -G "'Visual Studio 16 2019'" -DOPENSSL_ROOT_DIR='C:\Program Files\OpenSSL-Win64\lib\VC\x64\MT' -DOPENSSL_INCLUDE_DIR='C:\Program Files\OpenSSL-Win64\include' -DCMAKE_BUILD_TYPE=Release ../;`
RUN cmake -G "'Visual Studio 16 2019'" -DOPENSSL_ROOT_DIR='C:\dev\vcpkg\packages\openssl_x64-windows-static' -DFLB_LIBYAML_DIR='C:\dev\vcpkg\packages\libyaml_x64-windows-static' -DCMAKE_BUILD_TYPE=Release ../;`
cmake --build . --config Release;

# Set up config files and binaries in single /fluent-bit hierarchy for easy copy in later stage
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_debug
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
RUN echo "Building for ${TARGETPLATFORM} architecture"
RUN make ${TARGETPLATFORM}

FROM fluent/fluent-bit:3.1.2-debug
FROM fluent/fluent-bit:3.1.9-debug

COPY --from=builder /go/src/github.com/newrelic/newrelic-fluent-bit-output/out_newrelic-linux-*.so /fluent-bit/bin/out_newrelic.so
COPY *.conf /fluent-bit/etc/
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const VERSION = "2.0.2"
const VERSION = "2.1.0"

0 comments on commit 176ba0f

Please sign in to comment.