-
Notifications
You must be signed in to change notification settings - Fork 277
/
opensearch-windows-install.bat
36 lines (29 loc) · 1.34 KB
/
opensearch-windows-install.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
:: SPDX-License-Identifier: Apache-2.0
:: Copyright OpenSearch Contributors
@echo off
:: Set variables and cd into the location of the batch script
PUSHD "%~dp0"
SET "OPENSEARCH_HOME=%CD%"
SET "OPENSEARCH_PATH_CONF=%OPENSEARCH_HOME%\config"
:: Echo User Inputs
ECHO "OPENSEARCH_HOME: %OPENSEARCH_HOME%"
ECHO "OPENSEARCH_PATH_CONF: %OPENSEARCH_PATH_CONF%"
:: Security Plugin Setups
IF EXIST "%OPENSEARCH_HOME%\plugins\opensearch-security" (
ECHO "Running Security Plugin Install Demo Configuration"
ECHO "OpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user."
ECHO "Please define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string."
ECHO "If a password is not provided, the setup will quit."
ECHO "For more details, please visit: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/windows/"
CALL "%OPENSEARCH_HOME%\plugins\opensearch-security\tools\install_demo_configuration.bat" -y -i -s || exit /b 1
)
:: 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" == "" (
CALL "%OPENSEARCH_HOME%\bin\opensearch.bat"
) ELSE (
CALL "%OPENSEARCH_HOME%\bin\opensearch.bat" "%*"
)