From ad9c1182681c0b32a42782c2de9b063aaff79353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Tue, 25 Aug 2020 13:30:47 +0200 Subject: [PATCH] Switch from elasticearch-maven-plugin to docker-maven-plugin to start Elasticsearch for ITs --- build-parent/pom.xml | 14 +- .../elasticsearch-rest-client/pom.xml | 43 ++++-- .../configuration/elasticsearch.yml | 92 ------------- .../configuration/jvm.options | 125 ------------------ .../configuration/log4j2.properties | 36 ----- .../pom.xml | 43 ++++-- .../configuration/elasticsearch.yml | 92 ------------- .../configuration/jvm.options | 125 ------------------ .../configuration/log4j2.properties | 36 ----- .../hibernate-search-elasticsearch/pom.xml | 44 ++++-- .../configuration/elasticsearch.yml | 92 ------------- .../configuration/jvm.options | 125 ------------------ .../configuration/log4j2.properties | 36 ----- .../init/init.script | 6 - 14 files changed, 106 insertions(+), 803 deletions(-) delete mode 100644 integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml delete mode 100644 integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options delete mode 100644 integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties delete mode 100644 integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml delete mode 100644 integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options delete mode 100644 integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties delete mode 100644 integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml delete mode 100644 integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options delete mode 100644 integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties delete mode 100644 integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/init/init.script diff --git a/build-parent/pom.xml b/build-parent/pom.xml index 01f60302dc7373..5ece70ac7f91e3 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -16,8 +16,6 @@ - 6.15 - 7.8.0 4.1.1 @@ -75,6 +73,10 @@ 4.7.2 + + 7.8.0 + docker.elastic.co/elasticsearch/elasticsearch-oss:${elasticsearch-server.version} + 3.0.2 1.11.3 @@ -484,14 +486,6 @@ true - - com.github.alexcojocaru - elasticsearch-maven-plugin - ${elasticsearch-maven-plugin.version} - - ${elasticsearch-server.version} - - org.antlr antlr4-maven-plugin diff --git a/integration-tests/elasticsearch-rest-client/pom.xml b/integration-tests/elasticsearch-rest-client/pom.xml index 5b38225180a5ad..88030b9e3df975 100644 --- a/integration-tests/elasticsearch-rest-client/pom.xml +++ b/integration-tests/elasticsearch-rest-client/pom.xml @@ -92,24 +92,49 @@ - com.github.alexcojocaru - elasticsearch-maven-plugin + io.fabric8 + docker-maven-plugin - 90 - ${project.build.directory}/test-classes/elasticsearch-maven-plugin/configuration/ - true + + + ${elasticsearch.image} + elasticsearch + + + single-node + + + 9200:9200 + + + Elasticsearch: + default + cyan + + + + http://localhost:9200 + GET + 200 + + + + + + + true - - start-elasticsearch + docker-start process-test-classes - runforked + stop + start - stop-elasticsearch + docker-stop post-integration-test stop diff --git a/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml b/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml deleted file mode 100644 index e15abadf05b9d2..00000000000000 --- a/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml +++ /dev/null @@ -1,92 +0,0 @@ -# ======================== Elasticsearch Configuration ========================= -# -# NOTE: Elasticsearch comes with reasonable defaults for most settings. -# Before you set out to tweak and tune the configuration, make sure you -# understand what are you trying to accomplish and the consequences. -# -# The primary way of configuring a node is via this file. This template lists -# the most important settings you may want to configure for a production cluster. -# -# Please consult the documentation for further information on configuration options: -# https://www.elastic.co/guide/en/elasticsearch/reference/index.html -# -# ---------------------------------- Cluster ----------------------------------- -# -# Use a descriptive name for your cluster: -# -#cluster.name: my-application -# -# ------------------------------------ Node ------------------------------------ -# -# Use a descriptive name for the node: -# -#node.name: node-1 -# -# Add custom attributes to the node: -# -#node.attr.rack: r1 -# -# ----------------------------------- Paths ------------------------------------ -# -# Path to directory where to store the data (separate multiple locations by comma): -# -#path.data: /path/to/data -# -# Path to log files: -# -#path.logs: /path/to/logs -# -# ----------------------------------- Memory ----------------------------------- -# -# Lock the memory on startup: -# -bootstrap.memory_lock: true -# -# Make sure that the heap size is set to about half the memory available -# on the system and that the owner of the process is allowed to use this -# limit. -# -# Elasticsearch performs poorly when the system is swapping the memory. -# -# ---------------------------------- Network ----------------------------------- -# -# Set the bind address to a specific IP (IPv4 or IPv6): -# -network.host: _local_ -# -# Set a custom port for HTTP: -# -http.port: 9200 -# -# For more information, consult the network module documentation. -# -# --------------------------------- Discovery ---------------------------------- -# -# Pass an initial list of hosts to perform discovery when this node is started: -# The default list of hosts is ["127.0.0.1", "[::1]"] -# -#discovery.seed_hosts: ["host1", "host2"] -# -# Bootstrap the cluster using an initial set of master-eligible nodes: -# -#cluster.initial_master_nodes: ["node-1", "node-2"] -# -# For more information, consult the discovery and cluster formation module documentation. -# -# ---------------------------------- Gateway ----------------------------------- -# -# Block initial recovery after a full cluster restart until N nodes are started: -# -#gateway.recover_after_nodes: 3 -# -# For more information, consult the gateway module documentation. -# -# ---------------------------------- Various ----------------------------------- -# -# Require explicit names when deleting indices: -# -#action.destructive_requires_name: true -# -# Disable starting multiple nodes on a single system: -# -node.max_local_storage_nodes: 1 diff --git a/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options b/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options deleted file mode 100644 index 91f3f0ee7dd56e..00000000000000 --- a/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options +++ /dev/null @@ -1,125 +0,0 @@ -## JVM configuration - -################################################################ -## IMPORTANT: JVM heap size -################################################################ -## -## You should always set the min and max JVM heap -## size to the same value. For example, to set -## the heap to 4 GB, set: -## -## -Xms4g -## -Xmx4g -## -## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html -## for more information -## -################################################################ - -# Xms represents the initial size of total heap space -# Xmx represents the maximum size of total heap space - -# For Hibernate Search, we don't need as much as the default 2g -# Let's keep it low, so that we'll be able to run tests -# on memory-constrained CI slaves --Xms256m --Xmx256m - -################################################################ -## Expert settings -################################################################ -## -## All settings below this section are considered -## expert settings. Don't tamper with them unless -## you understand what you are doing -## -################################################################ - -## GC configuration --XX:+UseConcMarkSweepGC --XX:CMSInitiatingOccupancyFraction=75 --XX:+UseCMSInitiatingOccupancyOnly - -## G1GC Configuration -# NOTE: G1GC is only supported on JDK version 10 or later. -# To use G1GC uncomment the lines below. -# 10-:-XX:-UseConcMarkSweepGC -# 10-:-XX:-UseCMSInitiatingOccupancyOnly -# 10-:-XX:+UseG1GC -# 10-:-XX:InitiatingHeapOccupancyPercent=75 - -## DNS cache policy -# cache ttl in seconds for positive DNS lookups noting that this overrides the -# JDK security property networkaddress.cache.ttl; set to -1 to cache forever --Des.networkaddress.cache.ttl=60 -# cache ttl in seconds for negative DNS lookups noting that this overrides the -# JDK security property networkaddress.cache.negative ttl; set to -1 to cache -# forever --Des.networkaddress.cache.negative.ttl=10 - -## optimizations - -# pre-touch memory pages used by the JVM during initialization --XX:+AlwaysPreTouch - -## basic - -# explicitly set the stack size --Xss1m - -# set to headless, just in case --Djava.awt.headless=true - -# ensure UTF-8 encoding by default (e.g. filenames) --Dfile.encoding=UTF-8 - -# use our provided JNA always versus the system one --Djna.nosys=true - -# turn off a JDK optimization that throws away stack traces for common -# exceptions because stack traces are important for debugging --XX:-OmitStackTraceInFastThrow - -# flags to configure Netty --Dio.netty.noUnsafe=true --Dio.netty.noKeySetOptimization=true --Dio.netty.recycler.maxCapacityPerThread=0 - -# log4j 2 --Dlog4j.shutdownHookEnabled=false --Dlog4j2.disable.jmx=true - --Djava.io.tmpdir=${ES_TMPDIR} - -## heap dumps - -# generate a heap dump when an allocation from the Java heap fails -# heap dumps are created in the working directory of the JVM --XX:+HeapDumpOnOutOfMemoryError - -# specify an alternative path for heap dumps; ensure the directory exists and -# has sufficient space --XX:HeapDumpPath=data - -# specify an alternative path for JVM fatal error logs --XX:ErrorFile=logs/hs_err_pid%p.log - -## JDK 8 GC logging - -8:-XX:+PrintGCDetails -8:-XX:+PrintGCDateStamps -8:-XX:+PrintTenuringDistribution -8:-XX:+PrintGCApplicationStoppedTime -8:-Xloggc:logs/gc.log -8:-XX:+UseGCLogFileRotation -8:-XX:NumberOfGCLogFiles=32 -8:-XX:GCLogFileSize=64m - -# JDK 9+ GC logging -9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise -# time/date parsing will break in an incompatible way for some date patterns and locals -9-:-Djava.locale.providers=COMPAT - -# temporary workaround for C2 bug with JDK 10 on hardware with AVX-512 -10-:-XX:UseAVX=2 \ No newline at end of file diff --git a/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties b/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties deleted file mode 100644 index e4789c251b25a5..00000000000000 --- a/integration-tests/elasticsearch-rest-client/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties +++ /dev/null @@ -1,36 +0,0 @@ -status = error -appenders = console -loggers = action, metadata, cluster, settings, deprecation, slow_search, slow_indexing - -# log action execution errors for easier debugging -logger.action.name = org.elasticsearch.action -logger.action.level = info - -# do not log metadata too much as we generate a log of noise -logger.metadata.name = org.elasticsearch.cluster.metadata -logger.metadata.level = warn - -logger.cluster.name = org.elasticsearch.cluster.routing.allocation -logger.cluster.level = warn - -logger.settings.name = org.elasticsearch.common.settings -logger.settings.level = warn - -logger.deprecation.name = org.elasticsearch.deprecation -logger.deprecation.level = warn - -# Warn us about using inefficient Search operations -logger.slow_search.name = index.search.slowlog -logger.slow_search.level = trace - -# Warn us about using inefficient indexing actions -logger.slow_indexing.name = index.indexing.slowlog -logger.slow_indexing.level = trace - -appender.console.type = Console -appender.console.name = console -appender.console.layout.type = PatternLayout -appender.console.layout.pattern = %d{ABSOLUTE} (%t) %5p %c{1}:%L - %m%n - -rootLogger.level = info -rootLogger.appenderRef.console.ref = console diff --git a/integration-tests/elasticsearch-rest-high-level-client/pom.xml b/integration-tests/elasticsearch-rest-high-level-client/pom.xml index 20f4b06c6f9bae..7d13df5c0855b4 100644 --- a/integration-tests/elasticsearch-rest-high-level-client/pom.xml +++ b/integration-tests/elasticsearch-rest-high-level-client/pom.xml @@ -93,24 +93,49 @@ - com.github.alexcojocaru - elasticsearch-maven-plugin + io.fabric8 + docker-maven-plugin - 90 - ${project.build.directory}/test-classes/elasticsearch-maven-plugin/configuration/ - true + + + ${elasticsearch.image} + elasticsearch + + + single-node + + + 9200:9200 + + + Elasticsearch: + default + cyan + + + + http://localhost:9200 + GET + 200 + + + + + + + true - - start-elasticsearch + docker-start process-test-classes - runforked + stop + start - stop-elasticsearch + docker-stop post-integration-test stop diff --git a/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml b/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml deleted file mode 100644 index e15abadf05b9d2..00000000000000 --- a/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml +++ /dev/null @@ -1,92 +0,0 @@ -# ======================== Elasticsearch Configuration ========================= -# -# NOTE: Elasticsearch comes with reasonable defaults for most settings. -# Before you set out to tweak and tune the configuration, make sure you -# understand what are you trying to accomplish and the consequences. -# -# The primary way of configuring a node is via this file. This template lists -# the most important settings you may want to configure for a production cluster. -# -# Please consult the documentation for further information on configuration options: -# https://www.elastic.co/guide/en/elasticsearch/reference/index.html -# -# ---------------------------------- Cluster ----------------------------------- -# -# Use a descriptive name for your cluster: -# -#cluster.name: my-application -# -# ------------------------------------ Node ------------------------------------ -# -# Use a descriptive name for the node: -# -#node.name: node-1 -# -# Add custom attributes to the node: -# -#node.attr.rack: r1 -# -# ----------------------------------- Paths ------------------------------------ -# -# Path to directory where to store the data (separate multiple locations by comma): -# -#path.data: /path/to/data -# -# Path to log files: -# -#path.logs: /path/to/logs -# -# ----------------------------------- Memory ----------------------------------- -# -# Lock the memory on startup: -# -bootstrap.memory_lock: true -# -# Make sure that the heap size is set to about half the memory available -# on the system and that the owner of the process is allowed to use this -# limit. -# -# Elasticsearch performs poorly when the system is swapping the memory. -# -# ---------------------------------- Network ----------------------------------- -# -# Set the bind address to a specific IP (IPv4 or IPv6): -# -network.host: _local_ -# -# Set a custom port for HTTP: -# -http.port: 9200 -# -# For more information, consult the network module documentation. -# -# --------------------------------- Discovery ---------------------------------- -# -# Pass an initial list of hosts to perform discovery when this node is started: -# The default list of hosts is ["127.0.0.1", "[::1]"] -# -#discovery.seed_hosts: ["host1", "host2"] -# -# Bootstrap the cluster using an initial set of master-eligible nodes: -# -#cluster.initial_master_nodes: ["node-1", "node-2"] -# -# For more information, consult the discovery and cluster formation module documentation. -# -# ---------------------------------- Gateway ----------------------------------- -# -# Block initial recovery after a full cluster restart until N nodes are started: -# -#gateway.recover_after_nodes: 3 -# -# For more information, consult the gateway module documentation. -# -# ---------------------------------- Various ----------------------------------- -# -# Require explicit names when deleting indices: -# -#action.destructive_requires_name: true -# -# Disable starting multiple nodes on a single system: -# -node.max_local_storage_nodes: 1 diff --git a/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options b/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options deleted file mode 100644 index 91f3f0ee7dd56e..00000000000000 --- a/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options +++ /dev/null @@ -1,125 +0,0 @@ -## JVM configuration - -################################################################ -## IMPORTANT: JVM heap size -################################################################ -## -## You should always set the min and max JVM heap -## size to the same value. For example, to set -## the heap to 4 GB, set: -## -## -Xms4g -## -Xmx4g -## -## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html -## for more information -## -################################################################ - -# Xms represents the initial size of total heap space -# Xmx represents the maximum size of total heap space - -# For Hibernate Search, we don't need as much as the default 2g -# Let's keep it low, so that we'll be able to run tests -# on memory-constrained CI slaves --Xms256m --Xmx256m - -################################################################ -## Expert settings -################################################################ -## -## All settings below this section are considered -## expert settings. Don't tamper with them unless -## you understand what you are doing -## -################################################################ - -## GC configuration --XX:+UseConcMarkSweepGC --XX:CMSInitiatingOccupancyFraction=75 --XX:+UseCMSInitiatingOccupancyOnly - -## G1GC Configuration -# NOTE: G1GC is only supported on JDK version 10 or later. -# To use G1GC uncomment the lines below. -# 10-:-XX:-UseConcMarkSweepGC -# 10-:-XX:-UseCMSInitiatingOccupancyOnly -# 10-:-XX:+UseG1GC -# 10-:-XX:InitiatingHeapOccupancyPercent=75 - -## DNS cache policy -# cache ttl in seconds for positive DNS lookups noting that this overrides the -# JDK security property networkaddress.cache.ttl; set to -1 to cache forever --Des.networkaddress.cache.ttl=60 -# cache ttl in seconds for negative DNS lookups noting that this overrides the -# JDK security property networkaddress.cache.negative ttl; set to -1 to cache -# forever --Des.networkaddress.cache.negative.ttl=10 - -## optimizations - -# pre-touch memory pages used by the JVM during initialization --XX:+AlwaysPreTouch - -## basic - -# explicitly set the stack size --Xss1m - -# set to headless, just in case --Djava.awt.headless=true - -# ensure UTF-8 encoding by default (e.g. filenames) --Dfile.encoding=UTF-8 - -# use our provided JNA always versus the system one --Djna.nosys=true - -# turn off a JDK optimization that throws away stack traces for common -# exceptions because stack traces are important for debugging --XX:-OmitStackTraceInFastThrow - -# flags to configure Netty --Dio.netty.noUnsafe=true --Dio.netty.noKeySetOptimization=true --Dio.netty.recycler.maxCapacityPerThread=0 - -# log4j 2 --Dlog4j.shutdownHookEnabled=false --Dlog4j2.disable.jmx=true - --Djava.io.tmpdir=${ES_TMPDIR} - -## heap dumps - -# generate a heap dump when an allocation from the Java heap fails -# heap dumps are created in the working directory of the JVM --XX:+HeapDumpOnOutOfMemoryError - -# specify an alternative path for heap dumps; ensure the directory exists and -# has sufficient space --XX:HeapDumpPath=data - -# specify an alternative path for JVM fatal error logs --XX:ErrorFile=logs/hs_err_pid%p.log - -## JDK 8 GC logging - -8:-XX:+PrintGCDetails -8:-XX:+PrintGCDateStamps -8:-XX:+PrintTenuringDistribution -8:-XX:+PrintGCApplicationStoppedTime -8:-Xloggc:logs/gc.log -8:-XX:+UseGCLogFileRotation -8:-XX:NumberOfGCLogFiles=32 -8:-XX:GCLogFileSize=64m - -# JDK 9+ GC logging -9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise -# time/date parsing will break in an incompatible way for some date patterns and locals -9-:-Djava.locale.providers=COMPAT - -# temporary workaround for C2 bug with JDK 10 on hardware with AVX-512 -10-:-XX:UseAVX=2 \ No newline at end of file diff --git a/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties b/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties deleted file mode 100644 index e4789c251b25a5..00000000000000 --- a/integration-tests/elasticsearch-rest-high-level-client/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties +++ /dev/null @@ -1,36 +0,0 @@ -status = error -appenders = console -loggers = action, metadata, cluster, settings, deprecation, slow_search, slow_indexing - -# log action execution errors for easier debugging -logger.action.name = org.elasticsearch.action -logger.action.level = info - -# do not log metadata too much as we generate a log of noise -logger.metadata.name = org.elasticsearch.cluster.metadata -logger.metadata.level = warn - -logger.cluster.name = org.elasticsearch.cluster.routing.allocation -logger.cluster.level = warn - -logger.settings.name = org.elasticsearch.common.settings -logger.settings.level = warn - -logger.deprecation.name = org.elasticsearch.deprecation -logger.deprecation.level = warn - -# Warn us about using inefficient Search operations -logger.slow_search.name = index.search.slowlog -logger.slow_search.level = trace - -# Warn us about using inefficient indexing actions -logger.slow_indexing.name = index.indexing.slowlog -logger.slow_indexing.level = trace - -appender.console.type = Console -appender.console.name = console -appender.console.layout.type = PatternLayout -appender.console.layout.pattern = %d{ABSOLUTE} (%t) %5p %c{1}:%L - %m%n - -rootLogger.level = info -rootLogger.appenderRef.console.ref = console diff --git a/integration-tests/hibernate-search-elasticsearch/pom.xml b/integration-tests/hibernate-search-elasticsearch/pom.xml index 9a223b265f1cfa..dd5d3d677c7899 100644 --- a/integration-tests/hibernate-search-elasticsearch/pom.xml +++ b/integration-tests/hibernate-search-elasticsearch/pom.xml @@ -112,25 +112,49 @@ - com.github.alexcojocaru - elasticsearch-maven-plugin + io.fabric8 + docker-maven-plugin - 90 - ${project.build.directory}/test-classes/elasticsearch-maven-plugin/configuration/ - ${project.build.directory}/test-classes/elasticsearch-maven-plugin/init/init.script - true + + + ${elasticsearch.image} + elasticsearch + + + single-node + + + 9200:9200 + + + Elasticsearch: + default + cyan + + + + http://localhost:9200 + GET + 200 + + + + + + + true - - start-elasticsearch + docker-start process-test-classes - runforked + stop + start - stop-elasticsearch + docker-stop post-integration-test stop diff --git a/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml b/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml deleted file mode 100644 index e15abadf05b9d2..00000000000000 --- a/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/elasticsearch.yml +++ /dev/null @@ -1,92 +0,0 @@ -# ======================== Elasticsearch Configuration ========================= -# -# NOTE: Elasticsearch comes with reasonable defaults for most settings. -# Before you set out to tweak and tune the configuration, make sure you -# understand what are you trying to accomplish and the consequences. -# -# The primary way of configuring a node is via this file. This template lists -# the most important settings you may want to configure for a production cluster. -# -# Please consult the documentation for further information on configuration options: -# https://www.elastic.co/guide/en/elasticsearch/reference/index.html -# -# ---------------------------------- Cluster ----------------------------------- -# -# Use a descriptive name for your cluster: -# -#cluster.name: my-application -# -# ------------------------------------ Node ------------------------------------ -# -# Use a descriptive name for the node: -# -#node.name: node-1 -# -# Add custom attributes to the node: -# -#node.attr.rack: r1 -# -# ----------------------------------- Paths ------------------------------------ -# -# Path to directory where to store the data (separate multiple locations by comma): -# -#path.data: /path/to/data -# -# Path to log files: -# -#path.logs: /path/to/logs -# -# ----------------------------------- Memory ----------------------------------- -# -# Lock the memory on startup: -# -bootstrap.memory_lock: true -# -# Make sure that the heap size is set to about half the memory available -# on the system and that the owner of the process is allowed to use this -# limit. -# -# Elasticsearch performs poorly when the system is swapping the memory. -# -# ---------------------------------- Network ----------------------------------- -# -# Set the bind address to a specific IP (IPv4 or IPv6): -# -network.host: _local_ -# -# Set a custom port for HTTP: -# -http.port: 9200 -# -# For more information, consult the network module documentation. -# -# --------------------------------- Discovery ---------------------------------- -# -# Pass an initial list of hosts to perform discovery when this node is started: -# The default list of hosts is ["127.0.0.1", "[::1]"] -# -#discovery.seed_hosts: ["host1", "host2"] -# -# Bootstrap the cluster using an initial set of master-eligible nodes: -# -#cluster.initial_master_nodes: ["node-1", "node-2"] -# -# For more information, consult the discovery and cluster formation module documentation. -# -# ---------------------------------- Gateway ----------------------------------- -# -# Block initial recovery after a full cluster restart until N nodes are started: -# -#gateway.recover_after_nodes: 3 -# -# For more information, consult the gateway module documentation. -# -# ---------------------------------- Various ----------------------------------- -# -# Require explicit names when deleting indices: -# -#action.destructive_requires_name: true -# -# Disable starting multiple nodes on a single system: -# -node.max_local_storage_nodes: 1 diff --git a/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options b/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options deleted file mode 100644 index 91f3f0ee7dd56e..00000000000000 --- a/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/jvm.options +++ /dev/null @@ -1,125 +0,0 @@ -## JVM configuration - -################################################################ -## IMPORTANT: JVM heap size -################################################################ -## -## You should always set the min and max JVM heap -## size to the same value. For example, to set -## the heap to 4 GB, set: -## -## -Xms4g -## -Xmx4g -## -## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html -## for more information -## -################################################################ - -# Xms represents the initial size of total heap space -# Xmx represents the maximum size of total heap space - -# For Hibernate Search, we don't need as much as the default 2g -# Let's keep it low, so that we'll be able to run tests -# on memory-constrained CI slaves --Xms256m --Xmx256m - -################################################################ -## Expert settings -################################################################ -## -## All settings below this section are considered -## expert settings. Don't tamper with them unless -## you understand what you are doing -## -################################################################ - -## GC configuration --XX:+UseConcMarkSweepGC --XX:CMSInitiatingOccupancyFraction=75 --XX:+UseCMSInitiatingOccupancyOnly - -## G1GC Configuration -# NOTE: G1GC is only supported on JDK version 10 or later. -# To use G1GC uncomment the lines below. -# 10-:-XX:-UseConcMarkSweepGC -# 10-:-XX:-UseCMSInitiatingOccupancyOnly -# 10-:-XX:+UseG1GC -# 10-:-XX:InitiatingHeapOccupancyPercent=75 - -## DNS cache policy -# cache ttl in seconds for positive DNS lookups noting that this overrides the -# JDK security property networkaddress.cache.ttl; set to -1 to cache forever --Des.networkaddress.cache.ttl=60 -# cache ttl in seconds for negative DNS lookups noting that this overrides the -# JDK security property networkaddress.cache.negative ttl; set to -1 to cache -# forever --Des.networkaddress.cache.negative.ttl=10 - -## optimizations - -# pre-touch memory pages used by the JVM during initialization --XX:+AlwaysPreTouch - -## basic - -# explicitly set the stack size --Xss1m - -# set to headless, just in case --Djava.awt.headless=true - -# ensure UTF-8 encoding by default (e.g. filenames) --Dfile.encoding=UTF-8 - -# use our provided JNA always versus the system one --Djna.nosys=true - -# turn off a JDK optimization that throws away stack traces for common -# exceptions because stack traces are important for debugging --XX:-OmitStackTraceInFastThrow - -# flags to configure Netty --Dio.netty.noUnsafe=true --Dio.netty.noKeySetOptimization=true --Dio.netty.recycler.maxCapacityPerThread=0 - -# log4j 2 --Dlog4j.shutdownHookEnabled=false --Dlog4j2.disable.jmx=true - --Djava.io.tmpdir=${ES_TMPDIR} - -## heap dumps - -# generate a heap dump when an allocation from the Java heap fails -# heap dumps are created in the working directory of the JVM --XX:+HeapDumpOnOutOfMemoryError - -# specify an alternative path for heap dumps; ensure the directory exists and -# has sufficient space --XX:HeapDumpPath=data - -# specify an alternative path for JVM fatal error logs --XX:ErrorFile=logs/hs_err_pid%p.log - -## JDK 8 GC logging - -8:-XX:+PrintGCDetails -8:-XX:+PrintGCDateStamps -8:-XX:+PrintTenuringDistribution -8:-XX:+PrintGCApplicationStoppedTime -8:-Xloggc:logs/gc.log -8:-XX:+UseGCLogFileRotation -8:-XX:NumberOfGCLogFiles=32 -8:-XX:GCLogFileSize=64m - -# JDK 9+ GC logging -9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise -# time/date parsing will break in an incompatible way for some date patterns and locals -9-:-Djava.locale.providers=COMPAT - -# temporary workaround for C2 bug with JDK 10 on hardware with AVX-512 -10-:-XX:UseAVX=2 \ No newline at end of file diff --git a/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties b/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties deleted file mode 100644 index e4789c251b25a5..00000000000000 --- a/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/configuration/log4j2.properties +++ /dev/null @@ -1,36 +0,0 @@ -status = error -appenders = console -loggers = action, metadata, cluster, settings, deprecation, slow_search, slow_indexing - -# log action execution errors for easier debugging -logger.action.name = org.elasticsearch.action -logger.action.level = info - -# do not log metadata too much as we generate a log of noise -logger.metadata.name = org.elasticsearch.cluster.metadata -logger.metadata.level = warn - -logger.cluster.name = org.elasticsearch.cluster.routing.allocation -logger.cluster.level = warn - -logger.settings.name = org.elasticsearch.common.settings -logger.settings.level = warn - -logger.deprecation.name = org.elasticsearch.deprecation -logger.deprecation.level = warn - -# Warn us about using inefficient Search operations -logger.slow_search.name = index.search.slowlog -logger.slow_search.level = trace - -# Warn us about using inefficient indexing actions -logger.slow_indexing.name = index.indexing.slowlog -logger.slow_indexing.level = trace - -appender.console.type = Console -appender.console.name = console -appender.console.layout.type = PatternLayout -appender.console.layout.pattern = %d{ABSOLUTE} (%t) %5p %c{1}:%L - %m%n - -rootLogger.level = info -rootLogger.appenderRef.console.ref = console diff --git a/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/init/init.script b/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/init/init.script deleted file mode 100644 index 7c20a72b48ffce..00000000000000 --- a/integration-tests/hibernate-search-elasticsearch/src/test/resources/elasticsearch-maven-plugin/init/init.script +++ /dev/null @@ -1,6 +0,0 @@ -PUT:_template/lightweight_index:{ "template" : "*", "order": -9999, "settings" : { "number_of_shards" : 1, "number_of_replicas" : 0 } } -PUT:_template/slowlogs_search_level:{ "template" : "*", "order": -9999, "settings" : { "index.search.slowlog.level": "debug" } } -PUT:_template/slowlogs_indexing_level:{ "template" : "*", "order": -9999, "settings" : { "index.indexing.slowlog.level": "debug" } } -PUT:_template/slowlogs_search_threshold_query:{ "template" : "*", "order": -9999, "settings" : { "index.search.slowlog.threshold.query.warn": "5s", "index.search.slowlog.threshold.query.info": "500ms", "index.search.slowlog.threshold.query.debug": "100ms", "index.search.slowlog.threshold.query.trace": "10ms" } } -PUT:_template/slowlogs_search_threshold_fetch:{ "template" : "*", "order": -9999, "settings" : { "index.search.slowlog.threshold.fetch.warn": "1s", "index.search.slowlog.threshold.fetch.info": "200ms", "index.search.slowlog.threshold.fetch.debug": "100ms", "index.search.slowlog.threshold.fetch.trace": "10ms" } } -PUT:_template/slowlogs_indexing_threshold_index:{ "template" : "*", "order": -9999, "settings" : { "index.indexing.slowlog.threshold.index.warn": "2s", "index.indexing.slowlog.threshold.index.info": "500ms", "index.indexing.slowlog.threshold.index.debug": "100ms", "index.indexing.slowlog.threshold.index.trace": "10ms" } }