-
Notifications
You must be signed in to change notification settings - Fork 1.8k
packaging: add support for Opensuse Leap 15.6 and SLES 15.7 #10978
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
Open
illescad
wants to merge
9
commits into
fluent:master
Choose a base branch
from
illescad:illescad-sles-packaging
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+400
−1
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
da4bd35
packaging: attempt for Opensuse v15.6 and SLES v15.7. opensuse build …
illescad 1116ddf
packaging: add SLES and Opensuse Support
illescad d5ac934
packaging: Adding test-packages to support zypper and install.sh to s…
illescad 1504726
packaging: fix base_url for suse repository
illescad 3389284
packaging: fix coderabbit suggestions for zypper multiline commands …
illescad b8d8fb5
packaging: include update-zypper-repo.sh
illescad 04fd8bc
packaging: fix the need of multiple Dockerfiles for opensuse, clean s…
illescad dad5968
packaging: coderabbit fixes
illescad 9fc3e11
packaging: The variable is a built-in feature of libzypp when
illescad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
|
||
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/" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
# hadolint ignore=DL3037,DL3033 | ||
RUN zypper up -y && \ | ||
Check warning on line 12 in packaging/distros/sles/Dockerfile
|
||
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/" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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? :)