This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
forked from HHS/simpler-grants-gov
-
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.
Merge branch 'main' into chouinar/12-v1-opp-endpoint
- Loading branch information
Showing
19 changed files
with
517 additions
and
67 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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# wait-for-local-opensearch | ||
|
||
set -e | ||
|
||
# Color formatting | ||
RED='\033[0;31m' | ||
NO_COLOR='\033[0m' | ||
|
||
MAX_WAIT_TIME=30 # seconds | ||
WAIT_TIME=0 | ||
|
||
# Curl the healthcheck endpoint of the local opensearch | ||
# until it returns a success response | ||
until curl --output /dev/null --silent http://localhost:9200/_cluster/health; | ||
do | ||
echo "waiting on OpenSearch to initialize..." | ||
sleep 3 | ||
|
||
WAIT_TIME=$(($WAIT_TIME+3)) | ||
if [ $WAIT_TIME -gt $MAX_WAIT_TIME ] | ||
then | ||
echo -e "${RED}ERROR: OpenSearch appears to not be starting up, running \"docker logs opensearch-node\" to troubleshoot.${NO_COLOR}" | ||
docker logs opensearch-node | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "OpenSearch is ready after ~${WAIT_TIME} seconds" | ||
|
||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.