Skip to content
Open
41 changes: 41 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ INSTALL_PACKAGE_NAME=${FLUENT_BIT_INSTALL_PACKAGE_NAME:-fluent-bit}
# Optional Apt/Yum additional parameters (e.g. releasever for AL2022/AL2023)
APT_PARAMETERS=${FLUENT_BIT_INSTALL_APT_PARAMETERS:-}
YUM_PARAMETERS=${FLUENT_BIT_INSTALL_YUM_PARAMETERS:-}
ZYPPER_PARAMETERS=${FLUENT_BIT_INSTALL_ZYPPER_PARAMETERS:-}

echo "================================"
echo " Fluent Bit Installation Script "
Expand Down Expand Up @@ -48,9 +49,11 @@ fi
# Set up version pinning
APT_VERSION=''
YUM_VERSION=''
ZYPPER_VERSION=''
if [ -n "${RELEASE_VERSION}" ]; then
APT_VERSION="=$RELEASE_VERSION"
YUM_VERSION="-$RELEASE_VERSION"
ZYPPER_VERSION="=$RELEASE_VERSION"
fi

# Now set up repos and install dependent on OS, version, etc.
Expand Down Expand Up @@ -143,6 +146,44 @@ EOF
cat /etc/apt/sources.list.d/fluent-bit.list
apt-get -y update
$INSTALL_CMD_PREFIX apt-get -y $APT_PARAMETERS install $INSTALL_PACKAGE_NAME$APT_VERSION
SCRIPT
;;
opensuse-leap)
$SUDO sh <<SCRIPT
rpm --import $RELEASE_KEY
cat << EOF > /etc/zypp/repos.d/fluent-bit.repo
[fluent-bit]
name = Fluent Bit
baseurl = $RELEASE_URL/opensuse/leap/\$releaserver
gpgcheck=1
repo_gpgcheck=1
gpgkey=$RELEASE_KEY
enabled=1
type=rpm-md
autorefresh=1
EOF
cat /etc/zypp/repos.d/fluent-bit.repo
zypper --non-interactive --gpg-auto-import-keys refresh
$INSTALL_CMD_PREFIX zypper --non-interactive --gpg-auto-import-keys $ZYPPER_PARAMETERS install $INSTALL_PACKAGE_NAME$ZYPPER_VERSION
SCRIPT
;;
sles)
$SUDO sh <<SCRIPT
rpm --import $RELEASE_KEY
cat << EOF > /etc/zypp/repos.d/fluent-bit.repo
[fluent-bit]
name = Fluent Bit
baseurl = $RELEASE_URL/sles/\$releasever
gpgcheck=1
repo_gpgcheck=1
gpgkey=$RELEASE_KEY
enabled=1
type=rpm-md
autorefresh=1
EOF
cat /etc/zypp/repos.d/fluent-bit.repo
zypper --non-interactive --gpg-auto-import-keys refresh
$INSTALL_CMD_PREFIX zypper --non-interactive --gpg-auto-import-keys $ZYPPER_PARAMETERS install $INSTALL_PACKAGE_NAME$ZYPPER_VERSION
SCRIPT
;;
*)
Expand Down
4 changes: 4 additions & 0 deletions packaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ The [`distros`](./distros/) directory contains OCI container definitions used to
| Debian | 11 | arm64v8 | debian/bullseye.arm64v8 |
| Debian | 10 | x86_64 | debian/buster |
| Debian | 10 | arm64v8 | debian/buster.arm64v8 |
| openSUSE | 15.6 | x86_64 | opensuse/15.6 |
| openSUSE | 15.6 | arm64v8 | opensuse/15.6.arm64v8 |
| SLES | 15.7 | x86_64 | sles/15.7 |
| SLES | 15.7 | arm64v8 | sles/15.7.arm64v8 |
| Ubuntu | 24.04 / Noble Numbat | x86_64 | ubuntu/24.04 |
| Ubuntu | 24.04 / Noble Numbat | arm64v8 | ubuntu/24.04.arm64v8 |
| Ubuntu | 22.04 / Jammy Jellyfish | x86_64 | ubuntu/22.04 |
Expand Down
16 changes: 16 additions & 0 deletions packaging/build-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@
"target": "almalinux/10.arm64v8",
"type": "rpm"
},
{
"target": "opensuse/15.6",
"type": "rpm"
},
{
"target": "opensuse/15.6.arm64v8",
"type": "rpm"
},
{
"target": "sles/15.7",
"type": "rpm"
},
{
"target": "sles/15.7.arm64v8",
"type": "rpm"
},
{
"target": "debian/bookworm",
"type": "deb"
Expand Down
125 changes: 125 additions & 0 deletions packaging/distros/opensuse/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Dockerfile to build latest opensuse leap
# Set this to the base image to use in each case, so if we want to build for opensuse/leap
# we would set BASE_BUILDER=opensuse-leap-base.
ARG BASE_BUILDER
# Lookup the name to use below but should follow the '<distro>-base' convention with slashes replaced.
# Use buildkit to skip unused base images: DOCKER_BUILDKIT=1

# Multiarch support
FROM multiarch/qemu-user-static:x86_64-aarch64 AS multiarch-aarch64

# opensuse/leap base image
# hadolint ignore=DL3006
FROM opensuse/leap AS opensuse-leap-base

# hadolint ignore=DL3037,DL3033
RUN zypper up -y && \
zypper install -y --no-recommends \
rpm-build \
curl ca-certificates wget unzip flex bison \
gcc gcc-c++ \
cmake-full \
make \
bash \
systemd-devel \
postgresql postgresql-devel postgresql-server \
cyrus-sasl cyrus-sasl-devel \
libopenssl3 libopenssl-devel \
libyaml-devel && \
zypper clean -a && rm -rf /var/cache/zypp/*

# opensuse/leap base image
FROM opensuse/leap:15.6 AS opensuse-15.6-base

# hadolint ignore=DL3037,DL3033
RUN zypper up -y && \
zypper install -y --no-recommends \
rpm-build \
curl ca-certificates wget unzip flex bison \
gcc gcc-c++ \
cmake-full \
make \
bash \
systemd-devel \
postgresql postgresql-devel postgresql-server \
cyrus-sasl cyrus-sasl-devel \
libopenssl3 libopenssl-devel \
libyaml-devel && \
zypper clean -a && rm -rf /var/cache/zypp/*

# opensuse/leap.arm64v8 base image
# hadolint ignore=DL3037,DL3029
FROM --platform=arm64 opensuse/leap:15.6 AS opensuse-15.6.arm64v8-base

COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static

# hadolint ignore=DL3033
RUN zypper up -y && \

Check warning on line 57 in packaging/distros/opensuse/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Hadolint

[hadolint] reported by reviewdog 🐶 Specify version with `zypper install -y <package>=<version>`. Raw Output: message:"Specify version with `zypper install -y <package>=<version>`." location:{path:"packaging/distros/opensuse/Dockerfile" range:{start:{line:57 column:1}}} severity:WARNING source:{name:"hadolint" url:"https://github.com/hadolint/hadolint"} code:{value:"DL3037" url:"https://github.com/hadolint/hadolint/wiki/DL3037"}
zypper install -y --no-recommends \
rpm-build \
curl ca-certificates wget unzip flex bison \
gcc gcc-c++ \
cmake-full \
make \
bash \
systemd-devel \
postgresql postgresql-devel postgresql-server \
cyrus-sasl cyrus-sasl-devel \
libopenssl3 libopenssl-devel \
libyaml-devel && \
zypper clean -a && rm -rf /var/cache/zypp/*

# Need larger page size
ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3"
ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS

# Common build for all distributions now
# hadolint ignore=DL3006
FROM $BASE_BUILDER AS builder
#

ARG FLB_NIGHTLY_BUILD
ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD

# Docker context must be the base of the repo
WORKDIR /source/fluent-bit/
COPY . ./

WORKDIR /source/fluent-bit/build/
# CMake configuration variables
# Unused
ARG CFLAGS
ARG CMAKE_INSTALL_PREFIX=/opt/fluent-bit/
ARG CMAKE_INSTALL_SYSCONFDIR=/etc/
ARG FLB_SIMD=On
ARG FLB_RELEASE=On
ARG FLB_TRACE=On
ARG FLB_SQLDB=On
ARG FLB_HTTP_SERVER=On
ARG FLB_OUT_KAFKA=On
ARG FLB_JEMALLOC=On
ARG FLB_CHUNK_TRACE=On
ARG FLB_UNICODE_ENCODER=On
ARG FLB_KAFKA=On
ARG FLB_OUT_PGSQL=On
ARG SYSTEMD_UNITDIR=/usr/lib/systemd/system

RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \
-DFLB_SIMD="$FLB_SIMD" \
-DFLB_RELEASE="$FLB_RELEASE" \
-DFLB_TRACE="$FLB_TRACE" \
-DFLB_SQLDB="$FLB_SQLDB" \
-DFLB_HTTP_SERVER="$FLB_HTTP_SERVER" \
-DFLB_KAFKA="$FLB_KAFKA" \
-DFLB_OUT_PGSQL="$FLB_OUT_PGSQL" \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
-DFLB_UNICODE_ENCODER="${FLB_UNICODE_ENCODER}" \
-DSYSTEMD_UNITDIR="$SYSTEMD_UNITDIR" \
../

VOLUME [ "/output" ]
CMD [ "/bin/bash", "-c", "make --no-print-directory -j 4 && cpack -G RPM && cp *.rpm /output/" ]
90 changes: 90 additions & 0 deletions packaging/distros/sles/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
ARG BASE_BUILDER
# Lookup the name to use below but should follow the '<distro>-base' convention with slashes replaced.
# Use buildkit to skip unused base images: DOCKER_BUILDKIT=1

# Multiarch support
FROM multiarch/qemu-user-static:x86_64-aarch64 AS multiarch-aarch64

# sles base image
FROM registry.suse.com/bci/bci-base:15.7 AS sles-15.7-base
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the main deltas between opensuse and sles? Just want to make sure we capture which one people should use for their targets.

Copy link
Author

@illescad illescad Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah i think I caused some confusion, I need to update that comment to say its the SLES base container image not # opensuse/leap base image. But its just building from SLES image vs the community os opensuse, and people would want to target the os they are building for.
@jhansonhpe do you have a better explanation for main deltas?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we add the docs page we should be clear on any differences because if it's not important why do we care? :)


# hadolint ignore=DL3037,DL3033
RUN zypper up -y && \

Check warning on line 12 in packaging/distros/sles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Hadolint

[hadolint] reported by reviewdog 🐶 In POSIX sh, brace expansion is undefined. Raw Output: message:"In POSIX sh, brace expansion is undefined." location:{path:"packaging/distros/sles/Dockerfile" range:{start:{line:12 column:1}}} severity:WARNING source:{name:"hadolint" url:"https://github.com/hadolint/hadolint"} code:{value:"SC3009" url:"https://github.com/koalaman/shellcheck/wiki/SC3009"}
zypper install -y --no-recommends \
rpm-build curl ca-certificates gcc gcc-c++ cmake-full make bash \
wget unzip systemd-devel flex bison \
postgresql-server postgresql-devel cyrus-sasl-devel \
libopenssl-devel libyaml-devel && \
rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} && \
rm -rf /var/log/lastlog /var/log/tallylog /var/log/zypper.log /var/log/zypp/history /var/log/YaST2 && \
zypper clean -a

# sles base image is the same name for all architectures
# hadolint ignore=DL3029
FROM --platform=arm64 registry.suse.com/bci/bci-base:15.7 AS sles-15.7.arm64v8-base

COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static

# hadolint ignore=DL3037,DL3033
RUN zypper up -y && \
zypper install -y --no-recommends \
rpm-build curl ca-certificates gcc gcc-c++ cmake-full make bash \
wget unzip systemd-devel flex bison \
postgresql-server postgresql-devel cyrus-sasl-devel \
libopenssl-devel libyaml-devel && \
rm -rf /var/log/lastlog /var/log/tallylog /var/log/zypper.log /var/log/zypp/history /var/log/YaST2 && \
zypper clean -a

# Need larger page size
ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3"
ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS

# Common build for all distributions now
# hadolint ignore=DL3006
FROM $BASE_BUILDER AS builder

ARG FLB_NIGHTLY_BUILD
ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD

# Docker context must be the base of the repo
WORKDIR /source/fluent-bit/
COPY . ./

WORKDIR /source/fluent-bit/build/
# CMake configuration variables
# Unused
ARG CFLAGS
ARG CMAKE_INSTALL_PREFIX=/opt/fluent-bit/
ARG CMAKE_INSTALL_SYSCONFDIR=/etc/
ARG FLB_SIMD=On
ARG FLB_RELEASE=On
ARG FLB_TRACE=On
ARG FLB_SQLDB=On
ARG FLB_HTTP_SERVER=On
ARG FLB_OUT_KAFKA=On
ARG FLB_JEMALLOC=On
ARG FLB_CHUNK_TRACE=On
ARG FLB_UNICODE_ENCODER=On
ARG FLB_KAFKA=On
ARG FLB_OUT_PGSQL=On
ARG SYSTEMD_UNITDIR=/usr/lib/systemd/system

RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \
-DFLB_SIMD="$FLB_SIMD" \
-DFLB_RELEASE="$FLB_RELEASE" \
-DFLB_TRACE="$FLB_TRACE" \
-DFLB_SQLDB="$FLB_SQLDB" \
-DFLB_HTTP_SERVER="$FLB_HTTP_SERVER" \
-DFLB_KAFKA="$FLB_KAFKA" \
-DFLB_OUT_PGSQL="$FLB_OUT_PGSQL" \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
-DFLB_UNICODE_ENCODER="${FLB_UNICODE_ENCODER}" \
-DSYSTEMD_UNITDIR="$SYSTEMD_UNITDIR" \
../

VOLUME [ "/output" ]
CMD [ "/bin/bash", "-c", "make --no-print-directory -j 4 && cpack -G RPM && cp *.rpm /output/" ]
29 changes: 29 additions & 0 deletions packaging/test-release-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ YUM_TARGETS=(
"amazonlinux:2023"
)

ZYPPER_TARGETS=(
"opensuse/leap:15.6"
"registry.suse.com/bci/bci-base:15.7"
)


for IMAGE in "${YUM_TARGETS[@]}"
do
echo "Testing $IMAGE"
Expand Down Expand Up @@ -113,3 +119,26 @@ do
check_version "$LOG_FILE"
rm -f "$LOG_FILE"
done

# New loop for ZYPPER_TARGETS
for IMAGE in "${ZYPPER_TARGETS[@]}"
do
echo "Testing $IMAGE"
LOG_FILE=$(mktemp)
# We do want word splitting for EXTRA_MOUNTS
# shellcheck disable=SC2086
$CONTAINER_RUNTIME run --rm -t \
-e FLUENT_BIT_PACKAGES_URL="${FLUENT_BIT_PACKAGES_URL:-https://packages.fluentbit.io}" \
-e FLUENT_BIT_PACKAGES_KEY="${FLUENT_BIT_PACKAGES_KEY:-https://packages.fluentbit.io/fluentbit.key}" \
-e FLUENT_BIT_RELEASE_VERSION="${FLUENT_BIT_RELEASE_VERSION:-}" \
-e FLUENT_BIT_INSTALL_COMMAND_PREFIX="${FLUENT_BIT_INSTALL_COMMAND_PREFIX:-}" \
-e FLUENT_BIT_INSTALL_PACKAGE_NAME="${FLUENT_BIT_INSTALL_PACKAGE_NAME:-fluent-bit}" \
-e FLUENT_BIT_INSTALL_ZYPPER_PARAMETERS="${FLUENT_BIT_INSTALL_ZYPPER_PARAMETERS:-}" \
$EXTRA_MOUNTS \
"$IMAGE" \
sh -c "zypper --non-interactive --gpg-auto-import-keys refresh && \
zypper --non-interactive --gpg-auto-import-keys install gpg curl; && \
$INSTALL_CMD /opt/fluent-bit/bin/fluent-bit --version" | tee "$LOG_FILE"
check_version "$LOG_FILE"
rm -f "$LOG_FILE"
done
11 changes: 10 additions & 1 deletion packaging/update-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ RPM_REPO_PATHS=( "amazonlinux/2"
"almalinux/8"
"almalinux/9"
"almalinux/10"
"opensuse/leap/15.6"
"sles/15.7"
)

if [[ "${AWS_SYNC:-false}" != "false" ]]; then
Expand All @@ -56,7 +58,14 @@ for RPM_REPO in "${RPM_REPO_PATHS[@]}"; do
aws s3 sync s3://"${AWS_S3_BUCKET_STAGING:?}/$RPM_REPO" "${BASE_PATH:?}/$RPM_REPO"
fi

/bin/bash -eux "$SCRIPT_DIR/update-yum-repo.sh"
case "$RPM_REPO" in
"opensuse/"* | "sles/"*)
/bin/bash -eux "$SCRIPT_DIR/update-zypper-repo.sh"
;;
*)
/bin/bash -eux "$SCRIPT_DIR/update-yum-repo.sh"
;;
esac
done

DEB_REPO_PATHS=( "debian/bookworm"
Expand Down
Loading
Loading