File tree Expand file tree Collapse file tree 3 files changed +55
-4
lines changed Expand file tree Collapse file tree 3 files changed +55
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ INSTALL_PACKAGE_NAME=${FLUENT_BIT_INSTALL_PACKAGE_NAME:-fluent-bit}
1414# Optional Apt/Yum additional parameters (e.g. releasever for AL2022/AL2023)
1515APT_PARAMETERS=${FLUENT_BIT_INSTALL_APT_PARAMETERS:- }
1616YUM_PARAMETERS=${FLUENT_BIT_INSTALL_YUM_PARAMETERS:- }
17+ ZYPPER_PARAMETERS=${FLUENT_BIT_INSTALL_ZYPPER_PARAMETERS:- }
1718
1819echo " ================================"
1920echo " Fluent Bit Installation Script "
4849# Set up version pinning
4950APT_VERSION=' '
5051YUM_VERSION=' '
52+ ZYPPER_VERSION=' '
5153if [ -n " ${RELEASE_VERSION} " ]; then
5254 APT_VERSION=" =$RELEASE_VERSION "
5355 YUM_VERSION=" -$RELEASE_VERSION "
56+ ZYPPER_VERSION=" -$RELEASE_VERSION "
5457fi
5558
5659# Now set up repos and install dependent on OS, version, etc.
143146cat /etc/apt/sources.list.d/fluent-bit.list
144147apt-get -y update
145148$INSTALL_CMD_PREFIX apt-get -y $APT_PARAMETERS install $INSTALL_PACKAGE_NAME$APT_VERSION
149+ SCRIPT
150+ ;;
151+ opensuse* |sles)
152+ SUSE_OS=" opensuse"
153+ case " ${OS} " in
154+ sles|suse) SUSE_OS=" sles" ;;
155+ esac
156+ SUSE_VER=" ${VERSION_ID:- } "
157+
158+ $SUDO sh << SCRIPT
159+ rpm --import $RELEASE_KEY
160+ cat << EOF > /etc/zypp/repos.d/fluent-bit.repo
161+ [fluent-bit]
162+ name = Fluent Bit
163+ baseurl = $RELEASE_URL /$SUSE_OS /$SUSE_VER
164+ gpgcheck=1
165+ repo_gpgcheck=1
166+ gpgkey=$RELEASE_KEY
167+ enabled=1
168+ EOF
169+ cat /etc/zypp/repos.d/fluent-bit.repo
170+ zypper --non-interactive refresh
171+ $INSTALL_CMD_PREFIX zypper --non-interactive $ZYPPER_PARAMETERS install $INSTALL_PACKAGE_NAME$ZYPPER_VERSION
146172SCRIPT
147173 ;;
148174 * )
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ The [`distros`](./distros/) directory contains OCI container definitions used to
3737| Debian | 11 | arm64v8 | debian/bullseye.arm64v8 |
3838| Debian | 10 | x86_64 | debian/buster |
3939| Debian | 10 | arm64v8 | debian/buster.arm64v8 |
40- | Opensuse | 15.6 | x86_64 | opensuse/15.6 |
41- | Opensuse | 15.6 | arm64v8 | opensuse/15.6.arm64v8 |
40+ | openSUSE | 15.6 | x86_64 | opensuse/15.6 |
41+ | openSUSE | 15.6 | arm64v8 | opensuse/15.6.arm64v8 |
4242| ** SLES** | 15.7 | x86_64 | sles/15.7 |
4343| ** SLES** | 15.7 | arm64v8 | sles/15.7.arm64v8 |
4444| Ubuntu | 24.04 / Noble Numbat | x86_64 | ubuntu/24.04 |
Original file line number Diff line number Diff line change @@ -58,10 +58,14 @@ YUM_TARGETS=(
5858 " quay.io/centos/centos:stream10"
5959 " amazonlinux:2"
6060 " amazonlinux:2023"
61- " opensuse/15.6"
62- " sles/15.7"
6361)
6462
63+ ZYPPER_TARGETS=(
64+ " opensuse/leap:15.6"
65+ " registry.suse.com/bci/bci-base:15.7"
66+ )
67+
68+
6569for IMAGE in " ${YUM_TARGETS[@]} "
6670do
6771 echo " Testing $IMAGE "
115119 check_version " $LOG_FILE "
116120 rm -f " $LOG_FILE "
117121done
122+
123+ # New loop for ZYPPER_TARGETS
124+ for IMAGE in " ${ZYPPER_TARGETS[@]} "
125+ do
126+ echo " Testing $IMAGE "
127+ LOG_FILE=$( mktemp)
128+ # We do want word splitting for EXTRA_MOUNTS
129+ # shellcheck disable=SC2086
130+ $CONTAINER_RUNTIME run --rm -t \
131+ -e FLUENT_BIT_PACKAGES_URL=" ${FLUENT_BIT_PACKAGES_URL:- https:// packages.fluentbit.io} " \
132+ -e FLUENT_BIT_PACKAGES_KEY=" ${FLUENT_BIT_PACKAGES_KEY:- https:// packages.fluentbit.io/ fluentbit.key} " \
133+ -e FLUENT_BIT_RELEASE_VERSION=" ${FLUENT_BIT_RELEASE_VERSION:- } " \
134+ -e FLUENT_BIT_INSTALL_COMMAND_PREFIX=" ${FLUENT_BIT_INSTALL_COMMAND_PREFIX:- } " \
135+ -e FLUENT_BIT_INSTALL_PACKAGE_NAME=" ${FLUENT_BIT_INSTALL_PACKAGE_NAME:- fluent-bit} " \
136+ -e FLUENT_BIT_INSTALL_ZYPPER_PARAMETERS=" ${FLUENT_BIT_INSTALL_ZYPPER_PARAMETERS:- } " \
137+ $EXTRA_MOUNTS \
138+ " $IMAGE " \
139+ sh -c " zypper --non-interactive refresh && zypper --non-interactive install gpg curl; $INSTALL_CMD && /opt/fluent-bit/bin/fluent-bit --version" | tee " $LOG_FILE "
140+ check_version " $LOG_FILE "
141+ rm -f " $LOG_FILE "
142+ done
You can’t perform that action at this time.
0 commit comments