Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- ubi9-rust-builder: Include `.tar.gz` snapshots of the operator source code in container images ([#1207])
- opensearch: Add Opensearch as new product with version `3.1.0` ([#1215]).
- opensearch: Use build-repo.stackable.tech instead of Maven Central ([#1222]).
- opensearch: Add the `opensearch-prometheus-exporter` plugin to the image ([#1223]).
- nifi: Backport NIFI-14848 to NiFi ([#1225])

### Changed
Expand All @@ -21,6 +22,7 @@ All notable changes to this project will be documented in this file.
[#1219]: https://github.com/stackabletech/docker-images/pull/1219
[#1220]: https://github.com/stackabletech/docker-images/pull/1220
[#1222]: https://github.com/stackabletech/docker-images/pull/1222
[#1223]: https://github.com/stackabletech/docker-images/pull/1223
[#1225]: https://github.com/stackabletech/docker-images/pull/1225

## [25.7.0] - 2025-07-23
Expand Down
7 changes: 7 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
opensearch_security_plugin = importlib.import_module(
"opensearch.security-plugin.versions"
)
opensearch_prometheus_exporter = importlib.import_module(
"opensearch.opensearch-prometheus-exporter.versions"
)
spark_k8s = importlib.import_module("spark-k8s.versions")
stackable_base = importlib.import_module("stackable-base.versions")
stackable_devel = importlib.import_module("stackable-devel.versions")
Expand Down Expand Up @@ -75,6 +78,10 @@
"name": "opensearch/security-plugin",
"versions": opensearch_security_plugin.versions,
},
{
"name": "opensearch/opensearch-prometheus-exporter",
"versions": opensearch_prometheus_exporter.versions,
},
{"name": "spark-k8s", "versions": spark_k8s.versions},
{"name": "stackable-base", "versions": stackable_base.versions},
{"name": "stackable-devel", "versions": stackable_devel.versions},
Expand Down
31 changes: 31 additions & 0 deletions opensearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
# check=error=true

FROM stackable/image/opensearch/security-plugin AS opensearch-security-plugin
FROM stackable/image/opensearch/opensearch-prometheus-exporter AS opensearch-prometheus-exporter
FROM stackable/image/java-devel AS opensearch-builder

ARG PRODUCT
ARG RELEASE
ARG OPENSEARCH_SECURITY_PLUGIN
ARG OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER
ARG STACKABLE_USER_UID
ARG TARGETARCH

Expand Down Expand Up @@ -56,6 +58,18 @@ rm opensearch-security-${OPENSEARCH_SECURITY_PLUGIN}.zip
mv config /stackable/opensearch-${PRODUCT}/config/opensearch-security
EOF

WORKDIR /stackable/opensearch-prometheus-exporter
COPY \
--chown=${STACKABLE_USER_UID}:0 \
--from=opensearch-prometheus-exporter \
/stackable/src/opensearch/opensearch-prometheus-exporter/patchable-work/worktree/${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER}/build/distributions/prometheus-exporter-${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER}.zip \
opensearch-prometheus-exporter-${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER}.zip

RUN <<EOF
unzip opensearch-prometheus-exporter-${OPENSEARCH_SECURITY_PLUGIN}.zip
rm opensearch-prometheus-exporter-${OPENSEARCH_SECURITY_PLUGIN}.zip
EOF

WORKDIR /stackable/opensearch-${PRODUCT}

RUN <<EOF
Expand All @@ -77,6 +91,7 @@ FROM stackable/image/jdk-base AS final
ARG PRODUCT
ARG RELEASE
ARG OPENSEARCH_SECURITY_PLUGIN
ARG OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER
ARG STACKABLE_USER_UID

ARG NAME="OpenSearch"
Expand Down Expand Up @@ -109,6 +124,11 @@ COPY \
--from=opensearch-builder \
/stackable/opensearch-security \
/stackable/opensearch-${PRODUCT}-stackable${RELEASE}/plugins/opensearch-security
COPY \
--chown=${STACKABLE_USER_UID}:0 \
--from=opensearch-builder \
/stackable/opensearch-prometheus-exporter \
/stackable/opensearch-${PRODUCT}-stackable${RELEASE}/plugins/prometheus-exporter
COPY \
--chown=${STACKABLE_USER_UID}:0 \
--from=opensearch-builder \
Expand All @@ -119,6 +139,11 @@ COPY \
--from=opensearch-security-plugin \
/stackable/opensearch-security-${OPENSEARCH_SECURITY_PLUGIN}-stackable${RELEASE}-src.tar.gz \
/stackable
COPY \
--chown=${STACKABLE_USER_UID}:0 \
--from=opensearch-prometheus-exporter \
/stackable/opensearch-prometheus-exporter-${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER}-stackable${RELEASE}-src.tar.gz \
/stackable
COPY \
--chown=${STACKABLE_USER_UID}:0 \
--from=opensearch-builder \
Expand All @@ -129,6 +154,11 @@ COPY \
--from=opensearch-security-plugin \
/stackable/src/opensearch/security-plugin/patchable-work/worktree/${OPENSEARCH_SECURITY_PLUGIN}/build/reports/bom.json \
/stackable/opensearch-security-${OPENSEARCH_SECURITY_PLUGIN}-stackable${RELEASE}.cdx.json
COPY \
--chown=${STACKABLE_USER_UID}:0 \
--from=opensearch-prometheus-exporter \
/stackable/src/opensearch/opensearch-prometheus-exporter/patchable-work/worktree/${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER}/build/reports/bom.json \
/stackable/opensearch-prometheus-exporter-${OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER}-stackable${RELEASE}.cdx.json

RUN <<EOF
microdnf update
Expand All @@ -140,6 +170,7 @@ rm -rf /var/cache/yum
chown ${STACKABLE_USER_UID}:0 ${HOME}
chmod g=u /stackable/opensearch-${PRODUCT}-stackable${RELEASE}
chmod g=u /stackable/opensearch-${PRODUCT}-stackable${RELEASE}/plugins/opensearch-security
chmod g=u /stackable/opensearch-${PRODUCT}-stackable${RELEASE}/plugins/prometheus-exporter
chmod g=u /stackable/*-src.tar.gz
chmod g=u /stackable/*.cdx.json
ln -s /stackable/opensearch-${PRODUCT}-stackable${RELEASE} ${OPENSEARCH_HOME}
Expand Down
29 changes: 29 additions & 0 deletions opensearch/opensearch-prometheus-exporter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
# check=error=true

FROM stackable/image/java-devel AS opensearch-prometheus-exporter-builder

ARG PRODUCT
ARG RELEASE
ARG STACKABLE_USER_UID

USER ${STACKABLE_USER_UID}
WORKDIR /stackable

COPY --chown=${STACKABLE_USER_UID}:0 opensearch/opensearch-prometheus-exporter/stackable/patches/patchable.toml /stackable/src/opensearch/opensearch-prometheus-exporter/stackable/patches/patchable.toml
COPY --chown=${STACKABLE_USER_UID}:0 opensearch/opensearch-prometheus-exporter/stackable/patches/${PRODUCT} /stackable/src/opensearch/opensearch-prometheus-exporter/stackable/patches/${PRODUCT}

RUN <<EOF
cd "$(/stackable/patchable --images-repo-root=src checkout opensearch/opensearch-prometheus-exporter ${PRODUCT})"

# Create snapshot of the source code including custom patches
tar -czf /stackable/opensearch-prometheus-exporter-${PRODUCT}-stackable${RELEASE}-src.tar.gz .
./gradlew clean assemble -Dbuild.snapshot=false
./gradlew cyclonedxBom --warning-mode=summary -Dbuild.snapshot=false
EOF

RUN <<EOF
# Change the group permissions already in the builder image to reduce the size of the final image.
# see https://github.com/stackabletech/docker-images/issues/961
chmod -R g=u /stackable
EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From f89f753d1bc03598bfe129c367233fec6daee078 Mon Sep 17 00:00:00 2001
From: Benedikt Labrenz <[email protected]>
Date: Tue, 12 Aug 2025 14:59:12 +0200
Subject: Add CycloneDX plugin

---
build.gradle | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/build.gradle b/build.gradle
index 6c09118..d47ae14 100644
--- a/build.gradle
+++ b/build.gradle
@@ -63,6 +63,20 @@ buildscript {
}
}

+plugins {
+ id "org.cyclonedx.bom" version "2.3.1"
+}
+
+cyclonedxBom {
+ includeConfigs = ["runtimeClasspath"]
+ includeLicenseText = false
+ skipConfigs = ["compileClasspath", "testCompileClasspath"]
+ projectType = "application"
+ schemaVersion = "1.6"
+ outputFormat = "json"
+ componentVersion = versions.version
+}
+
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'opensearch.opensearchplugin'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
base = "df60b43e34d0f7fba6be9e003924a413764df85e"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
upstream = "https://github.com/opensearch-project/opensearch-prometheus-exporter"
default-mirror = "https://github.com/stackabletech/opensearch-prometheus-exporter"
6 changes: 6 additions & 0 deletions opensearch/opensearch-prometheus-exporter/versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
versions = [
{
"product": "3.1.0.0",
"java-devel": "21",
},
]
1 change: 1 addition & 0 deletions opensearch/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"java-devel": "21",
"jdk-base": "21",
"opensearch/security-plugin": "3.1.0.0",
"opensearch/opensearch-prometheus-exporter": "3.1.0.0",
},
]