From 278aa72481bdd2fe8dfe6f25a06fe63b40cd60c7 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Fri, 8 Dec 2023 12:55:01 -0500 Subject: [PATCH 01/10] Updates docker and windows distribution to reflect changes with admin user setup Signed-off-by: Darshit Chanpura --- .../config/opensearch/opensearch-docker-entrypoint.sh | 5 ++++- scripts/opensearch-onetime-setup.sh | 6 +++++- scripts/startup/zip/windows/opensearch-windows-install.bat | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh index 4ed61fabfd..ed116ed145 100755 --- a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh +++ b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh @@ -35,7 +35,10 @@ function setupSecurityPlugin { 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_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s + echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." + echo "Please define a `.env` file with `admin_password` variable set to a strong password." + echo "If these are not provided, a password will be generated per node and printed out to the logs. And one of them will be an actual admin password" + bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi if [ "$DISABLE_SECURITY_PLUGIN" = "true" ]; then diff --git a/scripts/opensearch-onetime-setup.sh b/scripts/opensearch-onetime-setup.sh index 3935846905..58a58191bb 100755 --- a/scripts/opensearch-onetime-setup.sh +++ b/scripts/opensearch-onetime-setup.sh @@ -21,7 +21,11 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; 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_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s + echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." + echo "Please define an environment variable 'initialAdminPassword' with a password string." + echo "Or create a file 'initialAdminPassword.txt' with a single line that contains the password string and place it under $OPENSEARCH_PATH_CONF folder." + echo "If none of these are provided, a password will be generated and printed out to the logs." + bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi if [ "$DISABLE_SECURITY_PLUGIN" = "true" ]; then diff --git a/scripts/startup/zip/windows/opensearch-windows-install.bat b/scripts/startup/zip/windows/opensearch-windows-install.bat index 7fb61a6e91..f2a8a4d2b6 100644 --- a/scripts/startup/zip/windows/opensearch-windows-install.bat +++ b/scripts/startup/zip/windows/opensearch-windows-install.bat @@ -15,7 +15,10 @@ ECHO "OPENSEARCH_PATH_CONF: %OPENSEARCH_PATH_CONF%" :: Security Plugin Setups IF EXIST "%OPENSEARCH_HOME%\plugins\opensearch-security" ( ECHO "Running Security Plugin Install Demo Configuration" - CALL "%OPENSEARCH_HOME%/plugins/opensearch-security/tools/install_demo_configuration.bat" -y -i -s + ECHO "Please define an environment variable 'initialAdminPassword' with a password string." + ECHO "Or create a file 'initialAdminPassword.txt' with a single line that contains the password string and place it under %OPENSEARCH_PATH_CONF% folder." + ECHO "If none of these are provided, a password will be generated and printed out to the logs." + CALL "%OPENSEARCH_HOME%\plugins\opensearch-security\tools\install_demo_configuration.bat" -y -i -s || exit /b 1 ) :: k-NN Plugin Setups From 1f7eb924a2f9fa8e96115c6281cebfc91c8ad5bc Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Fri, 8 Dec 2023 12:56:26 -0500 Subject: [PATCH 02/10] Updates info log Signed-off-by: Darshit Chanpura --- .../release/config/opensearch/opensearch-docker-entrypoint.sh | 2 +- scripts/opensearch-onetime-setup.sh | 2 +- scripts/startup/zip/windows/opensearch-windows-install.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh index ed116ed145..7c7d56371d 100755 --- a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh +++ b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh @@ -37,7 +37,7 @@ function setupSecurityPlugin { echo "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." echo "Please define a `.env` file with `admin_password` variable set to a strong password." - echo "If these are not provided, a password will be generated per node and printed out to the logs. And one of them will be an actual admin password" + echo "If these are not provided, the setup will quit." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi diff --git a/scripts/opensearch-onetime-setup.sh b/scripts/opensearch-onetime-setup.sh index 58a58191bb..1e393fdb54 100755 --- a/scripts/opensearch-onetime-setup.sh +++ b/scripts/opensearch-onetime-setup.sh @@ -24,7 +24,7 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; then echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." echo "Please define an environment variable 'initialAdminPassword' with a password string." echo "Or create a file 'initialAdminPassword.txt' with a single line that contains the password string and place it under $OPENSEARCH_PATH_CONF folder." - echo "If none of these are provided, a password will be generated and printed out to the logs." + echo "If none of these are provided, the setup will quit." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi diff --git a/scripts/startup/zip/windows/opensearch-windows-install.bat b/scripts/startup/zip/windows/opensearch-windows-install.bat index f2a8a4d2b6..b0daefe9d4 100644 --- a/scripts/startup/zip/windows/opensearch-windows-install.bat +++ b/scripts/startup/zip/windows/opensearch-windows-install.bat @@ -17,7 +17,7 @@ IF EXIST "%OPENSEARCH_HOME%\plugins\opensearch-security" ( ECHO "Running Security Plugin Install Demo Configuration" ECHO "Please define an environment variable 'initialAdminPassword' with a password string." ECHO "Or create a file 'initialAdminPassword.txt' with a single line that contains the password string and place it under %OPENSEARCH_PATH_CONF% folder." - ECHO "If none of these are provided, a password will be generated and printed out to the logs." + ECHO "If none of these are provided, the setup will quit." CALL "%OPENSEARCH_HOME%\plugins\opensearch-security\tools\install_demo_configuration.bat" -y -i -s || exit /b 1 ) From db0447f2bd02b6486248dcdf78236157d009f49d Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Wed, 13 Dec 2023 15:10:34 -0500 Subject: [PATCH 03/10] Updates the info message to reflect env variable name change Signed-off-by: Darshit Chanpura --- scripts/opensearch-onetime-setup.sh | 4 ++-- scripts/startup/zip/windows/opensearch-windows-install.bat | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/opensearch-onetime-setup.sh b/scripts/opensearch-onetime-setup.sh index 1e393fdb54..4b49137e2a 100755 --- a/scripts/opensearch-onetime-setup.sh +++ b/scripts/opensearch-onetime-setup.sh @@ -22,8 +22,8 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; then else echo "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." - echo "Please define an environment variable 'initialAdminPassword' with a password string." - echo "Or create a file 'initialAdminPassword.txt' with a single line that contains the password string and place it under $OPENSEARCH_PATH_CONF folder." + echo "Please define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a password string." + echo "Or create a file 'opensearch_initial_admin_password.txt' with a single line that contains the password string and place it under $OPENSEARCH_PATH_CONF folder." echo "If none of these are provided, the setup will quit." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi diff --git a/scripts/startup/zip/windows/opensearch-windows-install.bat b/scripts/startup/zip/windows/opensearch-windows-install.bat index b0daefe9d4..ae3c2a8517 100644 --- a/scripts/startup/zip/windows/opensearch-windows-install.bat +++ b/scripts/startup/zip/windows/opensearch-windows-install.bat @@ -15,8 +15,8 @@ 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 "Please define an environment variable 'initialAdminPassword' with a password string." - ECHO "Or create a file 'initialAdminPassword.txt' with a single line that contains the password string and place it under %OPENSEARCH_PATH_CONF% folder." + ECHO "Please define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a password string." + ECHO "Or create a file 'opensearch_initial_admin_password.txt' with a single line that contains the password string and place it under %OPENSEARCH_PATH_CONF% folder." ECHO "If none of these are provided, the setup will quit." CALL "%OPENSEARCH_HOME%\plugins\opensearch-security\tools\install_demo_configuration.bat" -y -i -s || exit /b 1 ) From 533317167659f01e2d8198f9bdb10bd762d29bf7 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 14 Dec 2023 16:11:55 -0500 Subject: [PATCH 04/10] Corrects info logs Signed-off-by: Darshit Chanpura --- .../config/opensearch/opensearch-docker-entrypoint.sh | 5 ++--- scripts/opensearch-onetime-setup.sh | 5 ++--- scripts/startup/zip/windows/opensearch-windows-install.bat | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh index 7c7d56371d..02cd40b8e6 100755 --- a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh +++ b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh @@ -34,10 +34,9 @@ function setupSecurityPlugin { 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" echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." - echo "Please define a `.env` file with `admin_password` variable set to a strong password." - echo "If these are not provided, the setup will quit." + 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." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi diff --git a/scripts/opensearch-onetime-setup.sh b/scripts/opensearch-onetime-setup.sh index 4b49137e2a..6a9e8d0314 100755 --- a/scripts/opensearch-onetime-setup.sh +++ b/scripts/opensearch-onetime-setup.sh @@ -22,9 +22,8 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; then else echo "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." - echo "Please define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a password string." - echo "Or create a file 'opensearch_initial_admin_password.txt' with a single line that contains the password string and place it under $OPENSEARCH_PATH_CONF folder." - echo "If none of these are provided, the setup will quit." + 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." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi diff --git a/scripts/startup/zip/windows/opensearch-windows-install.bat b/scripts/startup/zip/windows/opensearch-windows-install.bat index ae3c2a8517..e566a4215e 100644 --- a/scripts/startup/zip/windows/opensearch-windows-install.bat +++ b/scripts/startup/zip/windows/opensearch-windows-install.bat @@ -15,9 +15,9 @@ 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 "Please define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a password string." - ECHO "Or create a file 'opensearch_initial_admin_password.txt' with a single line that contains the password string and place it under %OPENSEARCH_PATH_CONF% folder." - ECHO "If none of these are provided, the setup will quit." + ECHO "OpenSearch 2.12.0 onwards, the security plugin introduces 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." CALL "%OPENSEARCH_HOME%\plugins\opensearch-security\tools\install_demo_configuration.bat" -y -i -s || exit /b 1 ) From 681393557d2292f2ca884a5814a16ce61547b25f Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 14 Dec 2023 16:16:04 -0500 Subject: [PATCH 05/10] Captializes security plugin name in info logs Signed-off-by: Darshit Chanpura --- .../release/config/opensearch/opensearch-docker-entrypoint.sh | 2 +- scripts/opensearch-onetime-setup.sh | 2 +- scripts/startup/zip/windows/opensearch-windows-install.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh index 02cd40b8e6..87bca6972d 100755 --- a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh +++ b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh @@ -34,7 +34,7 @@ function setupSecurityPlugin { if [ "$DISABLE_INSTALL_DEMO_CONFIG" = "true" ]; then echo "Disabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" else - echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." + 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." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 diff --git a/scripts/opensearch-onetime-setup.sh b/scripts/opensearch-onetime-setup.sh index 6a9e8d0314..bc69dbd446 100755 --- a/scripts/opensearch-onetime-setup.sh +++ b/scripts/opensearch-onetime-setup.sh @@ -21,7 +21,7 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; 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" - echo "OpenSearch 2.12.0 onwards, the security plugin introduces a change that requires an initial password for 'admin' user." + 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." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 diff --git a/scripts/startup/zip/windows/opensearch-windows-install.bat b/scripts/startup/zip/windows/opensearch-windows-install.bat index e566a4215e..b606b14f4b 100644 --- a/scripts/startup/zip/windows/opensearch-windows-install.bat +++ b/scripts/startup/zip/windows/opensearch-windows-install.bat @@ -15,7 +15,7 @@ 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 security plugin introduces a change that requires an initial password for 'admin' user." + 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." CALL "%OPENSEARCH_HOME%\plugins\opensearch-security\tools\install_demo_configuration.bat" -y -i -s || exit /b 1 From e59d8fcfe1324fca69ad4b95551a167bc329c8fa Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 4 Jan 2024 09:35:17 -0500 Subject: [PATCH 06/10] Updates sample docker compose files to accept admin password as environment variable Signed-off-by: Darshit Chanpura --- docker/release/dockercomposefiles/docker-compose-2.x.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/release/dockercomposefiles/docker-compose-2.x.yml b/docker/release/dockercomposefiles/docker-compose-2.x.yml index b5cf87a460..9d07cf24a1 100644 --- a/docker/release/dockercomposefiles/docker-compose-2.x.yml +++ b/docker/release/dockercomposefiles/docker-compose-2.x.yml @@ -11,6 +11,7 @@ services: - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} # Sets the demo admin user password when using demo configuration ulimits: memlock: soft: -1 @@ -35,6 +36,7 @@ services: - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 - bootstrap.memory_lock=true - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} ulimits: memlock: soft: -1 From 44f68321bd177a72d0b78307fc6105dea03eebc1 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 4 Jan 2024 09:37:39 -0500 Subject: [PATCH 07/10] Fixes too few spaces error Signed-off-by: Darshit Chanpura --- docker/release/dockercomposefiles/docker-compose-2.x.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/release/dockercomposefiles/docker-compose-2.x.yml b/docker/release/dockercomposefiles/docker-compose-2.x.yml index 9d07cf24a1..5225062677 100644 --- a/docker/release/dockercomposefiles/docker-compose-2.x.yml +++ b/docker/release/dockercomposefiles/docker-compose-2.x.yml @@ -11,7 +11,7 @@ services: - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM - - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} # Sets the demo admin user password when using demo configuration + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} # Sets the demo admin user password when using demo configuration ulimits: memlock: soft: -1 From 85ef16cef21e38f8b235c87ad258ae5bf1da0dac Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 11 Jan 2024 14:10:52 -0500 Subject: [PATCH 08/10] Updates multiple echos with a single printf Signed-off-by: Darshit Chanpura --- .../config/opensearch/opensearch-docker-entrypoint.sh | 4 +--- scripts/opensearch-onetime-setup.sh | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh index 87bca6972d..2cb6d9162f 100755 --- a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh +++ b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh @@ -34,9 +34,7 @@ function setupSecurityPlugin { if [ "$DISABLE_INSTALL_DEMO_CONFIG" = "true" ]; then echo "Disabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" else - 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." + printf "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin \nOpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user. \nPlease define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string. \nIf a password is not provided, the setup will quit." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi diff --git a/scripts/opensearch-onetime-setup.sh b/scripts/opensearch-onetime-setup.sh index bc69dbd446..8b41be67e3 100755 --- a/scripts/opensearch-onetime-setup.sh +++ b/scripts/opensearch-onetime-setup.sh @@ -20,10 +20,7 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; then 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" - 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." + printf "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin \nOpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user. \nPlease define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string. \nIf a password is not provided, the setup will quit." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi From 583d580b40d4c76f96540be0d01631aa72e79b88 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Tue, 16 Jan 2024 13:51:10 -0500 Subject: [PATCH 09/10] Change to echo -e Signed-off-by: Darshit Chanpura --- .../release/config/opensearch/opensearch-docker-entrypoint.sh | 2 +- scripts/opensearch-onetime-setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh index 2cb6d9162f..730520818a 100755 --- a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh +++ b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh @@ -34,7 +34,7 @@ function setupSecurityPlugin { if [ "$DISABLE_INSTALL_DEMO_CONFIG" = "true" ]; then echo "Disabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" else - printf "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin \nOpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user. \nPlease define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string. \nIf a password is not provided, the setup will quit." + echo -e "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin \nOpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user. \nPlease define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string. \nIf a password is not provided, the setup will quit." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi diff --git a/scripts/opensearch-onetime-setup.sh b/scripts/opensearch-onetime-setup.sh index 8b41be67e3..1e10c4c27d 100755 --- a/scripts/opensearch-onetime-setup.sh +++ b/scripts/opensearch-onetime-setup.sh @@ -20,7 +20,7 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; then if [ "$DISABLE_INSTALL_DEMO_CONFIG" = "true" ]; then echo "Disabling execution of install_demo_configuration.sh for OpenSearch Security Plugin" else - printf "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin \nOpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user. \nPlease define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string. \nIf a password is not provided, the setup will quit." + echo -e "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin \nOpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user. \nPlease define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string. \nIf a password is not provided, the setup will quit." bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1 fi From 4a34e4e008cdb787e56fe1ff817a8a9433c7a945 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 18 Jan 2024 18:06:55 -0500 Subject: [PATCH 10/10] Updates comment in docker compose files Signed-off-by: Darshit Chanpura --- docker/release/dockercomposefiles/docker-compose-2.x.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/release/dockercomposefiles/docker-compose-2.x.yml b/docker/release/dockercomposefiles/docker-compose-2.x.yml index 5225062677..da8b7e9575 100644 --- a/docker/release/dockercomposefiles/docker-compose-2.x.yml +++ b/docker/release/dockercomposefiles/docker-compose-2.x.yml @@ -11,7 +11,7 @@ services: - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM - - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} # Sets the demo admin user password when using demo configuration + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} # Sets the demo admin user password when using demo configuration, required for OpenSearch 2.12 and higher ulimits: memlock: soft: -1