Resolve tickets 9114 and 9031 #12
234
README.md
234
README.md
|
@ -1,14 +1,238 @@
|
||||||
# uoa-repository-manager-service (Provide backend)
|
# uoa-repository-manager-service (Provide backend)
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
## Building
|
||||||
|
The backend is a [Maven](https://maven.apache.org/index.html) project. It has been tested using Java 8.
|
||||||
|
<br>
|
||||||
|
|
||||||
|
#### Manual Build Instructions
|
||||||
|
|
||||||
|
###### Requirements:
|
||||||
|
- Java 8
|
||||||
|
- Apache Maven 3+
|
||||||
|
|
||||||
|
###### Build Instructions:
|
||||||
|
1. Clone the repository and move inside the directory
|
||||||
|
<br> `git clone https://code-repo.d4science.org/MaDgIK/uoa-repository-manager-service.git && cd uoa-repository-manager-service`
|
||||||
|
2. Provide all not-set or redacted configurations, inside the **src/main/resources/application.yml** file.
|
||||||
|
3. Build Maven project
|
||||||
|
<br> `mvn clean package`
|
||||||
|
<br> Produces the file "./target/**uoa-repository-manager-service.jar**" which can be run with: - Run the app with: `java -jar ./target/uoa-repository-manager-service.jar`
|
||||||
|
<br><br>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
#### Build using Docker
|
||||||
|
The repository contains a **Dockerfile** which can be used to build an image containing the compiled project.
|
||||||
|
|
||||||
|
###### Requirements:
|
||||||
|
- Docker
|
||||||
|
|
||||||
|
###### Build Instructions:
|
||||||
|
1. Clone the repository and move inside the directory
|
||||||
|
<br> `git clone https://code-repo.d4science.org/MaDgIK/uoa-repository-manager-service.git && cd uoa-repository-manager-service`
|
||||||
|
2. Provide all not-set or redacted configurations, inside the **src/main/resources/application.yml** file.
|
||||||
|
3. Build Docker image
|
||||||
|
<br> `docker build . -t <docker-image-name>`
|
||||||
|
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
* [PostgreSQL 9.5+](https://www.postgresql.org/)
|
||||||
|
[...]
|
||||||
|
|
||||||
|
|
||||||
|
### Instructions
|
||||||
|
Execute `java -jar ./target/uoa-repository-manager-service.jar`
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
* [PostgreSQL 9.5+](https://www.postgresql.org/)
|
||||||
|
|
||||||
|
|
||||||
|
### Infrastructure Installation and Configuration
|
||||||
|
Install all software found in the list of [Prerequisites](#Prerequisites) using the official documentation.
|
||||||
|
|
||||||
|
|
||||||
|
#### PostgreSQL - Configuration
|
||||||
[...]
|
[...]
|
||||||
|
|
||||||
## Install and run:
|
### Installation
|
||||||
- Run **git clone** and then **cd uoa-repository-manager-service**.
|
No additional installation steps are needed.
|
||||||
- Provide all not-set or redacted configurations, inside the **src/main/resources/application.yml** file.
|
|
||||||
- Build the app with: `mvn clean install`
|
|
||||||
- Run the app with: `java -jar ./target/uoa-repository-manager-service.jar`
|
|
||||||
|
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The configuration can be set inside the **src/main/resources/application.yml** file.
|
||||||
|
|
||||||
|
### Server-related configuration.
|
||||||
|
```
|
||||||
|
server:
|
||||||
|
port: 8480
|
||||||
|
servlet:
|
||||||
|
context-path: /uoa-repository-manager-service
|
||||||
|
```
|
||||||
|
|
||||||
|
### Swagger UI - related configuration
|
||||||
|
```
|
||||||
|
springdoc:
|
||||||
|
swagger-ui:
|
||||||
|
disable-swagger-default-url: true
|
||||||
|
path: /swagger-ui.html
|
||||||
|
displayRequestDuration: true
|
||||||
|
api-docs:
|
||||||
|
path: /api-docs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Datasource -related configuration
|
||||||
|
```
|
||||||
|
spring:
|
||||||
|
jpa:
|
||||||
|
hibernate:
|
||||||
|
ddl-auto: update
|
||||||
|
datasource:
|
||||||
|
url: ${services.provide.db.url}
|
||||||
|
username: ${services.provide.db.username}
|
||||||
|
password: ${services.provide.db.password}
|
||||||
|
driverClassName: ${services.provide.db.driverClassName}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configurations about the provide service.
|
||||||
|
```
|
||||||
|
services:
|
||||||
|
openaireServicesBaseUrl: https://beta.services.openaire.eu
|
||||||
|
provide:
|
||||||
|
dev-machine: 88.197.53.71 # VM-71
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Configuration about Authentication and authorization infrastructure (AAI).
|
||||||
|
```
|
||||||
|
aai:
|
||||||
|
baseURL: https://aai.openaire.eu
|
||||||
|
oidc:
|
||||||
|
domain: .openaire.eu # use empty value for local, otherwise: ".openaire.eu"
|
||||||
|
id: XX
|
||||||
|
issuer: ${services.provide.aai.baseURL}/oidc/
|
||||||
|
redirectURL: http://localhost:${server.port}${server.servlet.context-path}/openid_connect_login
|
||||||
|
secret: XX
|
||||||
|
webURL: http://localhost:4200/join
|
||||||
|
registry:
|
||||||
|
coid: XX
|
||||||
|
username: XX
|
||||||
|
password: XX
|
||||||
|
production: false
|
||||||
|
url: ${services.provide.aai.baseURL}/registry/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### [...]
|
||||||
|
```
|
||||||
|
adminEmail: XX
|
||||||
|
analyticsURL: https://analytics.openaire.eu/addsite.php?
|
||||||
|
baseUrl: ${services.openaireServicesBaseUrl}/openaire
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Broker's configuration
|
||||||
|
```
|
||||||
|
broker:
|
||||||
|
api: api/
|
||||||
|
openaire: openaireBroker
|
||||||
|
port: 443
|
||||||
|
url: https://beta.broker.openaire.eu
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Client's configuration
|
||||||
|
```
|
||||||
|
clients:
|
||||||
|
dsm: ${services.provide.baseUrl}
|
||||||
|
search: ${services.openaireServicesBaseUrl}/search/v2/api
|
||||||
|
usageEvents: http://beta.lbs.openaire.eu:8080/ajax/summary
|
||||||
|
usagestats: ${services.openaireServicesBaseUrl}/usagestats
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Database configuration for Provide.
|
||||||
|
```
|
||||||
|
db:
|
||||||
|
driverClassName: org.postgresql.Driver
|
||||||
|
password: dnetPwd
|
||||||
|
url: jdbc:postgresql://${services.provide.dev-machine}:5432/repomanager
|
||||||
|
username: dnet
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Configuration for the IS LookUp service.
|
||||||
|
```
|
||||||
|
iSLookUpService:
|
||||||
|
url: https://dev-openaire.d4science.org:443/is/services/isLookUp
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Mail-server configuration.
|
||||||
|
```
|
||||||
|
mail:
|
||||||
|
authenticate: true
|
||||||
|
debug: false
|
||||||
|
from: XX
|
||||||
|
host: smtp.gmail.com
|
||||||
|
mode: ssl
|
||||||
|
password: XX
|
||||||
|
port: 465
|
||||||
|
replyTo: XX
|
||||||
|
username: XX
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Redis's configuration
|
||||||
|
```
|
||||||
|
redis:
|
||||||
|
host: vereniki.athenarc.gr
|
||||||
|
password: XX
|
||||||
|
port: 6379
|
||||||
|
```
|
||||||
|
|
||||||
|
#### [...]
|
||||||
|
```
|
||||||
|
topic_types:
|
||||||
|
url: ${services.openaireServicesBaseUrl}/provision/mvc/vocabularies/dnet:topic_types.json # TODO - Check this! The requested json file does not exist in the DEV-url below)
|
||||||
|
usageStatisticsDiagramsBaseURL: https://beta.openaire.eu/stats3/
|
||||||
|
usageStatisticsNumbersBaseURL: ${services.openaireServicesBaseUrl}/usagestats/datasources/
|
||||||
|
usagestats:
|
||||||
|
adminEmail: XX
|
||||||
|
sushiliteEndpoint: ${services.openaireServicesBaseUrl}/usagestats/sushilite/
|
||||||
|
sushiliteR5Endpoint: ${services.openaireServicesBaseUrl}/usagestats_r5/sushilite/r5/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Validator - related configuration.
|
||||||
|
```
|
||||||
|
validator:
|
||||||
|
results:
|
||||||
|
url: https://beta.provide.openaire.eu/compatibility/browseHistory/
|
||||||
|
validatorService:
|
||||||
|
url: http://${services.provide.dev-machine}:8080/uoa-validator-service/services/validatorWebService
|
||||||
|
```
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
## Security
|
||||||
|
## Maintenance
|
||||||
|
## Recovery
|
||||||
|
## References
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Notes for Swagger-UI:
|
### Notes for Swagger-UI:
|
||||||
- Access it through this url: http://localhost:8480/uoa-repository-manager-service/swagger-ui/index.html
|
- Access it through this url: http://localhost:8480/uoa-repository-manager-service/swagger-ui/index.html
|
||||||
- In order to request data from most endpoints, you have to be a "REGISTERED_USER", otherwise you will get a 403 error code.
|
- In order to request data from most endpoints, you have to be a "REGISTERED_USER", otherwise you will get a 403 error code.
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -7,6 +7,7 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.7.17</version>
|
<version>2.7.17</version>
|
||||||
|
<relativePath></relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
Loading…
Reference in New Issue