Skip to content

Commit

Permalink
Merge pull request #31997 from yrodiere/elasticsearch-8
Browse files Browse the repository at this point in the history
Delete elasticsearch-high-level-rest-client extension and upgrade dev-services and tests to Elasticsearch 8
  • Loading branch information
yrodiere authored Aug 7, 2023
2 parents 80f7095 + c4aa937 commit 33482f5
Show file tree
Hide file tree
Showing 57 changed files with 94 additions and 1,210 deletions.
2 changes: 1 addition & 1 deletion .github/native-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
"category": "Data6",
"timeout": 95,
"test-modules": "elasticsearch-rest-client, elasticsearch-rest-high-level-client, elasticsearch-java-client, hibernate-search-orm-elasticsearch, hibernate-search-orm-elasticsearch-tenancy, hibernate-search-orm-opensearch, hibernate-search-orm-elasticsearch-coordination-outbox-polling",
"test-modules": "elasticsearch-rest-client, elasticsearch-java-client, hibernate-search-orm-elasticsearch, hibernate-search-orm-elasticsearch-tenancy, hibernate-search-orm-opensearch, hibernate-search-orm-elasticsearch-coordination-outbox-polling",
"os-name": "ubuntu-latest"
},
{
Expand Down
24 changes: 0 additions & 24 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@
<agroal.version>2.1</agroal.version>
<jboss-transaction-spi.version>8.0.0.Final</jboss-transaction-spi.version>
<elasticsearch-opensource-components.version>8.8.2</elasticsearch-opensource-components.version>
<!-- for the now proprietary components of Elasticsearch, we use the last Open Source version -->
<elasticsearch-proprietary-components-keeping-old-opensource-version.version>7.10.2</elasticsearch-proprietary-components-keeping-old-opensource-version.version>
<rxjava.version>2.2.21</rxjava.version>
<wildfly.openssl-java.version>2.2.5.Final</wildfly.openssl-java.version>
<wildfly.openssl-linux.version>2.2.2.Final</wildfly.openssl-linux.version>
Expand Down Expand Up @@ -753,16 +751,6 @@
<artifactId>quarkus-elasticsearch-rest-client-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-elasticsearch-rest-high-level-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-elasticsearch-rest-high-level-client-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-elasticsearch-java-client</artifactId>
Expand Down Expand Up @@ -5765,18 +5753,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>${elasticsearch-proprietary-components-keeping-old-opensource-version.version}</version>
<exclusions>
<!-- exclude log4j2 to get its version from log4j2-jboss-logmanager -->
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client-sniffer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<volume.access.modifier>:Z</volume.access.modifier>

<!-- Defaults for integration tests -->
<elasticsearch-server.version>7.16.3</elasticsearch-server.version>
<elasticsearch-server.version>8.8.2</elasticsearch-server.version>
<elasticsearch.image>docker.io/elastic/elasticsearch:${elasticsearch-server.version}</elasticsearch.image>
<logstash.image>docker.io/elastic/logstash:${elasticsearch-server.version}</logstash.image>
<kibana.image>docker.io/elastic/kibana:${elasticsearch-server.version}</kibana.image>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public interface Capability {
String MONGODB_PANACHE = QUARKUS_PREFIX + ".mongodb.panache";
String MONGODB_PANACHE_KOTLIN = MONGODB_PANACHE + ".kotlin";

String ELASTICSEARCH_REST_HIGH_LEVEL_CLIENT = QUARKUS_PREFIX + ".elasticsearch-rest-high-level-client";

String FLYWAY = QUARKUS_PREFIX + ".flyway";
String LIQUIBASE = QUARKUS_PREFIX + ".liquibase";

Expand Down
13 changes: 0 additions & 13 deletions devtools/bom-descriptor-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -473,19 +473,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-elasticsearch-rest-high-level-client</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-elytron-security</artifactId>
Expand Down
13 changes: 0 additions & 13 deletions docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -487,19 +487,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-elasticsearch-rest-high-level-client-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-elytron-security-deployment</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions docs/src/main/asciidoc/centralized-log-management.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ services:
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
cluster.routing.allocation.disk.threshold_enabled: false
networks:
- graylog
Expand Down Expand Up @@ -197,6 +198,7 @@ services:
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
cluster.routing.allocation.disk.threshold_enabled: false
networks:
- elk
Expand Down Expand Up @@ -286,6 +288,7 @@ services:
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
cluster.routing.allocation.disk.threshold_enabled: false
networks:
- efk
Expand Down Expand Up @@ -372,6 +375,8 @@ services:
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
cluster.routing.allocation.disk.threshold_enabled: false
networks:
- efk
Expand Down
7 changes: 3 additions & 4 deletions docs/src/main/asciidoc/elasticsearch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ Quarkus provides two ways of accessing Elasticsearch:
[WARNING]
====
A third Quarkus extension for the "high level REST Client" exists, but is deprecated and will be removed in a future version,
as this client has been deprecated by Elastic and has some licensing issues.
It is highly recommended to upgrade to the new Elasticsearch Java client extension.
A third Quarkus extension for the "high level REST Client" used to exist,
but was removed as this client has been deprecated by Elastic and has some licensing issues.
====

== Prerequisites
Expand Down Expand Up @@ -352,6 +350,7 @@ If you want to use Docker to run an Elasticsearch instance, you can use the foll
[source,bash,subs=attributes+]
----
docker run --name elasticsearch -e "discovery.type=single-node" -e "ES_JAVA_OPTS=-Xms512m -Xmx512m"\
-e "cluster.routing.allocation.disk.threshold_enabled=false"
--rm -p 9200:9200 {elasticsearch-image}
----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ quarkus.datasource.db-kind=postgresql <2>
quarkus.hibernate-orm.sql-load-script=import.sql <3>
quarkus.hibernate-search-orm.elasticsearch.version=7 <4>
quarkus.hibernate-search-orm.elasticsearch.version=8 <4>
quarkus.hibernate-search-orm.indexing.plan.synchronization.strategy=sync <5>
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test <6>
Expand Down Expand Up @@ -786,7 +786,7 @@ quarkus.datasource.db-kind=h2
quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1
quarkus.hibernate-search-orm.elasticsearch.hosts=es1.mycompany.com:9200
quarkus.hibernate-search-orm.elasticsearch.version=7
quarkus.hibernate-search-orm.elasticsearch.version=8
----

Using a map based approach, it is also possible to configure named persistence units:
Expand All @@ -806,10 +806,10 @@ quarkus.hibernate-orm."inventory".datasource=inventory <4>
quarkus.hibernate-orm."inventory".packages=org.acme.model.inventory
quarkus.hibernate-search-orm."users".elasticsearch.hosts=es1.mycompany.com:9200 <5>
quarkus.hibernate-search-orm."users".elasticsearch.version=7
quarkus.hibernate-search-orm."users".elasticsearch.version=8
quarkus.hibernate-search-orm."inventory".elasticsearch.hosts=es2.mycompany.com:9200 <6>
quarkus.hibernate-search-orm."inventory".elasticsearch.version=7
quarkus.hibernate-search-orm."inventory".elasticsearch.version=8
----
<1> Define a datasource named `users`.
<2> Define a datasource named `inventory`.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/native-and-ssl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ As SSL is de facto the standard nowadays, we decided to enable its support autom
* the Agroal connection pooling extension (`quarkus-agroal`),
* the Amazon Services extension (`quarkus-amazon-*`),
* the Consul Config extension (`quarkus-config-consul`),
* the Elasticsearch client extensions (`quarkus-elasticsearch-rest-client` and `quarkus-elasticsearch-rest-high-level-client`) and thus the Hibernate Search Elasticsearch extension (`quarkus-hibernate-search-orm-elasticsearch`),
* the Elasticsearch client extensions (`quarkus-elasticsearch-rest-client` and `quarkus-elasticsearch-java-client`) and thus the Hibernate Search Elasticsearch extension (`quarkus-hibernate-search-orm-elasticsearch`),
* the Elytron Security OAuth2 extension (`quarkus-elytron-security-oauth2`),
* the gRPC extension (`quarkus-grpc`),
* the Infinispan Client extension (`quarkus-infinispan-client`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,16 @@ private DevServicesResultBuildItem.RunningDevService startElasticsearch(
}
timeout.ifPresent(container::withStartupTimeout);

container.withEnv(config.containerEnv);
container.addEnv("ES_JAVA_OPTS", config.javaOpts);
// Disable security as else we would need to configure it correctly to avoid tons of WARNING in the log
container.addEnv("xpack.security.enabled", "false");
// Disable disk-based shard allocation thresholds:
// in a single-node setup they just don't make sense,
// and lead to problems on large disks with little space left.
// See https://www.elastic.co/guide/en/elasticsearch/reference/8.8/modules-cluster.html#disk-based-shard-allocation
container.addEnv("cluster.routing.allocation.disk.threshold_enabled", "false");

container.withEnv(config.containerEnv);

container.start();
return new DevServicesResultBuildItem.RunningDevService(Feature.ELASTICSEARCH_REST_CLIENT_COMMON.getName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class ElasticsearchDevServicesBuildTimeConfig {
* The Elasticsearch container image to use.
* Defaults to the elasticsearch image provided by Elastic.
*/
@ConfigItem(defaultValue = "docker.elastic.co/elasticsearch/elasticsearch:7.17.0")
@ConfigItem(defaultValue = "docker.elastic.co/elasticsearch/elasticsearch:8.8.2")
public String imageName;

/**
Expand Down
58 changes: 0 additions & 58 deletions extensions/elasticsearch-rest-high-level-client/deployment/pom.xml

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions extensions/elasticsearch-rest-high-level-client/pom.xml

This file was deleted.

Loading

0 comments on commit 33482f5

Please sign in to comment.