Skip to content

Commit 402698b

Browse files
committed
replace performance analyzer with telemetry-otel & address PR feedback
1 parent 841b3a0 commit 402698b

File tree

11 files changed

+56
-146
lines changed

11 files changed

+56
-146
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- opensearch: Add Opensearch as new product with version `3.1.0` ([#1215]).
10+
11+
[#1215]: https://github.com/stackabletech/docker-images/pull/1215
12+
713
## [25.7.0] - 2025-07-23
814

915
## [25.7.0-rc1] - 2025-07-18
@@ -65,7 +71,6 @@ All notable changes to this project will be documented in this file.
6571
- hadoop: backport HADOOP-19352, HADOOP-19335, HADOOP-19465, HADOOP-19456 and HADOOP-19225 to fix vulnerabilities in Hadoop `3.4.1` ([#1184])
6672
- hadoop: Backport HADOOP-18583 to make OpenSSL 3.x work with the native hadoop libraries ([#1209]).
6773
- spark: backport [SPARK-51311] Promote bcprov-jdk18on to compile scope ([#1212]).
68-
- opensearch: Add Opensearch as new product with version `3.1.0` ([#1215]).
6974

7075
### Changed
7176

@@ -230,7 +235,6 @@ All notable changes to this project will be documented in this file.
230235
[#1197]: https://github.com/stackabletech/docker-images/pull/1197
231236
[#1209]: https://github.com/stackabletech/docker-images/pull/1209
232237
[#1212]: https://github.com/stackabletech/docker-images/pull/1212
233-
[#1215]: https://github.com/stackabletech/docker-images/pull/1215
234238

235239
## [25.3.0] - 2025-03-21
236240

conf.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
opensearch_security_plugin = importlib.import_module(
3434
"opensearch.security-plugin.versions"
3535
)
36-
opensearch_performance_analyzer = importlib.import_module(
37-
"opensearch.performance-analyzer.versions"
38-
)
3936
spark_k8s = importlib.import_module("spark-k8s.versions")
4037
stackable_base = importlib.import_module("stackable-base.versions")
4138
stackable_devel = importlib.import_module("stackable-devel.versions")
@@ -78,10 +75,6 @@
7875
"name": "opensearch/security-plugin",
7976
"versions": opensearch_security_plugin.versions,
8077
},
81-
{
82-
"name": "opensearch/performance-analyzer",
83-
"versions": opensearch_performance_analyzer.versions,
84-
},
8578
{"name": "spark-k8s", "versions": spark_k8s.versions},
8679
{"name": "stackable-base", "versions": stackable_base.versions},
8780
{"name": "stackable-devel", "versions": stackable_devel.versions},
@@ -109,6 +102,7 @@
109102
"kafka": {"id": "625ff25b91bdcd4b49c823a4"},
110103
"nifi": {"id": "625586a32e9e14bc8118e203"},
111104
"opa": {"id": "6255838bea1feb8bec4aaaa3"},
105+
"opensearch": {"id": "6880fe690db664aa303d3a28"},
112106
"spark-k8s": {"id": "62613e81f8ce82a2f247dda5"},
113107
"superset": {"id": "62557e5fea1feb8bec4aaaa0"},
114108
"tools": {"id": "62557cd575ab7e30884aaaa0"},

jdk-base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5
1+
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
22
# check=error=true
33

44
#

opensearch/Dockerfile

Lines changed: 45 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
2+
# check=error=true
3+
14
FROM stackable/image/opensearch/security-plugin AS opensearch-security-plugin
2-
FROM stackable/image/opensearch/performance-analyzer AS opensearch-performance-analyzer
35
FROM stackable/image/java-devel AS opensearch-builder
46

57
ARG PRODUCT
68
ARG RELEASE
79
ARG OPENSEARCH_SECURITY_PLUGIN
8-
ARG OPENSEARCH_PERFORMANCE_ANALYZER
910
ARG STACKABLE_USER_UID
1011

1112
WORKDIR /stackable
@@ -28,38 +29,22 @@ cd "$(/stackable/patchable --images-repo-root=src checkout opensearch ${PRODUCT}
2829
NEW_VERSION="${PRODUCT}-stackable${RELEASE}"
2930
# Create snapshot of the source code including custom patches
3031
tar -czf /stackable/opensearch-${NEW_VERSION}-src.tar.gz .
31-
./gradlew clean localDistro -Dbuild.snapshot=false
32+
if [[ $(uname -m) == "arm64" ]]
33+
then
34+
./scripts/build.sh -v ${PRODUCT} -s false -a arm64
35+
tar -xzf artifacts/dist/opensearch-min-${PRODUCT}-linux-arm64.tar.gz -C /stackable
36+
else
37+
./scripts/build.sh -v ${PRODUCT} -s false -a x64
38+
tar -xzf artifacts/dist/opensearch-min-${PRODUCT}-linux-x64.tar.gz -C /stackable
39+
fi
40+
unzip artifacts/core-plugins/repository-s3-${PRODUCT}.zip -d /stackable/opensearch-${PRODUCT}/plugins/repository-s3/
41+
mv /stackable/opensearch-${PRODUCT}/plugins/repository-s3/config /stackable/opensearch-${PRODUCT}/config/repository-s3
42+
unzip artifacts/core-plugins/telemetry-otel-${PRODUCT}.zip -d /stackable/opensearch-${PRODUCT}/plugins/telemetry-otel/
43+
mv /stackable/opensearch-${PRODUCT}/plugins/telemetry-otel/config /stackable/opensearch-${PRODUCT}/config/telemetry-otel
3244
./gradlew cyclonedxBom --warning-mode=summary -Dbuild.snapshot=false
33-
cp -r build/distribution/local/opensearch-${PRODUCT} /stackable/opensearch
34-
cp distribution/docker/src/docker/bin/docker-entrypoint.sh /stackable/opensearch/opensearch-docker-entrypoint.sh
35-
# repository-s3 plugin
36-
cd plugins/repository-s3
37-
../../gradlew clean assemble -Dbuild.snapshot=false
38-
mkdir /stackable/opensearch/plugins/repository-s3
39-
cp build/distributions/repository-s3-${PRODUCT}.zip /stackable/opensearch/plugins/repository-s3/repository-s3-${PRODUCT}.zip
40-
cp -r config/repository-s3 /stackable/opensearch/config/repository-s3
41-
cd /stackable/opensearch/plugins/repository-s3
42-
unzip repository-s3-${PRODUCT}.zip
43-
rm repository-s3-${PRODUCT}.zip
44-
# Fix an error where OpenSearch running in a container is denied access to swap space size
45-
sed -i -e 's/OPENSEARCH_DISTRIBUTION_TYPE=tar/OPENSEARCH_DISTRIBUTION_TYPE=docker/' /stackable/opensearch/bin/opensearch-env
46-
EOF
47-
48-
WORKDIR /stackable/opensearch-performance-analyzer
49-
COPY \
50-
--chown=${STACKABLE_USER_UID}:0 \
51-
--from=opensearch-performance-analyzer \
52-
/stackable/src/opensearch/performance-analyzer/patchable-work/worktree/${OPENSEARCH_PERFORMANCE_ANALYZER}/build/distributions/opensearch-performance-analyzer-${OPENSEARCH_PERFORMANCE_ANALYZER}.zip \
53-
opensearch-performance-analyzer-${OPENSEARCH_PERFORMANCE_ANALYZER}.zip
54-
COPY \
55-
--chown=${STACKABLE_USER_UID}:0 \
56-
--from=opensearch-performance-analyzer \
57-
/stackable/src/opensearch/performance-analyzer/patchable-work/worktree/${OPENSEARCH_PERFORMANCE_ANALYZER}/config \
58-
/stackable/opensearch/config/opensearch-performance-analyzer
59-
60-
RUN <<EOF
61-
unzip opensearch-performance-analyzer-${OPENSEARCH_PERFORMANCE_ANALYZER}.zip
62-
rm opensearch-performance-analyzer-${OPENSEARCH_PERFORMANCE_ANALYZER}.zip
45+
cp distribution/docker/src/docker/bin/docker-entrypoint.sh /stackable/opensearch-${PRODUCT}/opensearch-docker-entrypoint.sh
46+
# Tell OpenSearch it is running in a container
47+
sed -i -e 's/OPENSEARCH_DISTRIBUTION_TYPE=tar/OPENSEARCH_DISTRIBUTION_TYPE=docker/' /stackable/opensearch-${PRODUCT}/bin/opensearch-env
6348
EOF
6449

6550
WORKDIR /stackable/opensearch-security
@@ -72,10 +57,10 @@ COPY \
7257
RUN <<EOF
7358
unzip opensearch-security-${OPENSEARCH_SECURITY_PLUGIN}.zip
7459
rm opensearch-security-${OPENSEARCH_SECURITY_PLUGIN}.zip
75-
mv config /stackable/opensearch/config/opensearch-security
60+
mv config /stackable/opensearch-${PRODUCT}/config/opensearch-security
7661
EOF
7762

78-
WORKDIR /stackable/opensearch
63+
WORKDIR /stackable/opensearch-${PRODUCT}
7964

8065
RUN <<EOF
8166
# The JDK from jdk-base is used instead.
@@ -85,10 +70,9 @@ rm -r jdk
8570
# the size of the final image.
8671
# see https://github.com/stackabletech/docker-images/issues/961
8772
chmod -R g=u "${HOME}"
88-
chmod +x /stackable/opensearch/opensearch-docker-entrypoint.sh
73+
chmod +x /stackable/opensearch-${PRODUCT}/opensearch-docker-entrypoint.sh
8974
EOF
9075

91-
9276
# The OpenSearch Performance Analyzer needs a JDK, not just a JRE.
9377
# With a JRE, the following exception is thrown:
9478
# java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine
@@ -97,19 +81,21 @@ FROM stackable/image/jdk-base
9781
ARG PRODUCT
9882
ARG RELEASE
9983
ARG OPENSEARCH_SECURITY_PLUGIN
100-
ARG OPENSEARCH_PERFORMANCE_ANALYZER
10184
ARG STACKABLE_USER_UID
10285

10386
ARG NAME="OpenSearch"
104-
ARG DESCRIPTION="This image is deployed by a custom Helm Chart"
87+
ARG DESCRIPTION="This image is deployed by the Stackable Operator for OpenSearch."
10588
ARG HOME=/stackable
10689
ARG OPENSEARCH_HOME=${HOME}/opensearch
10790

108-
LABEL name="${NAME}"
109-
LABEL version="${PRODUCT}"
110-
LABEL release="${RELEASE}"
111-
LABEL summary="The Stackable image for OpenSearch"
112-
LABEL description="${DESCRIPTION}"
91+
LABEL \
92+
name="OpenSearch" \
93+
maintainer="[email protected]" \
94+
vendor="Stackable GmbH" \
95+
version="${PRODUCT}" \
96+
release="${RELEASE}" \
97+
summary="The Stackable image for OpenSearch." \
98+
description="This image is deployed by the Stackable Operator for OpenSearch."
11399

114100
# https://github.com/opencontainers/image-spec/blob/036563a4a268d7c08b51a08f05a02a0fe74c7268/annotations.md#annotations
115101
LABEL org.opencontainers.image.version="${PRODUCT}"
@@ -120,18 +106,13 @@ LABEL org.opencontainers.image.description="${DESCRIPTION}"
120106
COPY \
121107
--chown=${STACKABLE_USER_UID}:0 \
122108
--from=opensearch-builder \
123-
/stackable/opensearch \
109+
/stackable/opensearch-${PRODUCT} \
124110
/stackable/opensearch-${PRODUCT}-stackable${RELEASE}
125111
COPY \
126112
--chown=${STACKABLE_USER_UID}:0 \
127113
--from=opensearch-builder \
128114
/stackable/opensearch-security \
129115
/stackable/opensearch-${PRODUCT}-stackable${RELEASE}/plugins/opensearch-security
130-
COPY \
131-
--chown=${STACKABLE_USER_UID}:0 \
132-
--from=opensearch-builder \
133-
/stackable/opensearch-performance-analyzer \
134-
/stackable/opensearch-${PRODUCT}-stackable${RELEASE}/plugins/opensearch-performance-analyzer
135116
COPY \
136117
--chown=${STACKABLE_USER_UID}:0 \
137118
--from=opensearch-builder \
@@ -142,11 +123,6 @@ COPY \
142123
--from=opensearch-security-plugin \
143124
/stackable/opensearch-security-${OPENSEARCH_SECURITY_PLUGIN}-stackable${RELEASE}-src.tar.gz \
144125
/stackable
145-
COPY \
146-
--chown=${STACKABLE_USER_UID}:0 \
147-
--from=opensearch-performance-analyzer \
148-
/stackable/opensearch-performance-analyzer-${OPENSEARCH_PERFORMANCE_ANALYZER}-stackable${RELEASE}-src.tar.gz \
149-
/stackable
150126
COPY \
151127
--chown=${STACKABLE_USER_UID}:0 \
152128
--from=opensearch-builder \
@@ -157,11 +133,6 @@ COPY \
157133
--from=opensearch-security-plugin \
158134
/stackable/src/opensearch/security-plugin/patchable-work/worktree/${OPENSEARCH_SECURITY_PLUGIN}/build/reports/bom.json \
159135
/stackable/opensearch-security-${OPENSEARCH_SECURITY_PLUGIN}-stackable${RELEASE}.cdx.json
160-
COPY \
161-
--chown=${STACKABLE_USER_UID}:0 \
162-
--from=opensearch-performance-analyzer \
163-
/stackable/src/opensearch/performance-analyzer/patchable-work/worktree/${OPENSEARCH_PERFORMANCE_ANALYZER}/build/reports/bom.json \
164-
/stackable/opensearch-performance-analyzer-${OPENSEARCH_PERFORMANCE_ANALYZER}-stackable${RELEASE}.cdx.json
165136
RUN <<EOF
166137
microdnf update
167138
microdnf clean all
@@ -175,11 +146,24 @@ ln -s /stackable/opensearch-${PRODUCT}-stackable${RELEASE} ${OPENSEARCH_HOME}
175146
chown -h ${STACKABLE_USER_UID}:0 ${OPENSEARCH_HOME}
176147
EOF
177148

149+
# ----------------------------------------
150+
# Checks
151+
# This section is to run final checks to ensure the created final images
152+
# adhere to several minimal requirements like:
153+
# - check file permissions and ownerships
154+
# ----------------------------------------
155+
156+
# Check that permissions and ownership in /stackable are set correctly
157+
# This will fail and stop the build if any mismatches are found.
158+
RUN <<EOF
159+
/bin/check-permissions-ownership.sh /stackable ${STACKABLE_USER_UID} 0
160+
EOF
161+
178162
USER ${STACKABLE_USER_UID}
163+
179164
ENV HOME=${HOME}
180165
ENV OPENSEARCH_HOME=${OPENSEARCH_HOME}
181166
ENV PATH="${PATH}:/${OPENSEARCH_HOME}:${OPENSEARCH_HOME}/bin"
182-
ENV OPENSEARCH_CONTAINER=true
183167

184168
WORKDIR ${OPENSEARCH_HOME}
185169
CMD ["./opensearch-docker-entrypoint.sh"]

opensearch/performance-analyzer/Dockerfile

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

opensearch/performance-analyzer/stackable/patches/3.1.0.0/0001-Add-CycloneDX-plugin.patch

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

opensearch/performance-analyzer/stackable/patches/3.1.0.0/patchable.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

opensearch/performance-analyzer/stackable/patches/patchable.toml

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

opensearch/performance-analyzer/versions.py

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

opensearch/security-plugin/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
2+
# check=error=true
3+
14
FROM stackable/image/java-devel AS security-plugin-builder
25

36
ARG PRODUCT

0 commit comments

Comments
 (0)