Skip to content

Commit

Permalink
Update OpenSearch to version 2.18 (#118)
Browse files Browse the repository at this point in the history
Co-authored-by: Evgeniy Antonyuk <[email protected]>
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/DocSpace-buildtools/pulls/118
Reviewed-by: Evgeniy Antonyuk <[email protected]>
Co-authored-by: Vladimir Ischenko <[email protected]>
Co-committed-by: Vladimir Ischenko <[email protected]>
  • Loading branch information
isboston and evgeniy-antonyuk committed Dec 26, 2024
1 parent bdcafb0 commit 50016a4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
9 changes: 4 additions & 5 deletions install/OneClickInstall/install-Debian/install-preq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ locale-gen en_US.UTF-8
# add opensearch repo
curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --dearmor --batch --yes -o /usr/share/keyrings/opensearch-keyring
echo "deb [signed-by=/usr/share/keyrings/opensearch-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main" > /etc/apt/sources.list.d/opensearch-2.x.list
ELASTIC_VERSION="2.11.1"
ELASTIC_VERSION="2.18.0"
export OPENSEARCH_INITIAL_ADMIN_PASSWORD="$(echo "${package_sysname}!A1")"

#add opensearch dashboards repo
if [ ${INSTALL_FLUENT_BIT} == "true" ]; then
curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --dearmor --batch --yes -o /usr/share/keyrings/opensearch-keyring
echo "deb [signed-by=/usr/share/keyrings/opensearch-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/2.x/apt stable main" > /etc/apt/sources.list.d/opensearch-dashboards-2.x.list
DASHBOARDS_VERSION="2.11.1"
DASHBOARDS_VERSION="2.18.0"
fi

# add nodejs repo
Expand Down Expand Up @@ -128,6 +129,7 @@ apt-get install -o DPkg::options::="--force-confnew" -yq \
gcc \
make \
dotnet-sdk-9.0 \
opensearch=${ELASTIC_VERSION} \
mysql-server \
mysql-client \
postgresql \
Expand All @@ -136,9 +138,6 @@ apt-get install -o DPkg::options::="--force-confnew" -yq \
temurin-${JAVA_VERSION}-jre \
ffmpeg
if ! dpkg -l | grep -q "opensearch"; then
apt-get install -yq opensearch=${ELASTIC_VERSION}
fi
# Set Java ${JAVA_VERSION} as the default version
JAVA_PATH=$(find /usr/lib/jvm/ -name "java" -path "*temurin-${JAVA_VERSION}*" | head -1)
update-alternatives --install /usr/bin/java java "$JAVA_PATH" 100 && update-alternatives --set java "$JAVA_PATH"
Expand Down
5 changes: 3 additions & 2 deletions install/OneClickInstall/install-RedHat/install-preq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ fi

#add opensearch repo
curl -SL https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/opensearch-2.x.repo -o /etc/yum.repos.d/opensearch-2.x.repo
ELASTIC_VERSION="2.11.1"
ELASTIC_VERSION="2.18.0"
export OPENSEARCH_INITIAL_ADMIN_PASSWORD="$(echo "${package_sysname}!A1")"

#add opensearch dashboards repo
if [ ${INSTALL_FLUENT_BIT} == "true" ]; then
curl -SL https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/2.x/opensearch-dashboards-2.x.repo -o /etc/yum.repos.d/opensearch-dashboards-2.x.repo
DASHBOARDS_VERSION="2.11.1"
DASHBOARDS_VERSION="2.18.0"
fi

# add nginx repo, Fedora doesn't need it
Expand Down
5 changes: 2 additions & 3 deletions install/common/product-configuration
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,7 @@ change_elasticsearch_config(){
systemctl stop elasticsearch >/dev/null 2>&1
fi

sed -i '/^plugins\.security/d' /etc/opensearch/opensearch.yml
sed -i '/CN=kirk,OU=client,O=client,L=test, C=de/d' /etc/opensearch/opensearch.yml
sed -i '/^plugins\.security\./,/^[^ ]/d' /etc/opensearch/opensearch.yml
if /usr/share/opensearch/bin/opensearch-plugin list | grep -x "opensearch-security" > /dev/null 2>&1 ; then
/usr/share/opensearch/bin/opensearch-plugin remove opensearch-security > /dev/null 2>&1
fi
Expand Down Expand Up @@ -899,7 +898,7 @@ restart_services

# Truncate MySQL DB to make opensearch work with updated app. Strictly after restart_services ()
if $PACKAGE_MANAGER opensearch >/dev/null 2>&1; then
ELASTIC_VERSION=$(awk '/build:/{f=1} f&&/version:/{gsub(/"/,"",$2);print $2; exit}' /usr/share/opensearch/manifest.yml 2>/dev/null || echo "2.11.1")
ELASTIC_VERSION=$(awk '/build:/{f=1} f&&/version:/{gsub(/"/,"",$2);print $2; exit}' /usr/share/opensearch/manifest.yml 2>/dev/null || echo "2.18.0")
[[ ! -f "$APP_DIR/.private/opensearch-version" || $(cat "$APP_DIR/.private/opensearch-version") != *"$ELASTIC_VERSION"* ]] && $MYSQL "$DB_NAME" -e "TRUNCATE webstudio_index";
echo "$ELASTIC_VERSION" > $APP_DIR/.private/opensearch-version
chmod o-rwx $APP_DIR/.private/opensearch-version
Expand Down
4 changes: 2 additions & 2 deletions install/docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
PROXY_VERSION=latest
REDIS_VERSION=7
RABBITMQ_VERSION=3
ELK_VERSION=2.11.1
ELK_VERSION=2.18.0
FLUENT_BIT_VERSION=3.0.2
DASHBOARDS_VERSION=2.11.1
DASHBOARDS_VERSION=2.18.0
DOCUMENT_SERVER_VERSION=latest

# images name #
Expand Down

0 comments on commit 50016a4

Please sign in to comment.