Skip to content

Commit 548b0da

Browse files
authored
Merge pull request #32 from opendatasoft/chore/sc-52456/prepare-elasticsearch-7-17-24-upgrade
Prepare the plugin to an elasticsearch 7.17.28 upgrade
2 parents 0e9cf08 + a42d097 commit 548b0da

File tree

10 files changed

+209
-138
lines changed

10 files changed

+209
-138
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
build/
55
*.iml
66
*.log
7+
.vscode/
78

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ This is a multi bucket aggregation.
1515
Installation
1616
------------
1717

18-
`bin/plugin --install path_hierarchy --url "https://github.com/opendatasoft/elasticsearch-aggregation-pathhierarchy/releases/download/v7.17.6.1/pathhierarchy-aggregation-7.17.6.1.zip"`
18+
To install it, launch this command in Elasticsearch directory replacing the url with a release suiting your case (please check available releases [here](https://github.com/opendatasoft/elasticsearch-aggregation-pathhierarchy/releases)):
19+
`./bin/elasticsearch-plugin install https://github.com/opendatasoft/elasticsearch-aggregation-pathhierarchy/releases/download/v7.17.28.0/pathhierarchy-aggregation-7.17.28.0.zip`
1920

2021
Build
2122
-----
2223

24+
Built with Java 17 and Gradle 8.10.2.
25+
26+
The first 3 digits of plugin version is Elasticsearch versioning. The last digit is used for plugin versioning under an elasticsearch version.
27+
2328
Development Environment Setup
2429
------------
2530

@@ -31,11 +36,15 @@ OR
3136

3237
`./gradlew assemble` (to avoid tests)
3338

39+
In case you have to upgrade Gradle, you can do it with `./gradlew wrapper --gradler-version x.y.z`.
40+
3441
Then the following command will start a dockerized ES and will install the previously built plugin:
3542

36-
`
37-
docker-compose up
38-
`
43+
```
44+
docker compose up
45+
```
46+
47+
Check the Elasticsearch instance at `localhost:9200` and the plugin version with `localhost:9200/_cat/plugins`.
3948

4049

4150
> NOTE: In `docker-compose.yml` you can uncomment the debug env and attach a REMOTE JVM on `*:5005` to debug the plugin.
@@ -301,16 +310,6 @@ GET /calendar/_search?size=0
301310
302311
```
303312

304-
Installation
305-
------------
306-
307-
Built with Java 17.
308-
309-
The first 3 digits of plugin version is Elasticsearch versioning. The last digit is used for plugin versioning under an elasticsearch version.
310-
311-
To install it, launch this command in Elasticsearch directory replacing the url with a release suiting your case (please check available releases [here](https://github.com/opendatasoft/elasticsearch-aggregation-pathhierarchy/releases)):
312-
`./bin/elasticsearch-plugin install https://github.com/opendatasoft/elasticsearch-aggregation-pathhierarchy/releases/download/v7.17.6.1/pathhierarchy-aggregation-7.17.6.1.zip`
313-
314313

315314
License
316315
-------

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ apply plugin: 'idea'
2222
apply plugin: 'elasticsearch.esplugin'
2323
apply plugin: 'elasticsearch.yaml-rest-test'
2424

25+
2526
esplugin {
2627
name 'pathhierarchy-aggregation'
2728
description 'Return a path hierarchy aggregation'
@@ -30,8 +31,17 @@ esplugin {
3031
noticeFile = rootProject.file('README.md')
3132
}
3233

34+
3335
dependencies {
3436
implementation "org.elasticsearch:elasticsearch:${es_version}"
3537
yamlRestTestImplementation "org.elasticsearch.test:framework:${es_version}"
3638
yamlRestTestImplementation "org.apache.logging.log4j:log4j-core:2.17.1"
37-
}
39+
}
40+
41+
tasks.named("yamlRestTest").configure {
42+
systemProperty 'tests.security.manager', 'false'
43+
}
44+
45+
tasks.named("test").configure {
46+
systemProperty 'tests.security.manager', 'false'
47+
}

docker-compose.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.7"
2-
31
networks:
42
es-network:
53

@@ -12,18 +10,18 @@ services:
1210
environment:
1311
- discovery.type=single-node
1412
# NO DEBUG
15-
# - ES_JAVA_OPTS=-Xms512m -Xmx512m
13+
- ES_JAVA_OPTS=-Xms512m -Xmx512m
1614
# DEBUG
17-
- ES_JAVA_OPTS=-Xms512m -Xmx512m -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
15+
# - ES_JAVA_OPTS=-Xms512m -Xmx512m -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
1816
ports:
1917
- "9200:9200"
2018
# DEBUG
21-
- "5005:5005"
19+
# - "5005:5005"
2220
networks:
2321
- es-network
2422

2523
kibana:
26-
image: docker.elastic.co/kibana/kibana:7.17.5
24+
image: docker.elastic.co/kibana/kibana:7.17.24
2725
environment:
2826
ELASTICSEARCH_HOSTS: http://elasticsearch-plugin-debug:9200/
2927
ports:

docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.elastic.co/elasticsearch/elasticsearch:7.17.6 AS elasticsearch-plugin-debug
1+
FROM docker.elastic.co/elasticsearch/elasticsearch:7.17.28 AS elasticsearch-plugin-debug
22

3-
COPY /build/distributions/pathhierarchy-aggregation-7.17.6.1.zip /tmp/pathhierarchy-aggregation-7.17.6.1.zip
4-
RUN ./bin/elasticsearch-plugin install file:/tmp/pathhierarchy-aggregation-7.17.6.1.zip
3+
COPY /build/distributions/pathhierarchy-aggregation-7.17.28.0.zip /tmp/pathhierarchy-aggregation-7.17.28.0.zip
4+
RUN ./bin/elasticsearch-plugin install file:/tmp/pathhierarchy-aggregation-7.17.28.0.zip

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
es_version = 7.17.6
2-
plugin_version = 7.17.6.1
1+
es_version = 7.17.28
2+
plugin_version = 7.17.28.0

gradle/wrapper/gradle-wrapper.jar

2.36 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)