Support integ test with security plugin enabled

Removed a docker-compose.yml file which wasn't being used.

Signed-off-by: Rushi Agrawal <rushi.agr@gmail.com>
This commit is contained in:
Rushi Agrawal
2021-08-18 19:21:28 +05:30
parent 6fcc78a58c
commit 5149372e45
8 changed files with 87 additions and 33 deletions
-15
View File
@@ -1,15 +0,0 @@
version: '3'
services:
opensearch:
build:
context: .
dockerfile: Dockerfile
args:
- SECURE_INTEGRATION=${SECURE_INTEGRATION:-false}
- OPENSEARCH_VERSION=${OPENSEARCH_VERSION:-latest}
command: /usr/share/opensearch/opensearch-run.sh
ports:
- "9200:9200"
user: opensearch
+9 -5
View File
@@ -65,15 +65,19 @@ END
if [[ "$i" == "$((NUMBER_OF_NODES-1))" ]]; then local_detach=$DETACH; fi
echo -e "\033[34;1mINFO: building $CLUSTER container\033[0m"
echo 'cluster is' $CLUSTER
docker build \
--file=.ci/$CLUSTER/Dockerfile \
--build-arg SECURE_INTEGRATION=false \
--tag=$CLUSTER \
--build-arg SECURE_INTEGRATION=$SECURE_INTEGRATION \
--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" \
@@ -84,13 +88,13 @@ END
--ulimit nofile=65536:65536 \
--ulimit memlock=-1:-1 \
--detach="$local_detach" \
--health-cmd="curl -vvv -s --fail $opensearch_url/_cluster/health || exit 1" \
--health-cmd="$(echo $healthcmd)" \
--health-interval=2s \
--health-retries=20 \
--health-timeout=2s \
--rm \
-d \
$CLUSTER;
$CLUSTER-secure-$SECURE_INTEGRATION;
set +x
if wait_for_container "$opensearch_node_name" "$network_name"; then
+8 -2
View File
@@ -8,13 +8,19 @@
export TEST_SUITE="${TEST_SUITE:=oss}"
export PYTHON_VERSION="${PYTHON_VERSION:=3.9}"
export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=Urllib3HttpConnection}"
export OPENSEARCH_URL_EXTENSION="${OPENSEARCH_URL_EXTENSION:=http}"
export CLUSTER="${1:=opensearch}"
export CLUSTER="${1:-opensearch}"
export SECURE_INTEGRATION="${2:-false}"
if [[ "$SECURE_INTEGRATION" == "true" ]]; then
export OPENSEARCH_URL_EXTENSION="https"
else
export OPENSEARCH_URL_EXTENSION="http"
fi
script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail
echo -e "\033[1m>>>>> Start server container >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
DETACH=true bash .ci/run-opensearch.sh
if [[ -n "$RUNSCRIPTS" ]]; then