From 150d96558c43e9941773e298e339ecfa53743b78 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Thu, 14 May 2026 09:10:01 +0200 Subject: [PATCH] [bitnami/opensearch] Release 3.6.0-debian-12-r1 (#93133) Signed-off-by: Bitnami Bot --- bitnami/opensearch/3/debian-12/Dockerfile | 11 +- .../opensearch-docker-entrypoint.sh | 100 ++++++++++++++++++ .../bitnami/scripts/opensearch/entrypoint.sh | 13 --- .../bitnami/scripts/opensearch/postunpack.sh | 18 ++-- bitnami/opensearch/README.md | 2 +- 5 files changed, 113 insertions(+), 31 deletions(-) create mode 100755 bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/opensearch/opensearch-docker-entrypoint.sh diff --git a/bitnami/opensearch/3/debian-12/Dockerfile b/bitnami/opensearch/3/debian-12/Dockerfile index 2f26384a86f2..552ce167b0e9 100644 --- a/bitnami/opensearch/3/debian-12/Dockerfile +++ b/bitnami/opensearch/3/debian-12/Dockerfile @@ -9,7 +9,7 @@ ARG OPENSEARCH_PLUGINS ARG TARGETARCH LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2026-04-17T09:12:49Z" \ + org.opencontainers.image.created="2026-05-14T06:16:52Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/opensearch/README.md" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/opensearch" \ @@ -31,8 +31,8 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \ DOWNLOADS_URL=${SECRET_DOWNLOADS_URL:-${DOWNLOADS_URL}} ; \ mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \ COMPONENTS=( \ - "yq-4.53.2-0-linux-${OS_ARCH}-debian-12" \ - "jre-21.0.10-10-0-linux-${OS_ARCH}-debian-12" \ + "yq-4.53.2-1-linux-${OS_ARCH}-debian-12" \ + "jre-21.0.11-11-1-linux-${OS_ARCH}-debian-12" \ "opensearch-3.6.0-0-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ @@ -54,13 +54,14 @@ RUN /opt/bitnami/scripts/opensearch/postunpack.sh RUN /opt/bitnami/scripts/java/postunpack.sh ENV APP_VERSION="3.6.0" \ BITNAMI_APP_NAME="opensearch" \ - IMAGE_REVISION="0" \ + IMAGE_REVISION="1" \ JAVA_HOME="/opt/bitnami/java" \ - LD_LIBRARY_PATH="/opt/bitnami/opensearch/jdk/lib:/opt/bitnami/opensearch/jdk/lib/server:/opt/bitnami/opensearch/plugins/opensearch-knn/lib:$LD_LIBRARY_PATH" \ + LD_LIBRARY_PATH="/opt/bitnami/opensearch/plugins/opensearch-knn/lib:$LD_LIBRARY_PATH" \ OPENSEARCH_JAVA_HOME="/opt/bitnami/java" EXPOSE 9200 9300 +WORKDIR /opt/bitnami/opensearch USER 1001 ENTRYPOINT [ "/opt/bitnami/scripts/opensearch/entrypoint.sh" ] CMD [ "/opt/bitnami/scripts/opensearch/run.sh" ] diff --git a/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/opensearch/opensearch-docker-entrypoint.sh b/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/opensearch/opensearch-docker-entrypoint.sh new file mode 100755 index 000000000000..09ef24176e77 --- /dev/null +++ b/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/opensearch/opensearch-docker-entrypoint.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +# shellcheck disable=SC1091 + +set -o errexit +set -o nounset +set -o pipefail +#set -o xtrace + +# Environment variables +export OPENSEARCH_JAVA_HOME=/opt/bitnami/java +export OPENSEARCH_HOME=/opt/bitnami/opensearch +export OPENSEARCH_PATH_BIN="${OPENSEARCH_HOME}/bin" +export OPENSEARCH_PATH_CONF="${OPENSEARCH_HOME}/config" +export OPENSEARCH_PATH_PLUGINS="${OPENSEARCH_HOME}/plugins" +export OPENSEARCH_JAVA_OPTS="-Dopensearch.cgroups.hierarchy.override=/ $OPENSEARCH_JAVA_OPTS" + +# Security Plugin +function setupSecurityPlugin { + if [ -d "${OPENSEARCH_PATH_PLUGINS}/opensearch-security" ]; then + if [ "$DISABLE_SECURITY_PLUGIN" = "true" ]; then + echo "Disabling OpenSearch Security Plugin" + opensearch_opt="-Eplugins.security.disabled=true" + opensearch_opts+=("${opensearch_opt}") + else + echo "Enabling OpenSearch Security Plugin" + if [ "$DISABLE_INSTALL_DEMO_CONFIG" = "true" ]; then + echo "Disabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" + else + echo "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" + bash "${OPENSEARCH_PATH_PLUGINS}/opensearch-security/tools/install_demo_configuration.sh" -y -i -s || exit 1 + fi + fi + else + echo "OpenSearch Security Plugin does not exist, disable by default" + fi +} + +# Performance Analyzer Plugin +function setupPerformanceAnalyzerPlugin { + if [ -d "${OPENSEARCH_PATH_PLUGINS}/opensearch-performance-analyzer" ]; then + if [ "$DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI" = "true" ]; then + echo "Disabling execution of ${OPENSEARCH_PATH_BIN}/opensearch-performance-analyzer/performance-analyzer-agent-cli for OpenSearch Performance Analyzer Plugin" + else + echo "Enabling execution of ${OPENSEARCH_PATH_BIN}/opensearch-performance-analyzer/performance-analyzer-agent-cli for OpenSearch Performance Analyzer Plugin" + "${OPENSEARCH_PATH_BIN}/opensearch-performance-analyzer/performance-analyzer-agent-cli" > "${OPENSEARCH_HOME}/logs/PerformanceAnalyzer.log" 2>&1 & disown + fi + else + echo "OpenSearch Performance Analyzer Plugin does not exist, disable by default" + fi +} + +# Start up the OpenSearch and Performance Analyzer agent processes. +# When either of them halts, this script exits, or we receive a SIGTERM or SIGINT signal then we want to kill both these processes. +function runOpenSearch { + # Files created by OpenSearch should always be group writable too + umask 0002 + + if [[ "$(id -u)" == "0" ]]; then + echo "OpenSearch cannot run as root. Please start your container as another user." + exit 1 + fi + + # Parse Docker env vars to customize OpenSearch + # e.g. Setting the env var cluster.name=testcluster + # will cause OpenSearch to be invoked with -Ecluster.name=testcluster + opensearch_opts=() + while IFS='=' read -r envvar_key envvar_value + do + # OpenSearch settings need to have at least two dot separated lowercase + # words, e.g. `cluster.name`, except for `processors` which we handle + # specially + if [[ "$envvar_key" =~ ^[a-z0-9_]+\.[a-z0-9_]+ || "$envvar_key" == "processors" ]]; then + if [[ ! -z $envvar_value ]]; then + opensearch_opt="-E${envvar_key}=${envvar_value}" + opensearch_opts+=("${opensearch_opt}") + fi + fi + done < <(env) + + setupSecurityPlugin + setupPerformanceAnalyzerPlugin + + # Start opensearch + exec "$@" "${opensearch_opts[@]}" +} + +# Prepend "opensearch" command if no argument was provided or if the first +# argument looks like a flag (i.e. starts with a dash). +if [ $# -eq 0 ] || [ "${1:0:1}" = '-' ]; then + set -- opensearch "$@" +fi + +if [ "$1" = "opensearch" ]; then + runOpenSearch "$@" +else + exec "$@" +fi diff --git a/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/scripts/opensearch/entrypoint.sh b/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/scripts/opensearch/entrypoint.sh index 9552131da9e6..32d31d9ded81 100755 --- a/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/scripts/opensearch/entrypoint.sh +++ b/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/scripts/opensearch/entrypoint.sh @@ -24,19 +24,6 @@ print_welcome_page debug "Copying files from $DB_DEFAULT_CONF_DIR to $DB_CONF_DIR" cp -nr "$DB_DEFAULT_CONF_DIR"/. "$DB_CONF_DIR" -if ! is_dir_empty "$DB_DEFAULT_PLUGINS_DIR"; then - debug "Copying plugins from $DB_DEFAULT_PLUGINS_DIR to $DB_PLUGINS_DIR" - # Copy the plugins installed by default to the plugins directory - # If there is already a plugin with the same name in the plugins folder do nothing - for plugin_path in "${DB_DEFAULT_PLUGINS_DIR}"/*; do - plugin_name="$(basename "$plugin_path")" - plugin_moved_path="${DB_PLUGINS_DIR}/${plugin_name}" - if ! [[ -d "$plugin_moved_path" ]]; then - cp -r "$plugin_path" "$plugin_moved_path" - fi - done -fi - if [[ "$1" = "/opt/bitnami/scripts/opensearch/run.sh" ]]; then info "** Starting Opensearch setup **" /opt/bitnami/scripts/opensearch/setup.sh diff --git a/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/scripts/opensearch/postunpack.sh b/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/scripts/opensearch/postunpack.sh index 6bb284a1e5e5..3844701d2ee8 100755 --- a/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/scripts/opensearch/postunpack.sh +++ b/bitnami/opensearch/3/debian-12/rootfs/opt/bitnami/scripts/opensearch/postunpack.sh @@ -11,7 +11,7 @@ # Load environment . /opt/bitnami/scripts/opensearch-env.sh -for dir in "$DB_TMP_DIR" "$DB_DATA_DIR" "$DB_LOGS_DIR" "${DB_BASE_DIR}/plugins" "${DB_BASE_DIR}/modules" "${DB_BASE_DIR}/extensions" "$DB_CONF_DIR" "$DB_VOLUME_DIR" "$DB_INITSCRIPTS_DIR" "$DB_MOUNTED_PLUGINS_DIR" "$DB_DEFAULT_CONF_DIR" "$DB_DEFAULT_PLUGINS_DIR"; do +for dir in "$DB_TMP_DIR" "$DB_DATA_DIR" "$DB_LOGS_DIR" "${DB_BASE_DIR}/plugins" "${DB_BASE_DIR}/modules" "${DB_BASE_DIR}/extensions" "$DB_CONF_DIR" "$DB_VOLUME_DIR" "$DB_INITSCRIPTS_DIR" "$DB_MOUNTED_PLUGINS_DIR" "$DB_DEFAULT_CONF_DIR"; do ensure_dir_exists "$dir" chmod -R ug+rwX "$dir" done @@ -22,7 +22,7 @@ replace_in_file "${DB_BASE_DIR}/bin/opensearch-env" "unset JAVA_TOOL_OPTIONS" "t elasticsearch_configure_logging -for dir in "$DB_TMP_DIR" "$DB_DATA_DIR" "$DB_LOGS_DIR" "${DB_BASE_DIR}/plugins" "${DB_BASE_DIR}/modules" "$DB_CONF_DIR" "$DB_VOLUME_DIR" "$DB_INITSCRIPTS_DIR" "$DB_MOUNTED_PLUGINS_DIR" "$DB_DEFAULT_CONF_DIR" "$DB_DEFAULT_PLUGINS_DIR"; do +for dir in "$DB_TMP_DIR" "$DB_DATA_DIR" "$DB_LOGS_DIR" "${DB_BASE_DIR}/plugins" "${DB_BASE_DIR}/modules" "$DB_CONF_DIR" "$DB_VOLUME_DIR" "$DB_INITSCRIPTS_DIR" "$DB_MOUNTED_PLUGINS_DIR" "$DB_DEFAULT_CONF_DIR"; do # `elasticsearch-plugin install` command complains about being unable to create the a plugin's directory # even when having the proper permissions. # The reason: the code is checking trying to check the permissions by consulting the parent directory owner, @@ -36,19 +36,13 @@ for dir in "$DB_TMP_DIR" "$DB_DATA_DIR" "$DB_LOGS_DIR" "${DB_BASE_DIR}/plugins" chown -R 1001:0 "$dir" done -elasticsearch_install_plugins +[[ -n "${DB_PLUGINS:-}" ]] && elasticsearch_install_plugins # Copy all initially generated configuration files to the default directory # (this is to avoid breaking when entrypoint is being overridden) cp -r "${DB_CONF_DIR}/"* "$DB_DEFAULT_CONF_DIR" chmod o+rX -R "$DB_DEFAULT_CONF_DIR" -if ! is_dir_empty "$DB_PLUGINS_DIR"; then - # Move all initially installed plugins to the default plugins directory. - for plugin_path in "${DB_PLUGINS_DIR}"/*; do - plugin_name="$(basename "$plugin_path")" - plugin_moved_path="${DB_DEFAULT_PLUGINS_DIR}/${plugin_name}" - mv "$plugin_path" "$plugin_moved_path" - done - chmod o+rX -R "$DB_DEFAULT_PLUGINS_DIR" -fi +# Create a structure compatible with OpenSearch K8s Operator that's +# based on the upstream image that installs OpenSearch under /usr/share/opensearch +ln -s "$OPENSEARCH_BASE_DIR" /usr/share/opensearch diff --git a/bitnami/opensearch/README.md b/bitnami/opensearch/README.md index f1ae48d60d75..3a6804dc5ce8 100644 --- a/bitnami/opensearch/README.md +++ b/bitnami/opensearch/README.md @@ -186,7 +186,7 @@ For larger cluster, you can setup 'dedicated nodes' using the following environm - `OPENSEARCH_NODE_TYPE`: OpenSearch node type when behaving as a 'dedicated node'. Valid values: *master*, *data*, *coordinating* or *ingest*. - `OPENSEARCH_CLUSTER_MASTER_HOSTS`: List of OpenSearch master-eligible hosts. Available separators are ' ', ',' and ';'. If no values are provided, it will have the same value as `OPENSEARCH_CLUSTER_HOSTS`. -Find more information about 'dedicated nodes' in the [official documentation](https://www.elastic.co/guide/en/opensearch/reference/current/modules-node.html). +Find more information about 'dedicated nodes' in the [official documentation](https://docs.opensearch.org/latest/tuning-your-cluster/). ### Configuration file