Skip to content

Commit 38a1cf5

Browse files
committed
hsearch-quarkus: upgrade to Quarkus 2.12.2
1 parent 5b7c00b commit 38a1cf5

File tree

13 files changed

+316
-151
lines changed

13 files changed

+316
-151
lines changed

hibernate-search/hsearch-quarkus/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ Execute the following command:
3232

3333
## Building and running the application as a native binary in a container
3434

35-
Build the container containing the native binary with:
35+
Build the native binary with:
3636

3737
```
38-
docker build -f src/main/docker/Dockerfile.multistage -t hibernate/hsearch-quarkus .
38+
./mvnw package -Pnative
39+
```
40+
41+
Then build the container containing the native binary with:
42+
43+
```
44+
docker build -f src/main/docker/Dockerfile.native -t quarkus/hsearch-quarkus .
3945
```
4046

4147
Then run the container along with PostgreSQL and Elasticsearch with:

hibernate-search/hsearch-quarkus/environment-stack.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.4'
21
services:
32
pg01:
43
image: postgres:12.0
@@ -10,54 +9,74 @@ services:
109
- pgdata01:/var/lib/postgresql/data
1110
ports:
1211
- 5432:5432
12+
healthcheck:
13+
test: ["CMD", "bash", "-c", "psql -U hsearch_demo hsearch_demo"]
14+
interval: 5s
15+
timeout: 5s
16+
retries: 5
17+
start_period: 10s
1318
networks:
1419
- pgnet
1520
es01:
16-
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
21+
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
1722
environment:
1823
- node.name=es01
1924
- discovery.seed_hosts=es02
2025
- cluster.initial_master_nodes=es01,es02
2126
- cluster.name=docker-cluster
2227
- bootstrap.memory_lock=true
2328
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
29+
# Stop Elasticsearch from complaining of *relative* low free space on large disks
30+
- cluster.routing.allocation.disk.watermark.low=1gb
31+
- cluster.routing.allocation.disk.watermark.high=500mb
32+
- cluster.routing.allocation.disk.watermark.flood_stage=200mb
2433
ulimits:
2534
memlock:
2635
soft: -1
2736
hard: -1
37+
nofile:
38+
soft: 65536
39+
hard: 65536
2840
volumes:
2941
- esdata01:/usr/share/elasticsearch/data
3042
healthcheck:
3143
test: ["CMD", "curl", "-f", "http://localhost:9200"]
3244
interval: 5s
33-
timeout: 1s
34-
retries: 3
35-
start_period: 5s
45+
timeout: 5s
46+
retries: 5
47+
start_period: 10s
3648
ports:
3749
- 9200:9200
3850
networks:
3951
- esnet
4052
es02:
41-
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
53+
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
4254
environment:
4355
- node.name=es02
4456
- discovery.seed_hosts=es01
4557
- cluster.initial_master_nodes=es01,es02
4658
- cluster.name=docker-cluster
4759
- bootstrap.memory_lock=true
4860
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
61+
# Stop Elasticsearch from complaining of *relative* low free space on large disks
62+
- cluster.routing.allocation.disk.watermark.low=1gb
63+
- cluster.routing.allocation.disk.watermark.high=500mb
64+
- cluster.routing.allocation.disk.watermark.flood_stage=200mb
4965
ulimits:
5066
memlock:
5167
soft: -1
5268
hard: -1
69+
nofile:
70+
soft: 65536
71+
hard: 65536
5372
volumes:
5473
- esdata02:/usr/share/elasticsearch/data
5574
healthcheck:
5675
test: ["CMD", "curl", "-f", "http://localhost:9200"]
5776
interval: 5s
58-
timeout: 1s
59-
retries: 3
60-
start_period: 5s
77+
timeout: 5s
78+
retries: 5
79+
start_period: 10s
6180
networks:
6281
- esnet
6382

hibernate-search/hsearch-quarkus/hsearch-quarkus.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
version: '3.4'
21
services:
32
hsearch-quarkus:
43
image: quarkus/hsearch-quarkus:latest
54
depends_on:
6-
- pg01
7-
- es01
8-
- es02
5+
pg01:
6+
condition: service_healthy
7+
es01:
8+
condition: service_healthy
9+
es02:
10+
condition: service_healthy
911
environment:
1012
- POSTGRES_HOST=pg01
1113
- POSTGRES_DB=hsearch_demo
1214
- POSTGRES_USER=hsearch_demo
1315
- POSTGRES_PASSWORD=hsearch_demo
14-
- ES_HOSTS=http://es01:9200,http://es02:9200
16+
- ES_HOSTS=es01:9200,es02:9200
17+
- ES_PROTOCOL=http
1518
ports:
1619
- 8080:8080
1720
networks:
@@ -27,58 +30,78 @@ services:
2730
- 5432:5432
2831
volumes:
2932
- pgdata01:/var/lib/postgresql/data
33+
healthcheck:
34+
test: ["CMD", "bash", "-c", "psql -U hsearch_demo hsearch_demo"]
35+
interval: 5s
36+
timeout: 5s
37+
retries: 5
38+
start_period: 10s
3039
networks:
3140
pgnet:
3241
aliases:
3342
- pg01
3443
es01:
35-
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
44+
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
3645
environment:
3746
- node.name=es01
3847
- discovery.seed_hosts=es02
3948
- cluster.initial_master_nodes=es01,es02
4049
- cluster.name=docker-cluster
4150
- bootstrap.memory_lock=true
4251
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
52+
# Stop Elasticsearch from complaining of *relative* low free space on large disks
53+
- cluster.routing.allocation.disk.watermark.low=1gb
54+
- cluster.routing.allocation.disk.watermark.high=500mb
55+
- cluster.routing.allocation.disk.watermark.flood_stage=200mb
4356
ports:
4457
- 9200:9200
4558
ulimits:
4659
memlock:
4760
soft: -1
4861
hard: -1
62+
nofile:
63+
soft: 65536
64+
hard: 65536
4965
volumes:
5066
- esdata01:/usr/share/elasticsearch/data
5167
healthcheck:
5268
test: ["CMD", "curl", "-f", "http://localhost:9200"]
5369
interval: 5s
54-
timeout: 1s
55-
retries: 3
56-
start_period: 5s
70+
timeout: 5s
71+
retries: 5
72+
start_period: 10s
5773
networks:
5874
esnet:
5975
aliases:
6076
- es01
6177
es02:
62-
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
78+
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
6379
environment:
6480
- node.name=es02
6581
- discovery.seed_hosts=es01
6682
- cluster.initial_master_nodes=es01,es02
6783
- cluster.name=docker-cluster
6884
- bootstrap.memory_lock=true
6985
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
86+
# Stop Elasticsearch from complaining of *relative* low free space on large disks
87+
- cluster.routing.allocation.disk.watermark.low=1gb
88+
- cluster.routing.allocation.disk.watermark.high=500mb
89+
- cluster.routing.allocation.disk.watermark.flood_stage=200mb
7090
ulimits:
7191
memlock:
7292
soft: -1
7393
hard: -1
94+
nofile:
95+
soft: 65536
96+
hard: 65536
7497
volumes:
7598
- esdata02:/usr/share/elasticsearch/data
7699
healthcheck:
77100
test: ["CMD", "curl", "-f", "http://localhost:9200"]
78101
interval: 5s
79-
timeout: 1s
80-
retries: 3
81-
start_period: 5s
102+
timeout: 5s
103+
retries: 5
104+
start_period: 10s
82105
networks:
83106
esnet:
84107
aliases:

hibernate-search/hsearch-quarkus/pom.xml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,25 @@
66
<artifactId>hsearch-quarkus</artifactId>
77
<version>1.0-SNAPSHOT</version>
88
<properties>
9-
<org.mapstruct.version>1.3.1.Final</org.mapstruct.version>
10-
<maven.compiler.parameters>true</maven.compiler.parameters>
119
<compiler-plugin.version>3.8.1</compiler-plugin.version>
12-
<surefire-plugin.version>2.22.0</surefire-plugin.version>
13-
<maven.compiler.target>1.8</maven.compiler.target>
14-
<quarkus.version>1.0.0.CR1</quarkus.version>
15-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
10+
<maven.compiler.parameters>true</maven.compiler.parameters>
11+
<maven.compiler.source>11</maven.compiler.source>
12+
<maven.compiler.target>11</maven.compiler.target>
1613
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17-
<maven.compiler.source>1.8</maven.compiler.source>
14+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
15+
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
16+
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
17+
<quarkus.platform.version>2.12.2.Final</quarkus.platform.version>
18+
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
19+
20+
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
1821
</properties>
1922
<dependencyManagement>
2023
<dependencies>
2124
<dependency>
22-
<groupId>io.quarkus</groupId>
23-
<artifactId>quarkus-bom</artifactId>
24-
<version>${quarkus.version}</version>
25+
<groupId>${quarkus.platform.group-id}</groupId>
26+
<artifactId>${quarkus.platform.artifact-id}</artifactId>
27+
<version>${quarkus.platform.version}</version>
2528
<type>pom</type>
2629
<scope>import</scope>
2730
</dependency>
@@ -61,15 +64,15 @@
6164
</dependency>
6265
<dependency>
6366
<groupId>io.quarkus</groupId>
64-
<artifactId>quarkus-hibernate-search-elasticsearch</artifactId>
67+
<artifactId>quarkus-hibernate-search-orm-elasticsearch</artifactId>
6568
</dependency>
6669
</dependencies>
6770
<build>
6871
<plugins>
6972
<plugin>
70-
<groupId>io.quarkus</groupId>
73+
<groupId>${quarkus.platform.group-id}</groupId>
7174
<artifactId>quarkus-maven-plugin</artifactId>
72-
<version>${quarkus.version}</version>
75+
<version>${quarkus.platform.version}</version>
7376
<executions>
7477
<execution>
7578
<goals>

hibernate-search/hsearch-quarkus/src/container/wait-for-backends.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)