Skip to content

Commit

Permalink
Default admin password as admin (#234) (#264)
Browse files Browse the repository at this point in the history
* Default admin password as admin

Signed-off-by: Derek Ho <[email protected]>

* Add 2.12.0 to matrix

Signed-off-by: Derek Ho <[email protected]>

* Export var

Signed-off-by: Derek Ho <[email protected]>

* Add version logic

Signed-off-by: Derek Ho <[email protected]>

* Get the version via the properties

Signed-off-by: Derek Ho <[email protected]>

* Invert the logic

Signed-off-by: Derek Ho <[email protected]>

* Only pull the version if it exists

Signed-off-by: Derek Ho <[email protected]>

* Only extract the version if it exists

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
(cherry picked from commit 41417d4)

Co-authored-by: Derek Ho <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and derek-ho authored Aug 27, 2024
1 parent 3310147 commit ef4375b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/actions/start-opensearch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ runs:
fi
OPENSEARCH_HOME=$(realpath ./opensearch-*)
OPENSEARCH_JAVA_OPTS="-Djava.net.preferIPv4Stack=true"
export OPENSEARCH_INITIAL_ADMIN_PASSWORD=admin
url="http://localhost:9200"
cp ./client/.ci/opensearch/opensearch.yml $OPENSEARCH_HOME/config/
Expand All @@ -34,7 +35,15 @@ runs:
if [[ -d "$OPENSEARCH_HOME/plugins/opensearch-security" ]]; then
if [[ "$SECURED" == "true" ]]; then
bash $OPENSEARCH_HOME/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s
OPENSEARCH_VERSION=$(cat $OPENSEARCH_HOME/plugins/opensearch-security/plugin-descriptor.properties | grep '^version=' | cut -d'=' -f 2)
OPENSEARCH_REQUIRED_VERSION="2.12.0"
# Starting in 2.12.0, security demo configuration script requires an initial admin password
COMPARE_VERSION=`echo $OPENSEARCH_REQUIRED_VERSION $OPENSEARCH_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1`
if [ "$COMPARE_VERSION" == "$OPENSEARCH_REQUIRED_VERSION" ]; then
bash $OPENSEARCH_HOME/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s -t
else
bash $OPENSEARCH_HOME/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s
fi
sed -i.bak -e 's/plugins.security.audit.type:.*/plugins.security.audit.type: log4j/' $OPENSEARCH_HOME/config/opensearch.yml
cp ./client/.ci/opensearch/*.pem $OPENSEARCH_HOME/config/
url="https://localhost:9200"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ['1.1.0', '1.2.4', '1.3.4', '2.2.0', '2.4.0', '2.6.0', '2.8.0']
version: ['1.1.0', '1.2.4', '1.3.4', '2.2.0', '2.4.0', '2.6.0', '2.8.0', '2.12.0']
secured: [true, false]
steps:
- name: Checkout Rust Client
Expand Down

0 comments on commit ef4375b

Please sign in to comment.