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

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
  • Loading branch information
DarshitChanpura committed Feb 2, 2024
1 parent 59578c8 commit 15c40f9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
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 15c40f9

Please sign in to comment.