Skip to content

Commit

Permalink
Adds doc website link in the message printed for custom admin passwor…
Browse files Browse the repository at this point in the history
…d requirement (opensearch-project#4397)

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
  • Loading branch information
DarshitChanpura authored Feb 2, 2024
1 parent 8fb53d1 commit 42083b7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 -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."
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. \n For more details, please visit: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/"
bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s || exit 1
fi

Expand Down
1 change: 1 addition & 0 deletions scripts/pkg/build_templates/opensearch/deb/debian/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ MINIMUM_OF_TWO_VERSIONS=`echo $OPENSEARCH_REQUIRED_VERSION $OPENSEARCH_VERSION |
if [ $OPENSEARCH_ALREADY_INSTALLED = no ]; then
if [ $MINIMUM_OF_TWO_VERSIONS = $OPENSEARCH_REQUIRED_VERSION ] && [ -z "$OPENSEARCH_INITIAL_ADMIN_PASSWORD" ]; then
echo "ERROR: Opensearch 2.12 and later requires the env variable OPENSEARCH_INITIAL_ADMIN_PASSWORD to be defined to setup the opensearch-security demo configuration"
echo "For more details, please visit: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/debian/"
exit 1
fi
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ MINIMUM_OF_TWO_VERSIONS=`echo $OPENSEARCH_REQUIRED_VERSION $OPENSEARCH_VERSION |
if [ $OPENSEARCH_ALREADY_INSTALLED = no ]; then
if [ $MINIMUM_OF_TWO_VERSIONS = $OPENSEARCH_REQUIRED_VERSION ] && [ -z "$OPENSEARCH_INITIAL_ADMIN_PASSWORD" ]; then
echo "ERROR: Opensearch 2.12 and later requires the env variable OPENSEARCH_INITIAL_ADMIN_PASSWORD to be defined to setup the opensearch-security demo configuration"
echo "For more details, please visit: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/rpm/"
exit 1
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/startup/tar/linux/opensearch-tar-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd $OPENSEARCH_HOME
KNN_LIB_DIR=$OPENSEARCH_HOME/plugins/opensearch-knn/lib
##Security Plugin
if [ -d "$OPENSEARCH_HOME/plugins/opensearch-security" ]; then
echo -e "OpenSearch 2.12.0 onwards, the OpenSearch Security Plugin introduces 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 "OpenSearch 2.12.0 onwards, the OpenSearch Security Plugin introduces 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. \nFor more details, please visit: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/tar/"
bash $OPENSEARCH_HOME/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s || exit 1
echo "done security"
fi
Expand Down
1 change: 1 addition & 0 deletions scripts/startup/zip/windows/opensearch-windows-install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ IF EXIST "%OPENSEARCH_HOME%\plugins\opensearch-security" (
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
)

Expand Down

0 comments on commit 42083b7

Please sign in to comment.