diff --git a/scripts/components/security/install.sh b/scripts/components/security/install.sh deleted file mode 100755 index 1df47c0dbe..0000000000 --- a/scripts/components/security/install.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -# Copyright OpenSearch Contributors -# SPDX-License-Identifier: Apache-2.0 -# -# The OpenSearch Contributors require contributions made to -# this file be licensed under the Apache-2.0 license or a -# compatible open source license. - -set -ex - -function usage() { - echo "Usage: $0 [args]" - echo "" - echo "Arguments:" - echo -e "-v VERSION\t[Required] OpenSearch version." - echo -e "-s SNAPSHOT\t[Optional] Build a snapshot, default is 'false'." - echo -e "-p PLATFORM\t[Optional] Platform, default is 'uname -s'." - echo -e "-a ARCHITECTURE\t[Optional] Build architecture, default is 'uname -m'." - echo -e "-f ARTIFACTS\t[Optional] Location of build artifacts." - echo -e "-o OUTPUT\t[Optional] Output path." - echo -e "-h help" -} - -while getopts ":h:v:q:s:o:p:a:f:" arg; do - case $arg in - h) - usage - exit 1 - ;; - v) - VERSION=$OPTARG - ;; - q) - QUALIFIER=$OPTARG - ;; - s) - SNAPSHOT=$OPTARG - ;; - o) - OUTPUT=$OPTARG - ;; - p) - PLATFORM=$OPTARG - ;; - a) - ARCHITECTURE=$OPTARG - ;; - f) - ARTIFACTS=$ARTIFACTS - ;; - :) - echo "Error: -${OPTARG} requires an argument" - usage - exit 1 - ;; - ?) - echo "Invalid option: -${arg}" - exit 1 - ;; - esac -done - -if [ -z "$VERSION" ]; then - echo "Error: missing version." - usage - exit 1 -fi - -[ -z "$SNAPSHOT" ] && SNAPSHOT="false" -[ -z "$PLATFORM" ] && PLATFORM=$(uname -s | awk '{print tolower($0)}') -[ -z "$ARCHITECTURE" ] && ARCHITECTURE=`uname -m` - -SECURITY_PLUGIN="opensearch-security" - -if [ "$PLATFORM" = "windows" ]; then - - # Temporary solution to run shell script on Windows through MinGW - # Tracking issue: https://github.com/opensearch-project/security/issues/2148 - bash $OUTPUT/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s - -fi diff --git a/scripts/startup/zip/windows/opensearch-windows-install.bat b/scripts/startup/zip/windows/opensearch-windows-install.bat index eaae2ce03a..891ace619a 100644 --- a/scripts/startup/zip/windows/opensearch-windows-install.bat +++ b/scripts/startup/zip/windows/opensearch-windows-install.bat @@ -12,6 +12,14 @@ SET "OPENSEARCH_PATH_CONF=%OPENSEARCH_HOME%\config" ECHO "OPENSEARCH_HOME: %OPENSEARCH_HOME%" ECHO "OPENSEARCH_PATH_CONF: %OPENSEARCH_PATH_CONF%" +:: Security Plugin Setups +ECHO "Running Security Plugin Install Demo Configuration" +CALL "%OPENSEARCH_HOME%/plugins/opensearch-security/tools/install_demo_configuration.bat" "-y" "-i" "-s" + +:: k-NN Plugin Setups +ECHO "Set KNN Dylib Path for Windows systems" +SET "PATH=%PATH%;%OPENSEARCH_HOME%/plugins/opensearch-knn/lib" + :: Start OpenSearch ECHO Start OpenSearch IF "%~1" == "" (