Skip to content

Commit f118fbc

Browse files
authored
feat(opensearch): Install common OpenSearch plugins from Maven Central (#1322)
* install common OpenSearch plugins from Maven Central * fix hadolint * fix typo in comment * fix build issues * address feedback on PR
1 parent d3638a9 commit f118fbc

File tree

3 files changed

+92
-2
lines changed

3 files changed

+92
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
1111
- opensearch: Use build-repo.stackable.tech instead of Maven Central ([#1222]).
1212
- opensearch: Add the `opensearch-prometheus-exporter` plugin to the image ([#1223]).
1313
- opensearch: Replace the demo configuration of the OpenSearch Security plugin with a minimal one ([#1228]).
14+
- opensearch: Install common plugins from Maven Central ([#1322]).
1415
- opensearch-dashboards: Add an image for Opensearch Dashboards with version `3.1.0` ([#1248]).
1516
- nifi: Backport NIFI-14848 to NiFi ([#1225]).
1617
- stackable-base: Add cert-tools ([#1247]).
@@ -119,6 +120,7 @@ All notable changes to this project will be documented in this file.
119120
[#1318]: https://github.com/stackabletech/docker-images/pull/1318
120121
[#1319]: https://github.com/stackabletech/docker-images/pull/1319
121122
[#1320]: https://github.com/stackabletech/docker-images/pull/1320
123+
[#1322]: https://github.com/stackabletech/docker-images/pull/1322
122124

123125
## [25.7.0] - 2025-07-23
124126

opensearch/Dockerfile

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,40 @@ FROM local-image/java-devel AS opensearch-builder
77

88
ARG PRODUCT_VERSION
99
ARG RELEASE_VERSION
10-
ARG OPENSEARCH_SECURITY_PLUGIN_VERSION
11-
ARG OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION
1210
ARG STACKABLE_USER_UID
1311
ARG TARGETARCH
1412

13+
# Local image versions
14+
ARG OPENSEARCH_SECURITY_PLUGIN_VERSION
15+
ARG OPENSEARCH_OPENSEARCH_PROMETHEUS_EXPORTER_VERSION
16+
17+
# External plugin versions
18+
ARG OPENSEARCH_ALERTING_PLUGIN_VERSION
19+
ARG OPENSEARCH_JOB_SCHEDULER_PLUGIN_VERSION
20+
ARG OPENSEARCH_ANOMALY_DETECTION_PLUGIN_VERSION
21+
ARG OPENSEARCH_ASYNCHRONOUS_SEARCH_PLUGIN_VERSION
22+
ARG OPENSEARCH_CROSS_CLUSTER_REPLICATION_PLUGIN_VERSION
23+
ARG OPENSEARCH_CUSTOM_CODECS_PLUGIN_VERSION
24+
ARG OPENSEARCH_FLOW_FRAMEWORK_PLUGIN_VERSION
25+
ARG OPENSEARCH_GEOSPATIAL_PLUGIN_VERSION
26+
ARG OPENSEARCH_INDEX_MANAGEMENT_PLUGIN_VERSION
27+
ARG OPENSEARCH_KNN_PLUGIN_VERSION
28+
ARG OPENSEARCH_ML_PLUGIN_VERSION
29+
ARG OPENSEARCH_NEURAL_SEARCH_PLUGIN_VERSION
30+
ARG OPENSEARCH_NOTIFICATIONS_CORE_PLUGIN_VERSION
31+
ARG OPENSEARCH_NOTIFICATIONS_PLUGIN_VERSION
32+
ARG OPENSEARCH_OBSERVABILITY_PLUGIN_VERSION
33+
ARG OPENSEARCH_PERFORMANCE_ANALYZER_PLUGIN_VERSION
34+
ARG OPENSEARCH_REPORTS_SCHEDULER_PLUGIN_VERSION
35+
ARG OPENSEARCH_SEARCH_RELEVANCE_PLUGIN_VERSION
36+
ARG OPENSEARCH_SECURITY_ANALYTICS_PLUGIN_VERSION
37+
ARG OPENSEARCH_SKILLS_PLUGIN_VERSION
38+
ARG OPENSEARCH_SQL_PLUGIN_VERSION
39+
ARG OPENSEARCH_SYSTEM_TEMPLATES_PLUGIN_VERSION
40+
ARG OPENSEARCH_UBI_PLUGIN_VERSION
41+
ARG QUERY_INSIGHTS_PLUGIN_VERSION
42+
43+
1544
WORKDIR /stackable
1645

1746
COPY --chown=${STACKABLE_USER_UID}:0 opensearch/stackable/patches/patchable.toml /stackable/src/opensearch/stackable/patches/patchable.toml
@@ -76,6 +105,39 @@ RUN <<EOF
76105
# The JDK from jdk-base is used instead.
77106
rm -r jdk
78107

108+
# Install common plugins that are also used in the official image. The order is influenced by dependencies between plugins.
109+
#
110+
# TODO: The LTR plugin is currently missing because an official release for OpenSearch 3.x versions is missing.
111+
# There are tags for 3.x versions in the git repo, so it can be built from source:
112+
# See https://github.com/opensearch-project/opensearch-learning-to-rank-base
113+
./bin/opensearch-plugin \
114+
install \
115+
--batch \
116+
"org.opensearch.plugin:alerting:${OPENSEARCH_ALERTING_PLUGIN_VERSION}" \
117+
"org.opensearch.plugin:opensearch-job-scheduler:${OPENSEARCH_JOB_SCHEDULER_PLUGIN_VERSION}" \
118+
"org.opensearch.plugin:opensearch-anomaly-detection:${OPENSEARCH_ANOMALY_DETECTION_PLUGIN_VERSION}" \
119+
"org.opensearch.plugin:asynchronous-search:${OPENSEARCH_ASYNCHRONOUS_SEARCH_PLUGIN_VERSION}" \
120+
"org.opensearch.plugin:opensearch-cross-cluster-replication:${OPENSEARCH_CROSS_CLUSTER_REPLICATION_PLUGIN_VERSION}" \
121+
"org.opensearch.plugin:opensearch-custom-codecs:${OPENSEARCH_CUSTOM_CODECS_PLUGIN_VERSION}" \
122+
"org.opensearch.plugin:opensearch-flow-framework:${OPENSEARCH_FLOW_FRAMEWORK_PLUGIN_VERSION}" \
123+
"org.opensearch.plugin:geospatial:${OPENSEARCH_GEOSPATIAL_PLUGIN_VERSION}" \
124+
"org.opensearch.plugin:opensearch-index-management:${OPENSEARCH_INDEX_MANAGEMENT_PLUGIN_VERSION}" \
125+
"org.opensearch.plugin:opensearch-knn:${OPENSEARCH_KNN_PLUGIN_VERSION}" \
126+
"org.opensearch.plugin:opensearch-ml-plugin:${OPENSEARCH_ML_PLUGIN_VERSION}" \
127+
"org.opensearch.plugin:neural-search:${OPENSEARCH_NEURAL_SEARCH_PLUGIN_VERSION}" \
128+
"org.opensearch.plugin:opensearch-notifications-core:${OPENSEARCH_NOTIFICATIONS_CORE_PLUGIN_VERSION}" \
129+
"org.opensearch.plugin:notifications:${OPENSEARCH_NOTIFICATIONS_PLUGIN_VERSION}" \
130+
"org.opensearch.plugin:opensearch-observability:${OPENSEARCH_OBSERVABILITY_PLUGIN_VERSION}" \
131+
"org.opensearch.plugin:performance-analyzer:${OPENSEARCH_PERFORMANCE_ANALYZER_PLUGIN_VERSION}" \
132+
"org.opensearch.plugin:opensearch-reports-scheduler:${OPENSEARCH_REPORTS_SCHEDULER_PLUGIN_VERSION}" \
133+
"org.opensearch.plugin:opensearch-search-relevance:${OPENSEARCH_SEARCH_RELEVANCE_PLUGIN_VERSION}" \
134+
"org.opensearch.plugin:opensearch-security-analytics:${OPENSEARCH_SECURITY_ANALYTICS_PLUGIN_VERSION}" \
135+
"org.opensearch.plugin:opensearch-skills:${OPENSEARCH_SKILLS_PLUGIN_VERSION}" \
136+
"org.opensearch.plugin:opensearch-sql-plugin:${OPENSEARCH_SQL_PLUGIN_VERSION}" \
137+
"org.opensearch.plugin:opensearch-system-templates:${OPENSEARCH_SYSTEM_TEMPLATES_PLUGIN_VERSION}" \
138+
"org.opensearch.plugin:opensearch-ubi:${OPENSEARCH_UBI_PLUGIN_VERSION}" \
139+
"org.opensearch.plugin:query-insights:${QUERY_INSIGHTS_PLUGIN_VERSION}"
140+
79141
# Change the group permissions already in the builder image to reduce
80142
# the size of the final image.
81143
# see https://github.com/stackabletech/docker-images/issues/961

opensearch/boil-config.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,29 @@ java-devel = "21"
33
jdk-base = "21"
44
"opensearch/security-plugin" = "3.1.0.0"
55
"opensearch/opensearch-prometheus-exporter" = "3.1.0.0"
6+
7+
[versions."3.1.0".build-arguments]
8+
"opensearch-alerting-plugin-version" = "3.1.0.0"
9+
"opensearch-job-scheduler-plugin-version" = "3.1.0.0"
10+
"opensearch-anomaly-detection-plugin-version" = "3.1.0.0"
11+
"opensearch-asynchronous-search-plugin-version" = "3.1.0.0"
12+
"opensearch-cross-cluster-replication-plugin-version" = "3.1.0.0"
13+
"opensearch-custom-codecs-plugin-version" = "3.1.0.0"
14+
"opensearch-flow-framework-plugin-version" = "3.1.0.0"
15+
"opensearch-geospatial-plugin-version" = "3.1.0.0"
16+
"opensearch-index-management-plugin-version" = "3.1.0.0"
17+
"opensearch-knn-plugin-version" = "3.1.0.0"
18+
"opensearch-ml-plugin-version" = "3.1.0.0"
19+
"opensearch-neural-search-plugin-version" = "3.1.0.0"
20+
"opensearch-notifications-core-plugin-version" = "3.1.0.0"
21+
"opensearch-notifications-plugin-version" = "3.1.0.0"
22+
"opensearch-observability-plugin-version" = "3.1.0.0"
23+
"opensearch-performance-analyzer-plugin-version" = "3.1.0.0"
24+
"opensearch-reports-scheduler-plugin-version" = "3.1.0.0"
25+
"opensearch-search-relevance-plugin-version" = "3.1.0.0"
26+
"opensearch-security-analytics-plugin-version" = "3.1.0.0"
27+
"opensearch-skills-plugin-version" = "3.1.0.0"
28+
"opensearch-sql-plugin-version" = "3.1.0.0"
29+
"opensearch-system-templates-plugin-version" = "3.1.0.0"
30+
"opensearch-ubi-plugin-version" = "3.1.0.0"
31+
"query-insights-plugin-version" = "3.1.0.0"

0 commit comments

Comments
 (0)