forked from opensearch-project/opensearch-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove references to the default credentials of admin:admin (opensear…
…ch-project#449) * Remove references to the default creds Signed-off-by: Derek Ho <[email protected]> * Address PR comments and fix CI for 2.12.0 release Signed-off-by: Derek Ho <[email protected]> * fix syntatic issues with the dockerfile Signed-off-by: Derek Ho <[email protected]> * add fi Signed-off-by: Derek Ho <[email protected]> * Add 2.12 into matrix Signed-off-by: Derek Ho <[email protected]> * Add version check Signed-off-by: Derek Ho <[email protected]> * Fix up Signed-off-by: Derek Ho <[email protected]> * fix version imports Signed-off-by: Derek Ho <[email protected]> * ci: add version check to dockerfile Signed-off-by: Jakob Hahn <[email protected]> * fix security integ test Signed-off-by: Jakob Hahn <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> Signed-off-by: Jakob Hahn <[email protected]> Co-authored-by: Jakob Hahn <[email protected]>
- Loading branch information
Showing
7 changed files
with
41 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
ARG OPENSEARCH_VERSION | ||
FROM opensearchproject/opensearch:${OPENSEARCH_VERSION} | ||
|
||
ARG OPENSEARCH_VERSION | ||
ARG opensearch_path=/usr/share/opensearch | ||
ARG SECURE_INTEGRATION | ||
ENV SECURE_INTEGRATION=$SECURE_INTEGRATION | ||
|
||
RUN if [ "$SECURE_INTEGRATION" != "true" ] ; then $opensearch_path/bin/opensearch-plugin remove opensearch-security; fi | ||
# Starting in 2.12.0 security demo requires an initial admin password, which is set as myStrongPassword123! | ||
# https://apple.stackexchange.com/a/123408/11374 | ||
RUN if [ "$SECURE_INTEGRATION" != "true" ] ; then \ | ||
$opensearch_path/bin/opensearch-plugin remove opensearch-security; \ | ||
else \ | ||
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }; \ | ||
if [ $(version $OPENSEARCH_VERSION) -ge $(version "2.12.0") ] || [ $OPENSEARCH_VERSION == "latest" ]; then \ | ||
echo user admin:myStrongPassword123! > curl.conf ; \ | ||
else \ | ||
echo user admin:admin > curl.conf ; \ | ||
fi\ | ||
fi | ||
|
||
HEALTHCHECK --start-period=20s --interval=30s \ | ||
CMD curl -sf -retry 5 --max-time 5 --retry-delay 5 --retry-max-time 30 \ | ||
$(if $SECURE_INTEGRATION; then echo "-u admin:admin -k https://"; fi)"localhost:9200" \ | ||
$(if $SECURE_INTEGRATION; then echo "-K curl.conf -k https://"; fi)"localhost:9200" \ | ||
|| bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters