Skip to content

Commit 4ab900b

Browse files
authored
Merge branch 'main' into feat/airflow-3-opa
2 parents c8fa8ca + 3c39e31 commit 4ab900b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+201
-1245
lines changed

.scripts/upload_new_kcat_version.sh

Lines changed: 0 additions & 45 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ All notable changes to this project will be documented in this file.
4646
- omid: bump version to 1.1.3 ([#1105])
4747
- hbase: add 2.6.2 and upgrade dependencies ([#1101])
4848
- kafka: Add `4.0.0` ([#1117])
49+
- Include `.tar.gz` snapshots of the product source code in container images ([#1126])
4950

5051
### Changed
5152

@@ -145,6 +146,7 @@ All notable changes to this project will be documented in this file.
145146
[#1122]: https://github.com/stackabletech/docker-images/pull/1122
146147
[#1124]: https://github.com/stackabletech/docker-images/pull/1124
147148
[#1125]: https://github.com/stackabletech/docker-images/pull/1125
149+
[#1126]: https://github.com/stackabletech/docker-images/pull/1126
148150
[#1128]: https://github.com/stackabletech/docker-images/pull/1128
149151

150152
## [25.3.0] - 2025-03-21

druid/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ RUN --mount=type=cache,id=maven-${PRODUCT},uid=${STACKABLE_USER_UID},target=/sta
5454
cd "$(cat /tmp/DRUID_SOURCE_DIR)" || exit 1
5555
rm /tmp/DRUID_SOURCE_DIR
5656

57+
# Create snapshot of the source code including custom patches
58+
tar -czf /stackable/druid-${PRODUCT}-src.tar.gz .
59+
5760
mvn \
5861
--batch-mode \
5962
--no-transfer-progress \
@@ -120,6 +123,7 @@ LABEL io.k8s.display-name="${NAME}"
120123

121124

122125
COPY --chown=${STACKABLE_USER_UID}:0 --from=druid-builder /stackable/apache-druid-${PRODUCT} /stackable/apache-druid-${PRODUCT}
126+
COPY --chown=${STACKABLE_USER_UID}:0 --from=druid-builder /stackable/druid-${PRODUCT}-src.tar.gz /stackable
123127

124128
COPY --chown=${STACKABLE_USER_UID}:0 druid/stackable/bin /stackable/bin
125129
COPY --chown=${STACKABLE_USER_UID}:0 druid/licenses /licenses

druid/upload_new_druid_version.sh

Lines changed: 0 additions & 73 deletions
This file was deleted.

hadoop/Dockerfile

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,40 @@ ARG TARGETARCH
1111
ARG TARGETOS
1212
ARG STACKABLE_USER_UID
1313

14+
WORKDIR /stackable
15+
16+
COPY --chown=${STACKABLE_USER_UID}:0 shared/protobuf/stackable/patches/patchable.toml /stackable/src/shared/protobuf/stackable/patches/patchable.toml
17+
COPY --chown=${STACKABLE_USER_UID}:0 shared/protobuf/stackable/patches/${PROTOBUF} /stackable/src/shared/protobuf/stackable/patches/${PROTOBUF}
18+
19+
RUN <<EOF
20+
rpm --install --replacepkgs https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
21+
microdnf update
22+
# boost is a build dependency starting in Hadoop 3.4.0 if compiling native code
23+
# automake and libtool are required to build protobuf
24+
microdnf install boost1.78-devel automake libtool
25+
microdnf clean all
26+
rm -rf /var/cache/yum
27+
EOF
28+
1429
# This Protobuf version is the exact version as used in the Hadoop Dockerfile
1530
# See https://github.com/apache/hadoop/blob/trunk/dev-support/docker/pkg-resolver/install-protobuf.sh
1631
# (this was hardcoded in the Dockerfile in earlier versions of Hadoop, make sure to look at the exact version in Github)
17-
WORKDIR /opt/protobuf-src
1832
RUN <<EOF
19-
curl https://repo.stackable.tech/repository/packages/protobuf/protobuf-java-${PROTOBUF}.tar.gz -o /opt/protobuf.tar.gz
20-
tar xzf /opt/protobuf.tar.gz --strip-components 1 --no-same-owner
33+
cd "$(/stackable/patchable --images-repo-root=src checkout shared/protobuf ${PROTOBUF})"
34+
35+
# Create snapshot of the source code including custom patches
36+
tar -czf /stackable/protobuf-${PROTOBUF}-src.tar.gz .
37+
38+
./autogen.sh
2139
./configure --prefix=/opt/protobuf
2240
make "-j$(nproc)"
2341
make install
24-
rm -rf /opt/protobuf-src
42+
(cd .. && rm -r ${PROTOBUF})
2543
EOF
2644

2745
ENV PROTOBUF_HOME=/opt/protobuf
2846
ENV PATH="${PATH}:/opt/protobuf/bin"
2947

30-
RUN <<EOF
31-
rpm --install --replacepkgs https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
32-
microdnf update
33-
# boost is a build dependency starting in Hadoop 3.4.0 if compiling native code
34-
microdnf install boost1.78-devel
35-
microdnf clean all
36-
rm -rf /var/cache/yum
37-
EOF
38-
39-
WORKDIR /stackable
4048
RUN <<EOF
4149
# async-profiler
4250
ARCH="${TARGETARCH/amd64/x64}"
@@ -63,6 +71,9 @@ COPY --chown=${STACKABLE_USER_UID}:0 hadoop/stackable/jmx /stackable/jmx
6371
RUN <<EOF
6472
cd "$(/stackable/patchable --images-repo-root=src checkout hadoop ${PRODUCT})"
6573

74+
# Create snapshot of the source code including custom patches
75+
tar -czf /stackable/hadoop-${PRODUCT}-src.tar.gz .
76+
6677
mvn \
6778
--batch-mode \
6879
--no-transfer-progress \
@@ -125,14 +136,20 @@ EOF
125136
ENV JAVA_HOME="/usr/lib/jvm/temurin-17-jdk"
126137

127138
USER ${STACKABLE_USER_UID}
128-
WORKDIR /build
139+
WORKDIR /stackable
140+
141+
COPY --chown=${STACKABLE_USER_UID}:0 hadoop/hdfs-utils/stackable/patches/patchable.toml /stackable/src/hadoop/hdfs-utils/stackable/patches/patchable.toml
142+
COPY --chown=${STACKABLE_USER_UID}:0 hadoop/hdfs-utils/stackable/patches/${HDFS_UTILS} /stackable/src/hadoop/hdfs-utils/stackable/patches/${HDFS_UTILS}
143+
129144
# The Stackable HDFS utils contain an OPA authorizer, group mapper & topology provider.
130145
# The topology provider provides rack awareness functionality for HDFS by allowing users to specify Kubernetes
131146
# labels to build a rackID from.
132147
# Starting with hdfs-utils version 0.3.0 the topology provider is not a standalone jar anymore and included in hdfs-utils.
133148
RUN <<EOF
134-
curl "https://github.com/stackabletech/hdfs-utils/archive/refs/tags/v${HDFS_UTILS}.tar.gz" | tar -xzC .
135-
cd hdfs-utils-${HDFS_UTILS}
149+
cd "$(/stackable/patchable --images-repo-root=src checkout hadoop/hdfs-utils ${HDFS_UTILS})"
150+
151+
# Create snapshot of the source code including custom patches
152+
tar -czf /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz .
136153

137154
mvn \
138155
--batch-mode \
@@ -147,7 +164,7 @@ cp target/hdfs-utils-$HDFS_UTILS.jar /stackable/hdfs-utils-${HDFS_UTILS}.jar
147164
rm -rf hdfs-utils-main
148165

149166
# Set correct groups
150-
chmod g=u /stackable/hdfs-utils-${HDFS_UTILS}.jar
167+
chmod g=u /stackable/hdfs-utils-${HDFS_UTILS}.jar /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz
151168
EOF
152169

153170
FROM stackable/image/java-base AS final
@@ -168,6 +185,7 @@ LABEL \
168185

169186
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable /stackable
170187
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS}.jar /stackable/hadoop-${PRODUCT}/share/hadoop/common/lib/hdfs-utils-${HDFS_UTILS}.jar
188+
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz /stackable
171189

172190
COPY --chown=${STACKABLE_USER_UID}:0 hadoop/licenses /licenses
173191

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
base = "cf24929fad3da02e530151d5ac66802cd5fa4109"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
base = "fb9bd978a3c855984e93f1a6407c57d62fa34733"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
upstream = "https://github.com/stackabletech/hdfs-utils.git"

hadoop/upload_new_hadoop_version.sh

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)