Skip to content

feat: Add Opensearch image #1215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

feat: Add Opensearch image #1215

wants to merge 18 commits into from

Conversation

labrenbe
Copy link
Member

@labrenbe labrenbe commented Jul 23, 2025

Description

Build the OpenSearch image version 3.1.0 from source.

This includes

  • Security Plugin built from source
  • SBOM generated for OpenSearch and the security plugin
  • Source tars
  • repository-s3 and opensearch-performance-analyzer plugins

Tested with operator smoke test and helm setup.

Possible future improvements:

  • Build the repository-s3 and opensearch-performance-analyzer plugins from source

Part of stackabletech/opensearch-operator#15

Definition of Done Checklist

Note

Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant.

Please make sure all these things are done and tick the boxes

  • Changes are OpenShift compatible
  • All added packages (via microdnf or otherwise) have a comment on why they are added
  • Things not downloaded from Red Hat repositories should be mirrored in the Stackable repository and downloaded from there
  • All packages should have (if available) signatures/hashes verified
  • Add an entry to the CHANGELOG.md file
  • Integration tests ran successfully
TIP: Running integration tests with a new product image

The image can be built and uploaded to the kind cluster with the following commands:

bake --product <product> --image-version <stackable-image-version>
kind load docker-image <image-tagged-with-the-major-version> --name=<name-of-your-test-cluster>

See the output of bake to retrieve the image tag for <image-tagged-with-the-major-version>.

@labrenbe labrenbe requested a review from siegfriedweber July 23, 2025 09:58
@labrenbe labrenbe self-assigned this Jul 23, 2025
@labrenbe labrenbe moved this to Development: Waiting for Review in Stackable Engineering Jul 23, 2025
@siegfriedweber siegfriedweber moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Jul 23, 2025
@Techassi Techassi changed the title feat: Opensearch feat: Add Opensearch image Jul 24, 2025
Copy link
Member

@siegfriedweber siegfriedweber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following files are missing:

  • .github/ISSUE_TEMPLATE/update-product-opensearch.md
  • .github/workflows/build_opensearch.yaml
  • opensearch/README.md with a short description of the content of the image (e.g. installed plugins)

This image must be added to the following files:

  • .github/ISSUE_TEMPLATE/early-pre-release.md
  • .github/workflows/preflight.yaml
  • .scripts/enumerate-product-versions.py
  • .scripts/update_feature_tracker_db.sh
  • README.md (badge)

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this entry to the "Unreleased" section, as well as the pull request reference.

@@ -0,0 +1,59 @@
# syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7

conf.py Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the following line to open_shift_projects:

    "opensearch": {"id": "6880fe690db664aa303d3a28"},

Comment on lines 4 to 5
"java-devel": "24",
"jdk-base": "24",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://docs.opensearch.org/docs/latest/install-and-configure/install-opensearch/index/#java-compatibility, it is only confirmed to be compatible with Java 11, 17 or 21.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 841b3a0#diff-9fe134b6fa2b847439ee0e20eceef8a336719be11e549f70bbd44ea66046e6e6. opensearch-performance-analyzer also just supports Java 21.

@@ -0,0 +1,145 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
# check=error=true

Comment on lines +83 to +87
LABEL name="${NAME}"
LABEL version="${PRODUCT}"
LABEL release="${RELEASE}"
LABEL summary="The Stackable image for OpenSearch"
LABEL description="${DESCRIPTION}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other images have maintainer and vendor labels. Aren't they necessary here?

ENV HOME=${HOME}
ENV OPENSEARCH_HOME=${OPENSEARCH_HOME}
ENV PATH="${PATH}:/${OPENSEARCH_HOME}:${OPENSEARCH_HOME}/bin"
ENV OPENSEARCH_CONTAINER=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the environment variable OPENSEARCH_CONTAINER used? A comment would be good.


# All files and folders owned by root group to support running as arbitrary users.
# This is best practice as all container users will belong to the root group (0).
chown -R ${STACKABLE_USER_UID}:0 ${HOME}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you use the check-permissions-ownership.sh script? This layer is okay for now but if somebody else add things with other uids/gids, it could grow.

@@ -0,0 +1,26 @@
FROM stackable/image/java-devel AS security-plugin-builder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM stackable/image/java-devel AS security-plugin-builder
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
# check=error=true
FROM stackable/image/java-devel AS security-plugin-builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Development: In Review
Development

Successfully merging this pull request may close these issues.

3 participants