File tree Expand file tree Collapse file tree 5 files changed +30
-22
lines changed
metadata-io/src/test/java/io/datahubproject/test/search Expand file tree Collapse file tree 5 files changed +30
-22
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ function create_if_not_exists {
8989
9090 else
9191 # when `USE_AWS_ELASTICSEARCH` was forgotten to be set to `true` when running against AWS ES OSS,
92- # this script will use wrong paths (e.g. `_ilm/policy/` instead of AWS-compatible `_opendistro /_ism/policies/`)
92+ # this script will use wrong paths (e.g. `_ilm/policy/` instead of AWS-compatible `_plugins /_ism/policies/`)
9393 # and the ES endpoint will return `401 Unauthorized` or `405 Method Not Allowed`
9494 # let's use this as chance to point that wrong config might be used!
9595 if [ $RESOURCE_STATUS -eq 401 ] || [ $RESOURCE_STATUS -eq 405 ]; then
@@ -148,11 +148,11 @@ function create_datahub_usage_event_datastream() {
148148function create_datahub_usage_event_aws_elasticsearch() {
149149 # AWS env requires creation of three resources for Datahub usage events:
150150 # 1. ISM policy
151- create_if_not_exists " _opendistro /_ism/policies/${PREFIX} datahub_usage_event_policy" aws_es_ism_policy.json
151+ create_if_not_exists " _plugins /_ism/policies/${PREFIX} datahub_usage_event_policy" aws_es_ism_policy.json
152152
153153 # 1.1 ISM policy update if it already existed
154154 if [ $RESOURCE_STATUS -eq 200 ]; then
155- update_ism_policy " _opendistro /_ism/policies/${PREFIX} datahub_usage_event_policy" aws_es_ism_policy.json
155+ update_ism_policy " _plugins /_ism/policies/${PREFIX} datahub_usage_event_policy" aws_es_ism_policy.json
156156 fi
157157
158158 # 2. index template
Original file line number Diff line number Diff line change 11ES_JAVA_OPTS = " -Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true"
2- OPENSEARCH_JAVA_OPTS = " -Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true"
2+ OPENSEARCH_JAVA_OPTS = " -Xms768m -Xmx1024m -Dlog4j2.formatMsgNoLookups=true"
3+ DISABLE_SECURITY_PLUGIN = " true"
Original file line number Diff line number Diff line change @@ -397,25 +397,25 @@ services:
397397 opensearch :
398398 profiles : *opensearch-profiles
399399 hostname : search
400- image : ${DATAHUB_SEARCH_IMAGE:-opensearchproject/opensearch}:${DATAHUB_SEARCH_TAG:-2.11 .0}
400+ image : ${DATAHUB_SEARCH_IMAGE:-opensearchproject/opensearch}:${DATAHUB_SEARCH_TAG:-2.17 .0}
401401 ports :
402402 - ${DATAHUB_MAPPED_ELASTIC_PORT:-9200}:9200
403403 env_file : elasticsearch/env/docker.env
404404 environment :
405405 - discovery.type=single-node
406- - ${XPACK_SECURITY_ENABLED:-plugins.security.disabled =true}
406+ - DISABLE_SECURITY_PLUGIN =true
407407 deploy :
408408 resources :
409409 limits :
410- memory : 1G
410+ memory : 2G
411411 healthcheck :
412412 test : curl -sS --fail http://search:$${DATAHUB_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
413- start_period : 30s
414- interval : 1s
415- retries : 3
416- timeout : 5s
413+ start_period : 60s
414+ interval : 5s
415+ retries : 10
416+ timeout : 15s
417417 volumes :
418- - osdata:/usr/share/elasticsearch /data
418+ - osdata:/usr/share/opensearch /data
419419 opensearch-setup : &opensearch-setup
420420 << : *elasticsearch-setup-dev
421421 profiles : *opensearch-profiles-quickstart
@@ -427,6 +427,7 @@ services:
427427 depends_on :
428428 opensearch :
429429 condition : service_healthy
430+ command : /bin/sh -c "sleep 10 && /create-indices.sh"
430431 labels :
431432 datahub_setup_job : true
432433 opensearch-setup-dev :
@@ -440,6 +441,7 @@ services:
440441 depends_on :
441442 opensearch :
442443 condition : service_healthy
444+ command : /bin/sh -c "sleep 10 && /create-indices.sh"
443445 aws-localstack :
444446 profiles : *aws-profiles
445447 hostname : localstack
Original file line number Diff line number Diff line change @@ -315,22 +315,22 @@ services:
315315 deploy :
316316 resources :
317317 limits :
318- memory : ' 1073741824 '
318+ memory : ' 2147483648 '
319319 environment :
320+ DISABLE_SECURITY_PLUGIN : ' true'
320321 ES_JAVA_OPTS : -Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
321- OPENSEARCH_JAVA_OPTS : -Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
322+ OPENSEARCH_JAVA_OPTS : -Xms768m -Xmx1024m -Dlog4j2.formatMsgNoLookups=true
322323 discovery.type : single-node
323- plugins.security.disabled : ' true'
324324 hostname : search
325325 healthcheck :
326326 test :
327327 - CMD-SHELL
328328 - curl -sS --fail http://search:$${DATAHUB_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
329- timeout : 5s
330- interval : 1s
331- retries : 3
332- start_period : 30s
333- image : opensearchproject/opensearch:2.11 .0
329+ timeout : 15s
330+ interval : 5s
331+ retries : 10
332+ start_period : 1m0s
333+ image : opensearchproject/opensearch:2.17 .0
334334 networks :
335335 default : null
336336 ports :
@@ -341,7 +341,7 @@ services:
341341 volumes :
342342 - type : volume
343343 source : osdata
344- target : /usr/share/elasticsearch /data
344+ target : /usr/share/opensearch /data
345345 volume : {}
346346 opensearch-setup :
347347 profiles :
@@ -355,6 +355,10 @@ services:
355355 - quickstart-postgres-cdc
356356 - quickstart-consumers
357357 - quickstart-consumers-cdc
358+ command :
359+ - /bin/sh
360+ - -c
361+ - sleep 10 && /create-indices.sh
358362 depends_on :
359363 opensearch :
360364 condition : service_healthy
Original file line number Diff line number Diff line change 77import org .testcontainers .utility .DockerImageName ;
88
99public class OpenSearchTestContainer implements SearchTestContainer {
10- private static final String OPENSEARCH_VERSION = "2.11 .0" ;
10+ private static final String OPENSEARCH_VERSION = "2.17 .0" ;
1111 private static final String OPENSEARCH_IMAGE_NAME = "opensearchproject/opensearch" ;
1212 private static final String ENV_OPENSEARCH_IMAGE_FULL_NAME =
1313 System .getenv ("OPENSEARCH_IMAGE_FULL_NAME" );
@@ -31,6 +31,7 @@ public class OpenSearchTestContainer implements SearchTestContainer {
3131 checkContainerEngine (OS_CONTAINER .getDockerClient ());
3232 OS_CONTAINER
3333 .withEnv ("OPENSEARCH_JAVA_OPTS" , SEARCH_JAVA_OPTS )
34+ .withEnv ("DISABLE_SECURITY_PLUGIN" , "true" )
3435 .withStartupTimeout (STARTUP_TIMEOUT );
3536 }
3637
You can’t perform that action at this time.
0 commit comments