Skip to content

Commit 93cc845

Browse files
Merge pull request #149 from kit-data-manager/development
Prepare release v1.0.0
2 parents e1e55ba + 466d761 commit 93cc845

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+581
-496
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v3
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
5353
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5454
# If this step fails, then you should remove it and run the build manually (see below)
5555
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v2
56+
uses: github/codeql-action/autobuild@v3
5757

5858
# ℹ️ Command-line programs to run using the OS shell.
5959
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
6767
# make release
6868

6969
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v2
70+
uses: github/codeql-action/analyze@v3

.github/workflows/docker-publish.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ on:
55
# Publish `master` as Docker `latest` image.
66
branches:
77
- main
8-
- master
98

109
# Publish `v1.2.3` tags as releases.
1110
tags:
1211
- v*
1312

14-
# Run tests for any PRs.
13+
# Run tests for PRs on main branch only.
1514
pull_request:
15+
branches:
16+
- main
1617

1718
env:
1819
# TODO: Change variable to your image's name.
@@ -28,9 +29,9 @@ jobs:
2829

2930
steps:
3031
- name: Checkout repo
31-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3233
- name: Set up OpenJDK version ...
33-
uses: actions/setup-java@v3
34+
uses: actions/setup-java@v4
3435
with:
3536
distribution: 'zulu'
3637
java-version: ${{ env.currentBuildVersion }}
@@ -58,7 +59,7 @@ jobs:
5859

5960
steps:
6061
- name: Checkout repo
61-
uses: actions/checkout@v3
62+
uses: actions/checkout@v4
6263

6364
- name: Build image
6465
run: |
@@ -83,26 +84,26 @@ jobs:
8384
docker push $IMAGE_ID:$VERSION
8485
- name: Docker meta
8586
id: docker_meta
86-
uses: crazy-max/ghaction-docker-meta@v4
87+
uses: crazy-max/ghaction-docker-meta@v5
8788
with:
8889
# list of Docker images to use as base name for tags
8990
images: |
9091
kitdm/indexing-service
9192
# add git short SHA as Docker tag
9293
tag-sha: true
9394
- name: Set up QEMU
94-
uses: docker/setup-qemu-action@v2
95+
uses: docker/setup-qemu-action@v3
9596

9697
- name: Set up Docker Buildx
97-
uses: docker/setup-buildx-action@v2
98+
uses: docker/setup-buildx-action@v3
9899
- name: Login to DockerHub
99-
uses: docker/login-action@v2
100+
uses: docker/login-action@v3
100101
with:
101102
username: ${{ secrets.DOCKER_USERNAME }}
102103
password: ${{ secrets.DOCKER_PASSWORD }}
103104

104105
- name: Push to Docker Hub
105-
uses: docker/build-push-action@v4
106+
uses: docker/build-push-action@v5
106107
with:
107108
context: .
108109
push: true

.github/workflows/gradle.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
jdk: [ 17, 19 ]
2424
steps:
2525
- name: Checkout repo
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727
- name: Set up OpenJDK version ...
28-
uses: actions/setup-java@v3
28+
uses: actions/setup-java@v4
2929
with:
3030
distribution: 'zulu'
3131
java-version: ${{ matrix.jdk }}
@@ -57,9 +57,9 @@ jobs:
5757
runs-on: ubuntu-latest
5858
steps:
5959
- name: Checkout repo
60-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
6161
- name: Set up OpenJDK version ...
62-
uses: actions/setup-java@v3
62+
uses: actions/setup-java@v4
6363
with:
6464
distribution: 'zulu'
6565
java-version: ${{ env.currentBuildVersion }}

CHANGELOG.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
### Changed
13+
14+
## [1.0.0] - date 2023-12-18
15+
### Added
16+
- Enable authentication for RabbitMQ
17+
- Add interface description
18+
1219
### Changed
1320
- The mappings directory is now a subdirectory of the installation directory by default.
21+
- Bump actions/checkout from 3 to 4
22+
- Bump actions/setup-java from 3 to 4
23+
- Bump crazy-max/ghaction-docker-meta from 4 to 5
24+
- Bump docker/build-push-action from 4 to 5
25+
- Bump docker/setup-buildx-action from 2 to 3
26+
- Bump docker/setup-qemu-action from 2 to 3
27+
- Bump github/codeql-action from 2 to 3
28+
- Bump com.google.guava:guava from 32.1.1-jre to 32.1.3-jre
29+
- Bump com.h2database:h2 from 2.2.220 to 2.2.224
30+
- Bump de.codecentric:spring-boot-admin-starter-client from 3.0.4 to 3.1.8
31+
- Bump edu.kit.datamanager:generic-message-consumer from 1.0.0 to 1.1.1
32+
- Bump io.freefair.lombok from 8.1.0 to 8.4
33+
- Bump io.freefair.maven-publish-java from 8.1.0 to 8.4
34+
- Bump io.spring.dependency-management from 1.1.2 to 1.1.4
35+
- Bump javersVersion from 7.3.0 to 7.3.6
36+
- Bump org.apache.tika:tika-core from 2.8.0 to 2.9.1
37+
- Bump org.json:json from 20230618 to 20231013
38+
- Bump org.mockito:mockito-core from 5.4.0 to 5.8.0
39+
- Bump org.owasp.dependencycheck from 8.3.1 to 9.0.6
40+
- Bump org.postgresql:postgresql from 42.6.0 to 42.7.1
41+
- Bump org.springframework.boot from 3.1.2 to 3.2.0
42+
- Bump org.springframework:spring-messaging from 6.0.2 to 6.1.2
43+
- Bump org.springframework.cloud:spring-cloud-gateway-mvc from 4.0.6 to 4.1.0
44+
- Bump org.springframework.data:spring-data-elasticsearch from 5.1.2 to 5.2.0
45+
- Bump org.springframework.restdocs:spring-restdocs-mockmvc from 3.0.0 to 3.0.1
46+
- Bump springDocVersion from 2.1.0 to 2.3.0
47+
- Bump elasticsearch instance for test from 7.9.3 to 8.11.1
1448

49+
### Fixed
50+
- Settings for health check.
51+
1552
## [0.9.0] - date 2023-07-25
1653
Update service to Spring Boot 3.
1754
### Changed
@@ -98,7 +135,8 @@ and mapping of metadata documents delivered by RabbitMQ
98135
- Mapping of metadata documents with Gemma
99136
- Ingest to elasticsearch
100137

101-
[Unreleased]: https://github.com/kit-data-manager/indexing-service/compare/v0.9.0...HEAD
138+
[Unreleased]: https://github.com/kit-data-manager/indexing-service/compare/v1.0.0...HEAD
139+
[1.0.0]: https://github.com/kit-data-manager/indexing-service/compare/v0.9.0...v1.0.0
102140
[0.9.0]: https://github.com/kit-data-manager/indexing-service/compare/v0.1.3...v0.9.0
103141
[0.1.3]: https://github.com/kit-data-manager/indexing-service/compare/v0.1.2...v0.1.3
104142
[0.1.2]: https://github.com/kit-data-manager/indexing-service/compare/v0.1.1...v0.1.2

INTERFACE.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Interfaces Overview (Indexing-Service)
2+
3+
This document aims to answer questions on how to configure external dependencies and which public interfaces are offered by Indexing-Service in a comprehensive way. It is meant to be used for getting an overview and guidance in addition to the official documentation, which is available at the official [Indexing-Service Web page (not yet available)](https://kit-data-manager.github.io/webpage/indexing-service/).How can this software be connected with other software? This is the question this document aims to answer.
4+
5+
> ℹ️ **Note:**
6+
> This document applies to the Indexing-Service version it is shipped with. If you have a specific version running, please refer to `INTERFACE.md` of this particular release.
7+
8+
## TOC
9+
10+
- [Interfaces Overview for Indexing-Service](#interfaces-overview-for-indexing-service)
11+
* [External Dependencies](#external-dependencies-) 📤
12+
+ [Relational Database (mandatory)](#relational-database-mandatory-)
13+
+ [Local Filesystem (mandatory)](#local-filesystem-mandatory-) 📂
14+
+ [Messaging (mandatory)](#messaging-mandatory-) 💬
15+
+ [Search (mandatory)](#search-mandatory-) 🔍
16+
+ [Access Control (optional)](#access-control-optional-) 🔐
17+
* [Public Interfaces](#public-interfaces-) 📥
18+
+ [HTTP / REST](#http--rest)
19+
+ [Monitoring Health/Info](#monitoring-healthinfo) 🔍
20+
21+
## Requirements
22+
- [Messaging](#messaging-optional-)
23+
- [Elasticsearch](https://kit-data-manager.github.io/webpage/metastore/documentation/installation/framework/setup-elasticsearch.html)
24+
Messaging is used to inform indexing service about any updates regarding metadata documents. Indexing service will fetch the document, transform it (if mapping available) and send it to elasticsearch for indexing.
25+
26+
## External Dependencies 📤
27+
28+
External dependencies are third-party services that are required for Indexing-Service to work properly or that can be added optionally to provide additional functionality. Typically, external dependencies require additional software to be installed and configured, before they can be included in the Indexing-Service configuration, which is typically done via the main configuration file `application.properties`. If you do not want to lose your default settings, we recommend that you make a copy of "application.properties" and move it to the "config" subfolder. Remove all properties you want to keep from the new file. **All properties in "config/application.properties" override the settings in "application.properties".**
29+
30+
31+
## External Dependencies 📤
32+
33+
External dependencies are third-party services that are required for Indexing-Service to work properly or that can be added optionally to provide additional functionality. Typically, external dependencies require
34+
additional software to be installed and configured, before they can be included in the Indexing-Service configuration, which is should be done via the configuration file `config/application.properties`.
35+
36+
### Relational Database (mandatory) ⛁
37+
A relational database is required by Indexing-Service to store administrative metadata for mapping documents. If not configured properly, Indexing-Service will fail to start.
38+
39+
#### Configuration ⚙️
40+
- H2 In-Memory (driver included, used for **testing only**, **not** recommended for **production**) [Example](https://github.com/kit-data-manager/indexing-service/blob/v0.9.0/src/test/resources/test-config/application-test.properties#L14-L18)
41+
- H2 File-Based (driver included, used for basic Docker setup or for 'quick and dirty' tests, **not** recommended for **production**) [Example](https://github.com/kit-data-manager/indexing-service/blob/v0.9.0/settings/application-docker.properties#L26-L33)
42+
- Postgres (driver included, **requires a running PostgreSQL server**, **recommended for production**) [PostgreSQL](https://www.postgresql.org/), [Example](https://github.com/kit-data-manager/indexing-service/blob/v0.9.0/settings/application-postgres.properties#L34-L47)
43+
44+
> ℹ️ **Note:**
45+
> Other relational databases, such as MariaDB, SQLite, or Oracle, may also work, but require additional steps. To allow Indexing-Service to connect, the source code repository must be cloned, an appropriate JDBC driver has to be added to `build.gradle` and Indexing-Service has to be compiled. Proper JDBC drivers are typically provided on the database's web page. Afterwards, the database can be configured in `config/application.properties` similar to PostgreSQL but with database-specific property naming. Please refer to the driver documentation for details.
46+
47+
### Local Filesystem (mandatory) 📂
48+
Indexing-Service requires access to the local file system in order to store and manage uploaded mapping documents. Indexing-Service requires access to one folder, which can be located on the local hard drive or mounted via NFS. It's recommended to create a subfolder named 'mapping' in the installation directory.
49+
50+
51+
#### Configuration ⚙️
52+
- see `application.properties`
53+
- [Configure folders](https://github.com/kit-data-manager/indexing-service/blob/v0.9.0/settings/application-default.properties#L71-L74)
54+
55+
> ℹ️ **Note:**
56+
> The file path to the folder has to start with three '/'. If you overwrite the default setting we recommend to create or edit 'config/application.properties'. e.g.:
57+
> ``` title= config/application.properties
58+
> metastore.indexer.mappingsLocation:file:///data/indexing/mapping
59+
>```
60+
> **If the folder do not exist, it will be created.**
61+
62+
### Messaging (mandatory) 💬
63+
AMQP-based messaging is a mandatory feature of Indexing-Service, which allows Indexing-Service to **receive** messages about creation, modification, and deletion events inside MetaStore related to **metadata documents** and process them in an asynchronous way.
64+
#### Installation
65+
- [Installing RabbitMQ](https://kit-data-manager.github.io/webpage/metastore/documentation/installation/framework/setup-rabbitMq.html)
66+
#### Configuration ⚙️
67+
- [RabbitMQ](https://www.rabbitmq.com/) (dependencies included, serves as messaging distributor, requires a running RabbitMQ server)
68+
- [Introduction Messaging for MetaStore](https://kit-data-manager.github.io/webpage/metastore/documentation/installation/messaging/messaging-introduction.html)
69+
- [Configuration Messaging for Indexing-Service](https://kit-data-manager.github.io/webpage/metastore/documentation/installation/messaging/messaging-configuration.html)
70+
- [Example](https://kit-data-manager.github.io/webpage/metastore/documentation/installation/setup-metastore.html#rabbitmq)
71+
72+
### Enhanced Search (mandatory) 🔍
73+
Indexing-Service requires an [elasticsearch instance](https://www.elastic.co/de/elasticsearch/) for indexing received metadata documents. (JSON metadata documents are provided by default. XML documents should be transformed to JSON using GEMMA (currently the only available mapping)) (In future versions [mapping-service](https://github.com/kit-data-manager/mapping-service) should be integrated.)
74+
#### Configuration ⚙️
75+
- [Configuration Receiver](https://kit-data-manager.github.io/webpage/metastore/documentation/installation/setup-metastore.html#elasticsearch)
76+
77+
### Access Control (optional) 🔐
78+
By default, Indexing-Service itself is open for all kinds of operations, i.e., read and write, where write access should be restricted on the user interface level, e.g., by a password-protected area for critical operations. Optionally, authentication and authorization via JSON Web Tokens (JWT) issued by a Keycloak instance, can be configured, which allows a fine-granulated access management on document level.
79+
> ℹ️ **Note:**
80+
> As Indexing-Service is not planned to be used by humans, no access control is used by default. Therefor the service should not be accessible from outside KIT. Managing mappings should be done by an administrator.
81+
82+
#### Requirements
83+
- [Keycloak](https://www.keycloak.org/)
84+
#### Configuration ⚙️
85+
- [Setup Indexing-Service](https://kit-data-manager.github.io/webpage/metastore/documentation/installation/setup-metastore.html#keycloak)
86+
Configuration is similar to MetaStore.
87+
88+
## Public Interfaces 📥
89+
Public Interfaces are used to access Indexing-Service in order to obtain its contents, typically this happens via HTTP/REST. Depending on the interface, special clients or protocols must be used to access a specific public interface.
90+
91+
92+
Interfaces which trigger functionality or return information **on request**.
93+
94+
### HTTP / REST
95+
A REST interface which allows to access the service functionality, like creating/registering, updating and validating metadata documents/schemas on request.
96+
#### Documentation 📖
97+
- [OpenAPI](http://localhost:8050/swagger-ui.html) via running instance.
98+
- [Usage with Examples](https://github.com/kit-data-manager/indexing-service/blob/main/restDocu.md)
99+
100+
#### Services known to connect to this interface:
101+
-/-
102+
103+
### Monitoring Health/Info
104+
A REST interface which allows to access the status of the service:
105+
1. *hostname:port/contextpath*/actuator/info (information about version)
106+
2. *hostname:port/contextpath*/actuator/health (information about (connected) services)
107+

build.gradle

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
plugins {
2-
id "org.springframework.boot" version "3.1.2"
3-
id "io.spring.dependency-management" version "1.1.2"
4-
id "io.freefair.lombok" version "8.1.0"
5-
id "io.freefair.maven-publish-java" version "8.1.0"
6-
id "org.owasp.dependencycheck" version "8.3.1"
2+
id "org.springframework.boot" version "3.2.0"
3+
id "io.spring.dependency-management" version "1.1.4"
4+
id "io.freefair.lombok" version "8.4"
5+
id "io.freefair.maven-publish-java" version "8.4"
6+
id "org.owasp.dependencycheck" version "9.0.6"
77
id 'org.asciidoctor.jvm.convert' version '3.3.2'
88
id 'net.researchgate.release' version '3.0.2'
99
id "com.gorylenko.gradle-git-properties" version "2.4.1"
@@ -13,8 +13,8 @@ plugins {
1313

1414
ext {
1515
// versions of dependencies
16-
javersVersion = '7.3.0'
17-
springDocVersion = '2.1.0'
16+
javersVersion = '7.3.6'
17+
springDocVersion = '2.3.0'
1818
}
1919

2020
description = 'Generic indexing service supporting different mapping implementations.'
@@ -51,8 +51,8 @@ if (System.getProperty('profile') == 'minimal') {
5151

5252
dependencies {
5353
// Spring
54-
implementation 'org.springframework:spring-messaging:6.0.2'
55-
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.0.6'
54+
implementation 'org.springframework:spring-messaging:6.1.2'
55+
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.1.0'
5656

5757
// Spring Boot
5858
// boot starter
@@ -63,49 +63,49 @@ dependencies {
6363
implementation "org.springframework.boot:spring-boot-starter-security"
6464
implementation "org.springframework.boot:spring-boot-starter-actuator"
6565
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
66-
implementation 'org.springframework.data:spring-data-elasticsearch:5.1.2'
66+
implementation 'org.springframework.data:spring-data-elasticsearch:5.2.1'
6767

6868
// springdoc
6969
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocVersion}"
7070
implementation "org.springdoc:springdoc-openapi-starter-common:${springDocVersion}"
7171
implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:${springDocVersion}"
7272

7373
// driver for postgres
74-
implementation "org.postgresql:postgresql:42.6.0"
74+
implementation "org.postgresql:postgresql:42.7.1"
7575
//driver for h2
76-
implementation "com.h2database:h2:2.2.220"
76+
implementation "com.h2database:h2:2.2.224"
7777

7878
//apache
79-
implementation "org.apache.tika:tika-core:2.8.0"
79+
implementation "org.apache.tika:tika-core:2.9.1"
8080
implementation "commons-codec:commons-codec:1.16.0"
8181

8282
implementation "com.github.jknack:handlebars:4.3.1"
83-
implementation "org.json:json:20230618"
83+
implementation "org.json:json:20231013"
8484

8585
// javers
8686
implementation "org.javers:javers-spring-boot-starter-sql:${javersVersion}"
8787
implementation "org.javers:javers-core:${javersVersion}"
8888

8989
// datamanager
90-
implementation "edu.kit.datamanager:generic-message-consumer:1.0.0"
90+
implementation "edu.kit.datamanager:generic-message-consumer:1.1.1"
9191
implementation "edu.kit.datamanager:repo-core:1.2.1"
9292
implementation "edu.kit.datamanager:service-base:1.2.0"
9393

9494
// actuator
95-
implementation 'de.codecentric:spring-boot-admin-starter-client:3.0.4'
95+
implementation 'de.codecentric:spring-boot-admin-starter-client:3.1.8'
9696

9797
runtimeOnly 'org.apache.httpcomponents:httpclient:4.5.14'
9898

9999
// Additional libraries for tests
100-
testImplementation "com.google.guava:guava:32.1.1-jre"
100+
testImplementation "com.google.guava:guava:32.1.3-jre"
101101

102102
//Java 11 Support
103-
testImplementation "org.mockito:mockito-core:5.4.0"
103+
testImplementation "org.mockito:mockito-core:5.8.0"
104104
testImplementation "junit:junit:4.13.2"
105105

106106
// boot starter
107107
testImplementation "org.springframework.boot:spring-boot-starter-test"
108-
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:3.0.0'
108+
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:3.0.1'
109109
testImplementation "org.springframework.security:spring-security-test"
110110
testImplementation "org.springframework:spring-test"
111111
}
@@ -121,7 +121,7 @@ springBoot {
121121

122122
bootJar {
123123
manifest {
124-
attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
124+
attributes 'Main-Class': 'org.springframework.boot.loader.launch.PropertiesLauncher'
125125
}
126126
dependsOn asciidoctor
127127
from ("${asciidoctor.outputDir}/html5") {

0 commit comments

Comments
 (0)