From fa3690dab76e158f68b590c5cf1892cc0b6d85f3 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 5 Jun 2024 11:37:33 +0300 Subject: [PATCH] 1. Add info in ReadMe. 2. Add maven nexus repository in pom.xml. --- LICENSE | 2 +- README.md | 112 +++++++++++++- pom.xml | 176 ++++++++++++---------- src/main/resources/application.properties | 4 +- 4 files changed, 209 insertions(+), 85 deletions(-) diff --git a/LICENSE b/LICENSE index 137069b..e5acea9 100644 --- a/LICENSE +++ b/LICENSE @@ -58,7 +58,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 National Open Access Monitor, Ireland Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 0ad57a7..aa89091 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,112 @@ -# irish-monitor-service +# Irish Monitor Service +Irish Monitor Service is a service that integrates both OpenAIRE Login API and +OpenAIRE Monitor API and provide all functionalities for National Open Access Monitor, Ireland. + +## Maven + +Java Version: 1.8, Sprint boot Version: 1.5.8.RELEASE + +This service has dependencies downloaded from [D4Science Nexus repository](https://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-releases), +so there is a definition of this repository inside [pom.xml](pom.xml). + +### Install + + mvn clean install -DskipTests -Dmaven.javadoc.skip=true; + +#### Standalone (Recommended) + +1. Create a new system service and enable in order to start up at boot. + + cd /etc/systemd/system + sudo vim service-name.service + +2. Add the following content by replacing () accordingly. + + [Unit] + Description=service-name + After=syslog.target + + [Service] + User=root + ExecStart=(/home/user/spring-boot/)irish-monitor-service.war (--spring.profiles.active=swagger) --server.port=(port) (--server.context-path=/irish-monitor-service) --spring.config.location=file:///(home/user/spring-boot/config/application.properties) + SuccessExitStatus=143 + + [Install] + WantedBy=multi-user.target + +3. Configure the service. + + sudo systemctl daemon-reload + sudo systemctl enable service-name + +4. Handle service. + + sudo systemctl start service-name + sudo systemctl stop service-name + sudo systemctl restart service-name + sudo systemctl status service-name + +#### Container (eg Tomcat) + +1. Add the war in the _webapps_ folder. +2. Create application.properties file in _lib_ folder. + +## Configuration + +In order to configure this service you have to set the following properties: + + stats-tool.rfo=?json= + stats-tool.rpo=?json= + stats-tool.repository=?json= + + +## Login core + +This dependency provides the Authentication and Authorization functionality. +In order to configure it you have to set the following properties: + + authentication.domain= + authentication.oidc.home=/openid_connect_login + authentication.oidc.scope=openid,profile,email,eduperson_entitlement,orcid + authentication.oidc.id= + authentication.oidc.secret= + authentication.oidc.issuer=https://aai.openaire.eu/auth/realms/openaire + authentication.oidc.redirect=/redirect + authentication.session=irishSession + authentication.redirect= + authentication.redis.host= + authentication.redis.port= + authentication.redis.passwork= + authentication.authorities-mapper=irish.eduperson_entitlement // DO NOT CHANGE + authentication.keycloak=true + +## Monitor Service + +This dependency provides the main service functionality +in order to create/edit/delete monitor profiles and their content. +In order to configure it you have to set the following properties: + + monitorservice.mongodb.host= + monitorservice.mongodb.port= + monitorservice.mongodb.database= + monitorservice.mongodb.username= + monitorservice.mongodb.password= + +## Admin Tools Library (integrated in Monitor Service) + +This dependency provides utilities to store dynamic HTML content, +send Email and verify Google recaptcha. In order to configure it +you have to set the following properties: + + admintoolslibrary.mail.from = + admintoolslibrary.mail.username = + admintoolslibrary.mail.password = + admintoolslibrary.mail.host = + admintoolslibrary.mail.port = + admintoolslibrary.mail.auth = true + admintoolslibrary.mail.sslProtocols = TLSv1.2 + admintoolslibrary.mail.defaultEncoding=UTF-8 + admintoolslibrary.mail.protocol= + admintoolslibrary.mail.testConnection=false + admintoolslibrary.google.secret = diff --git a/pom.xml b/pom.xml index 6ed187a..95cb5e2 100644 --- a/pom.xml +++ b/pom.xml @@ -1,88 +1,102 @@ - -4.0.0 -irish-monitor-service -1.0.5-SNAPSHOT -war -irish-monitor-service - - scm:git:gitea@code-repo.d4science.org:MaDgIK/irish-monitor-service.git - HEAD - - - eu.dnetlib - uoa-spring-boot-parent - 1.0.0 - - - UTF-8 - UTF-8 - ${maven.build.timestamp} - E MMM dd HH:mm:ss z yyyy - - - - + + 4.0.0 + irish-monitor-service + 1.0.5-SNAPSHOT + war + irish-monitor-service + + scm:git:gitea@code-repo.d4science.org:MaDgIK/irish-monitor-service.git + HEAD + + eu.dnetlib - uoa-monitor-service - 1.1.13 - library - + uoa-spring-boot-parent + 1.0.0 + + + UTF-8 + UTF-8 + ${maven.build.timestamp} + E MMM dd HH:mm:ss z yyyy + + - - eu.dnetlib - uoa-login-core - 2.1.1 - + + eu.dnetlib + uoa-monitor-service + 1.1.13 + library + - - - io.springfox - springfox-swagger2 - ${swagger-version} - - - - io.springfox - springfox-swagger-ui - ${swagger-version} - - + + eu.dnetlib + uoa-login-core + 2.1.1 + - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring-boot-version} - - eu.dnetlib.irishmonitorservice.IrishMonitorServiceApplication - true - - - - - repackage - - - - - - org.apache.maven.plugins - maven-war-plugin - 2.6 - - false - - - - irish-monitor-service - - - src/main/resources - true - - - + + + io.springfox + springfox-swagger2 + ${swagger-version} + + + + io.springfox + springfox-swagger-ui + ${swagger-version} + + + + + dnet45-releases + D-Net 45 Releases + https://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-releases/ + + true + + + false + + default + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot-version} + + eu.dnetlib.irishmonitorservice.IrishMonitorServiceApplication + true + + + + + repackage + + + + + + org.apache.maven.plugins + maven-war-plugin + 2.6 + + false + + + + irish-monitor-service + + + src/main/resources + true + + + diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index deef270..a265757 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +1,4 @@ #static properties api.title = Irish Monitor Service Documentation Swagger -api.description = Irish Monitor Service is a service which ... -api.version = ${project.version} \ No newline at end of file +api.description = Irish Monitor Service is a service that integrates both OpenAIRE login and OpenAIRE Monitor API and provide all functionalities for National Open Access Monitor, Ireland +api.version = ${project.version}