Skip to content

Commit 8388ccc

Browse files
labrenbesiegfriedweberdervoeti
authored
feat: Add Opensearch image (#1215)
* feat(opensearch): Add OpenSearch image * feat(opensearch): Change JDK to version 17 * feat(jdk-base): Create a jdk-base image for OpenSearch * feat(opensearch): Upgrade to version 2.19.0 * feat(opensearch): Upgrade to version 2.19.1 and install the plugin repository-s3 * wip: build from source * feat: SBOMs for OpenSearch and opensearch-security-plugin (#1211) feat: SBOMs for opensearch * fix file structure in image and make multi-arch compatible * install performance analyzer plugin * remove legacy apply-patches file * add changelog entry * build plugins from source and stop building snapshots * replace performance analyzer with telemetry-otel & address PR feedback * simplify build process * address feedback in PR * fix copypaste errors * add stackable-devel to build dependencies --------- Co-authored-by: Siegfried Weber <[email protected]> Co-authored-by: Lukas Krug <[email protected]>
1 parent 37432b0 commit 8388ccc

24 files changed

+805
-3
lines changed

.github/ISSUE_TEMPLATE/early-pre-release.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Part of stackabletech/issues#xxx.
4545
- [ ] [Create issue from template: update-product-kafka.md](https://github.com/stackabletech/docker-images/issues/new?template=update-product-kafka.md)
4646
- [ ] [Create issue from template: update-product-nifi.md](https://github.com/stackabletech/docker-images/issues/new?template=update-product-nifi.md)
4747
- [ ] [Create issue from template: update-product-opa.md](https://github.com/stackabletech/docker-images/issues/new?template=update-product-opa.md)
48+
- [ ] [Create issue from template: update-product-opensearch.md](https://github.com/stackabletech/docker-images/issues/new?template=update-product-opensearch.md)
4849
- [ ] [Create issue from template: update-product-spark.md](https://github.com/stackabletech/docker-images/issues/new?template=update-product-spark.md)
4950
- [ ] [Create issue from template: update-product-superset.md](https://github.com/stackabletech/docker-images/issues/new?template=update-product-superset.md)
5051
- [ ] [Create issue from template: update-product-trino.md](https://github.com/stackabletech/docker-images/issues/new?template=update-product-trino.md)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
name: Update OpenSearch
3+
about: >-
4+
This template contains instructions specific to updating this product and/or
5+
container image(s).
6+
title: >-
7+
chore(opensearch): Update container images ahead of Stackable Release YY.M.X
8+
labels: []
9+
# Currently, projects cannot be assigned via front-matter.
10+
projects: ['stackabletech/10']
11+
assignees: ''
12+
---
13+
14+
Part of #xxx.
15+
16+
<!--
17+
This gives hints to the person doing the work.
18+
Add/Change/Remove anything that isn't applicable anymore
19+
-->
20+
- Add: `x.x.x`
21+
- Remove: `y.y.y`
22+
23+
> [!TIP]
24+
> Please add the `scheduled-for/20XX-XX` label, and add to the [Stackable Engineering][1] project.
25+
>
26+
> [1]: https://github.com/orgs/stackabletech/projects/10
27+
28+
## Update tasks
29+
30+
- [ ] Update `versions.py` to reflect the agreed upon versions in the spreadsheet (including the removal of old versions).
31+
- [ ] Update `versions.py` to the latest supported version of JVM (base and devel).
32+
- [ ] Update other dependencies if applicable (eg: security-plugin, etc).
33+
- [ ] Check other operators (getting_started / kuttl / supported-versions) for usage of the versions. Add the PR(s) to the list below.
34+
- [ ] Update the version in demos. Add the PR(s) to the list below.
35+
36+
## Related Pull Requests
37+
38+
> [!TIP]
39+
> Delete any items that do not apply so that all applicable items can be checked.
40+
> For example, if you add release notes to the documentation repository, you do not need the latter two criteria.
41+
42+
- _Link to the docker-images PR (product update)_
43+
- _Link to the operator PR (getting_started / kuttl / supported-versions)_
44+
- _Link to any other operator PRs (getting_started / kuttl)_
45+
- _Link to demo PR (raise against the `main` branch)_
46+
- _Link to the Release Notes PR in the documentation repo (if not a comment below)_
47+
48+
## Acceptance
49+
50+
> [!TIP]
51+
> This list should be completed by the assignee(s), once respective PRs have been merged. Once all items have been
52+
> checked, the issue can be moved into _Development: Done_.
53+
54+
- [ ] Can build image (either locally, or in CI)
55+
- [ ] Kuttl smoke tests passes (either locally, or in CI)
56+
- [ ] Release notes added to documentation and linked as a PR above
57+
- [ ] Release notes written in a comment below
58+
- [ ] Applicable `release-note` label added to this issue
59+
60+
<details>
61+
<summary>Testing instructions</summary>
62+
63+
```shell
64+
# See the latest version at https://pypi.org/project/image-tools-stackabletech/
65+
pip install image-tools-stackabletech==0.0.16
66+
67+
bake --product opensearch=x.y.z # where x.y.z is the new version added in this PR
68+
69+
kind load docker-image oci.stackable.tech/sdp/opensearch:x.y.z-stackable0.0.0-dev
70+
71+
# Change directory into the opensearch-operator repository and update the
72+
# product version in tests/test-definition.yaml
73+
./scripts/run-tests --test-suite smoke-latest # or similar
74+
```
75+
76+
</details>
77+
78+
_Please consider updating this template if these instructions are wrong, or
79+
could be made clearer._
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Build OpenSearch
3+
run-name: |
4+
Build OpenSearch (attempt #${{ github.run_attempt }})
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: '0 0 2/2 * *' # https://crontab.guru/#0_0_2/2_*_*
10+
push:
11+
branches: [main]
12+
tags: ['*']
13+
paths:
14+
# To check dependencies, run this ( you will need to consider transitive dependencies)
15+
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
16+
- opensearch/**
17+
- vector/**
18+
- stackable-base/**
19+
- stackable-devel/**
20+
- jdk-base/**
21+
- java-devel/**
22+
- .github/actions/**
23+
- .github/workflows/build_opensearch.yaml
24+
- .github/workflows/reusable_build_image.yaml
25+
26+
jobs:
27+
build_image:
28+
name: Reusable Workflow
29+
uses: ./.github/workflows/reusable_build_image.yaml
30+
secrets:
31+
harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
32+
slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
33+
with:
34+
product-name: opensearch
35+
sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
36+
registry-namespace: sdp

.github/workflows/preflight.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
- nifi
6767
- omid
6868
- opa
69+
- opensearch
6970
- spark-k8s
7071
- superset
7172
- trino

.scripts/enumerate-product-versions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"krb5",
1919
"nifi",
2020
"opa",
21+
"opensearch",
2122
"omid",
2223
"spark-k8s",
2324
"superset",

.scripts/update_feature_tracker_db.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ PRODUCT_CODE_NAMES=(
3333
hive
3434
kafka
3535
nifi
36+
opensearch
3637
spark-k8s
3738
superset
3839
trino

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- ubi9-rust-builder: Include `.tar.gz` snapshots of the operator source code in container images ([#1207])
10+
- opensearch: Add Opensearch as new product with version `3.1.0` ([#1215]).
1011

1112
### Changed
1213

1314
- all: Use our build-repo to cache NPM dependencies ([#1219])
1415

1516
[#1207]: https://github.com/stackabletech/docker-images/pull/1207
17+
[#1215]: https://github.com/stackabletech/docker-images/pull/1215
1618
[#1219]: https://github.com/stackabletech/docker-images/pull/1219
1719

1820
## [25.7.0] - 2025-07-23

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ This repository contains Dockerfiles and scripts to build base images for use wi
88
| [![Build Airflow]][build_airflow.yaml] | [![Build Druid]][build_druid.yaml] | [![Build Hadoop]][build_hadoop.yaml] | [![Build HBase]][build_hbase.yaml] |
99
| [![Build Hive]][build_hive.yaml] | [![Build Java Base]][build_java-base.yaml] | [![Build Java Development]][build_java-devel.yaml] | [![Build Kafka Testing Tools]][build_kafka-testing-tools.yaml] |
1010
| [![Build Kafka]][build_kafka.yaml] | [![Build Krb5]][build_krb5.yaml] | [![Build NiFi]][build_nifi.yaml] | [![Build Omid]][build_omid.yaml] |
11-
| [![Build OPA]][build_opa.yaml] | [![Build Spark Connect Client]][build_spark-connect-client.yaml] | [![Build Spark K8s]][build_spark-k8s.yaml] | [![Build Stackable Base]][build_stackable-base.yaml] |
12-
| [![Build Superset]][build_superset.yaml] | [![Build Testing Tools]][build_testing-tools.yaml] | [![Build Tools]][build_tools.yaml] | [![Build Trino CLI]][build_trino-cli.yaml] |
13-
| [![Build Trino]][build_trino.yaml] | [![Build Vector]][build_vector.yaml] | [![Build ZooKeeper]][build_zookeeper.yaml] | |
11+
| [![Build OPA]][build_opa.yaml] | [![Build OpenSearch]][build_opensearch.yaml] | [![Build Spark Connect Client]][build_spark-connect-client.yaml] | [![Build Spark K8s]][build_spark-k8s.yaml] |
12+
| [![Build Stackable Base]][build_stackable-base.yaml] | [![Build Superset]][build_superset.yaml] | [![Build Testing Tools]][build_testing-tools.yaml] | [![Build Tools]][build_tools.yaml] |
13+
| [![Build Trino CLI]][build_trino-cli.yaml] | [![Build Trino]][build_trino.yaml] | [![Build Vector]][build_vector.yaml] | [![Build ZooKeeper]][build_zookeeper.yaml] |
1414
<!-- end:badges -->
1515

1616
## Prerequisites
@@ -239,6 +239,8 @@ ENTRYPOINT ["/stackable-zookeeper-operator"]
239239
[build_omid.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/build_omid.yaml
240240
[Build OPA]: https://github.com/stackabletech/docker-images/actions/workflows/build_opa.yaml/badge.svg
241241
[build_opa.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/build_opa.yaml
242+
[Build OpenSearch]: https://github.com/stackabletech/docker-images/actions/workflows/build_opensearch.yaml/badge.svg
243+
[build_opensearch.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/build_opensearch.yaml
242244
[Build Spark Connect Client]: https://github.com/stackabletech/docker-images/actions/workflows/build_spark-connect-client.yaml/badge.svg
243245
[build_spark-connect-client.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/build_spark-connect-client.yaml
244246
[Build Spark K8s]: https://github.com/stackabletech/docker-images/actions/workflows/build_spark-k8s.yaml/badge.svg

conf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@
2222
hive = importlib.import_module("hive.versions")
2323
java_base = importlib.import_module("java-base.versions")
2424
java_devel = importlib.import_module("java-devel.versions")
25+
jdk_base = importlib.import_module("jdk-base.versions")
2526
kafka = importlib.import_module("kafka.versions")
2627
krb5 = importlib.import_module("krb5.versions")
2728
vector = importlib.import_module("vector.versions")
2829
nifi = importlib.import_module("nifi.versions")
2930
omid = importlib.import_module("omid.versions")
3031
opa = importlib.import_module("opa.versions")
32+
opensearch = importlib.import_module("opensearch.versions")
33+
opensearch_security_plugin = importlib.import_module(
34+
"opensearch.security-plugin.versions"
35+
)
3136
spark_k8s = importlib.import_module("spark-k8s.versions")
3237
stackable_base = importlib.import_module("stackable-base.versions")
3338
stackable_devel = importlib.import_module("stackable-devel.versions")
@@ -58,12 +63,18 @@
5863
{"name": "hive", "versions": hive.versions},
5964
{"name": "java-base", "versions": java_base.versions},
6065
{"name": "java-devel", "versions": java_devel.versions},
66+
{"name": "jdk-base", "versions": jdk_base.versions},
6167
{"name": "kafka", "versions": kafka.versions},
6268
{"name": "krb5", "versions": krb5.versions},
6369
{"name": "vector", "versions": vector.versions},
6470
{"name": "nifi", "versions": nifi.versions},
6571
{"name": "omid", "versions": omid.versions},
6672
{"name": "opa", "versions": opa.versions},
73+
{"name": "opensearch", "versions": opensearch.versions},
74+
{
75+
"name": "opensearch/security-plugin",
76+
"versions": opensearch_security_plugin.versions,
77+
},
6778
{"name": "spark-k8s", "versions": spark_k8s.versions},
6879
{"name": "stackable-base", "versions": stackable_base.versions},
6980
{"name": "stackable-devel", "versions": stackable_devel.versions},
@@ -91,6 +102,7 @@
91102
"kafka": {"id": "625ff25b91bdcd4b49c823a4"},
92103
"nifi": {"id": "625586a32e9e14bc8118e203"},
93104
"opa": {"id": "6255838bea1feb8bec4aaaa3"},
105+
"opensearch": {"id": "6880fe690db664aa303d3a28"},
94106
"spark-k8s": {"id": "62613e81f8ce82a2f247dda5"},
95107
"superset": {"id": "62557e5fea1feb8bec4aaaa0"},
96108
"tools": {"id": "62557cd575ab7e30884aaaa0"},

jdk-base/Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
2+
# check=error=true
3+
4+
#
5+
# Provides the common Java Development Kit for SDP products
6+
#
7+
FROM stackable/image/vector
8+
9+
ARG PRODUCT
10+
ARG RELEASE="1"
11+
12+
LABEL name="Stackable image for OpenJDK" \
13+
maintainer="[email protected]" \
14+
vendor="Stackable GmbH" \
15+
version="${PRODUCT}" \
16+
release="${RELEASE}" \
17+
summary="The Stackable OpenJDK base image." \
18+
description="This image is the base image for all Stackable Java product images which require a JDK."
19+
20+
# See: https://adoptium.net/en-gb/installation/linux/#_centosrhelfedora_instructions
21+
RUN cat <<EOF > /etc/yum.repos.d/adoptium.repo
22+
[Adoptium]
23+
name=Adoptium
24+
# The adoptium mirror times-out often, so we have created a pull-through cache
25+
# baseurl=https://packages.adoptium.net/artifactory/rpm/rhel/\$releasever/\$basearch
26+
baseurl=https://build-repo.stackable.tech/repository/Adoptium/\$releasever/\$basearch
27+
enabled=1
28+
gpgcheck=1
29+
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public
30+
EOF
31+
32+
RUN microdnf update && \
33+
microdnf install \
34+
# Needed to run Java programs
35+
"temurin-${PRODUCT}-jdk" \
36+
# Needed, because otherwise e.g. Zookeeper fails with
37+
# Caused by: java.io.FileNotFoundException: /usr/lib/jvm/java-11-openjdk-11.0.20.0.8-2.el8.x86_64/lib/tzdb.dat (No such file or directory)
38+
tzdata-java \
39+
# Most of the Java tools needs at least "klist" and "kinit" for Kerberos integration
40+
krb5-workstation \
41+
--nodocs && \
42+
microdnf clean all
43+
44+
COPY java-base/licenses /licenses
45+
46+
ENV JAVA_HOME="/usr/lib/jvm/temurin-${PRODUCT}-jdk"
47+
48+
# This image doesn't include the development packages for Java.
49+
# For images that need the devel package (ex. Spark) use this env variable to
50+
# install the proper javac version.
51+
#
52+
# microdnf install java-${JAVA_VERSION}-openjdk-devel
53+
#
54+
ENV JAVA_VERSION=$PRODUCT
55+
56+
# Mitigation for CVE-2021-44228 (Log4Shell)
57+
# This variable is supported as of Log4j version 2.10 and
58+
# disables the vulnerable feature
59+
ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true

0 commit comments

Comments
 (0)