diff --git a/.ci/Dockerfile.opendistro.no.security.plugin b/.ci/Dockerfile.opendistro.no.security.plugin new file mode 100644 index 00000000..e9cdcd0f --- /dev/null +++ b/.ci/Dockerfile.opendistro.no.security.plugin @@ -0,0 +1,3 @@ +FROM amazon/opendistro-for-elasticsearch:1.13.2 +RUN /usr/share/elasticsearch/bin/elasticsearch-plugin remove opendistro_security +COPY --chown=elasticsearch:elasticsearch .ci/elasticsearch.yml /usr/share/elasticsearch/config/ diff --git a/.ci/elasticsearch.yml b/.ci/elasticsearch.yml new file mode 100644 index 00000000..50b15470 --- /dev/null +++ b/.ci/elasticsearch.yml @@ -0,0 +1,2 @@ +cluster.name: "docker-cluster" +network.host: 0.0.0.0 diff --git a/.ci/functions/imports.sh b/.ci/functions/imports.sh index c2ba2a4d..daed6406 100755 --- a/.ci/functions/imports.sh +++ b/.ci/functions/imports.sh @@ -25,7 +25,7 @@ if [[ -z $es_node_name ]]; then export es_node_name=instance export elastic_password=changeme - export elasticsearch_image=elasticsearch-oss + export elasticsearch_image=opendistro-for-elasticsearch export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200 if [[ $TEST_SUITE != "platinum" ]]; then export elasticsearch_url=http://${es_node_name}:9200 diff --git a/.ci/run-elasticsearch.sh b/.ci/run-elasticsearch.sh index fd49c6f8..7d2bb573 100755 --- a/.ci/run-elasticsearch.sh +++ b/.ci/run-elasticsearch.sh @@ -65,7 +65,7 @@ fi docker_pull_attempts=0 until [ "$docker_pull_attempts" -ge 5 ] do - docker pull docker.elastic.co/elasticsearch/"$elasticsearch_container" && break + docker pull amazon/"$elasticsearch_container" && break docker_pull_attempts=$((docker_pull_attempts+1)) echo "Failed to pull image, retrying in 10 seconds (retry $docker_pull_attempts/5)..." sleep 10 @@ -91,6 +91,14 @@ END # make sure we detach for all but the last node if DETACH=false (default) so all nodes are started local_detach="true" if [[ "$i" == "$((NUMBER_OF_NODES-1))" ]]; then local_detach=$DETACH; fi + + + echo -e "\033[34;1mINFO: building odfe-no-security-plugin container\033[0m" + docker build \ + --file=.ci/Dockerfile.opendistro.no.security.plugin \ + --tag=odfe-no-security-plugin \ + . + echo -e "\033[34;1mINFO:\033[0m Starting container $node_name \033[0m" set -x docker run \ @@ -108,7 +116,7 @@ END --health-retries=20 \ --health-timeout=2s \ --rm \ - docker.elastic.co/elasticsearch/"$elasticsearch_container"; + odfe-no-security-plugin; set +x if wait_for_container "$es_node_name" "$network_name"; then diff --git a/.ci/run-tests b/.ci/run-tests index 9e1257d4..c5739ac6 100755 --- a/.ci/run-tests +++ b/.ci/run-tests @@ -5,7 +5,7 @@ # - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products # Default environment variables -export STACK_VERSION="${STACK_VERSION:=7.10.2}" +export STACK_VERSION="${STACK_VERSION:=1.13.2}" export TEST_SUITE="${TEST_SUITE:=free}" export PYTHON_VERSION="${PYTHON_VERSION:=3.9}" export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=Urllib3HttpConnection}"