Type removal breaking changes (#151)

* Breaking changes for type removal

Signed-off-by: Vacha Shah <vachshah@amazon.com>

* Adding support to test against unreleased OpenSearch

Signed-off-by: Vacha Shah <vachshah@amazon.com>

* Formatting

Signed-off-by: Vacha Shah <vachshah@amazon.com>

* Addressing comments to refactor run-opensearch.sh

Signed-off-by: Vacha Shah <vachshah@amazon.com>
This commit is contained in:
Vacha Shah
2022-04-13 10:47:48 -07:00
committed by GitHub
parent 092a013280
commit b1eaba0064
31 changed files with 206 additions and 624 deletions
+34 -29
View File
@@ -30,7 +30,7 @@ environment=($(cat <<-END
END
))
if [[ "$SECURE_INTEGRATION" == "false" ]] && [[ "$CLUSTER" == "opensearch" ]]; then
if [[ "$SECURE_INTEGRATION" == "false" ]] && [[ "$CLUSTER" == "opensearch" ]] && [[ "$IS_UNRELEASED" == "false" ]]; then
security=($(cat <<-END
--env plugins.security.disabled=true
END
@@ -58,40 +58,45 @@ END
local_detach="true"
if [[ "$i" == "$((NUMBER_OF_NODES-1))" ]]; then local_detach=$DETACH; fi
echo -e "\033[34;1mINFO: building $CLUSTER container\033[0m"
docker build \
--file=.ci/$CLUSTER/Dockerfile \
--build-arg SECURE_INTEGRATION=$SECURE_INTEGRATION \
--build-arg OPENSEARCH_VERSION=$OPENSEARCH_VERSION \
--tag=$CLUSTER-secure-$SECURE_INTEGRATION \
.
echo -e "\033[34;1mINFO:\033[0m Starting container $node_name \033[0m"
set -x
healthcmd="curl -vvv -s --fail http://localhost:9200/_cluster/health || exit 1"
if [[ "$SECURE_INTEGRATION" == "true" ]]; then
healthcmd="curl -vvv -s --insecure -u admin:admin --fail https://localhost:9200/_cluster/health || exit 1"
fi
docker run \
--name "$node_name" \
--network "$network_name" \
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
"${environment[@]}" \
"${volumes[@]}" \
"${security[@]}" \
--publish "$http_port":9200 \
--ulimit nofile=65536:65536 \
--ulimit memlock=-1:-1 \
--detach="$local_detach" \
--health-cmd="$(echo $healthcmd)" \
--health-interval=2s \
--health-retries=20 \
--health-timeout=2s \
--rm \
-d \
$CLUSTER-secure-$SECURE_INTEGRATION;
CLUSTER_TAG=$CLUSTER
if [[ "$IS_UNRELEASED" == "false" ]]; then
CLUSTER_TAG=$CLUSTER_TAG-secure-$SECURE_INTEGRATION
echo -e "\033[34;1mINFO: building $CLUSTER container\033[0m"
docker build \
--file=.ci/$CLUSTER/Dockerfile \
--build-arg SECURE_INTEGRATION=$SECURE_INTEGRATION \
--build-arg OPENSEARCH_VERSION=$OPENSEARCH_VERSION \
--tag=$CLUSTER_TAG \
.
else
CLUSTER_TAG=$CLUSTER_TAG:test
fi
echo -e "\033[34;1mINFO:\033[0m Starting container $node_name \033[0m"
docker run \
--name "$node_name" \
--network "$network_name" \
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
"${environment[@]}" \
"${volumes[@]}" \
"${security[@]}" \
--publish "$http_port":9200 \
--ulimit nofile=65536:65536 \
--ulimit memlock=-1:-1 \
--detach="$local_detach" \
--health-cmd="$(echo $healthcmd)" \
--health-interval=2s \
--health-retries=20 \
--health-timeout=2s \
--rm \
-d \
$CLUSTER_TAG;
set +x
if wait_for_container "$opensearch_node_name" "$network_name"; then
echo -e "\033[32;1mSUCCESS:\033[0m Running on: $node_url\033[0m"
+6
View File
@@ -15,6 +15,12 @@ else
export OPENSEARCH_URL_EXTENSION="http"
fi
export IS_UNRELEASED=false
if [[ "$OPENSEARCH_VERSION" == *"SNAPSHOT" ]]; then
IS_UNRELEASED=true
fi
echo -e "\033[1m>>>>> Unreleased is $IS_UNRELEASED >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail