1. Add info in ReadMe. 2. Add maven nexus repository in pom.xml.
This commit is contained in:
parent
74f83e9898
commit
fa3690dab7
2
LICENSE
2
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.
|
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");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
112
README.md
112
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=<StatsToolURL>?json=<JsonQuery>
|
||||||
|
stats-tool.rpo=<StatsToolURL>?json=<JsonQuery>
|
||||||
|
stats-tool.repository=<StatsToolURL>?json=<JsonQuery>
|
||||||
|
|
||||||
|
|
||||||
|
## Login core
|
||||||
|
|
||||||
|
This dependency provides the Authentication and Authorization functionality.
|
||||||
|
In order to configure it you have to set the following properties:
|
||||||
|
|
||||||
|
authentication.domain=<Domain>
|
||||||
|
authentication.oidc.home=<API_URL>/openid_connect_login
|
||||||
|
authentication.oidc.scope=openid,profile,email,eduperson_entitlement,orcid
|
||||||
|
authentication.oidc.id=<ProviderClientId>
|
||||||
|
authentication.oidc.secret=<ProviderClientSecret>
|
||||||
|
authentication.oidc.issuer=https://aai.openaire.eu/auth/realms/openaire
|
||||||
|
authentication.oidc.redirect=<API_URL>/redirect
|
||||||
|
authentication.session=irishSession
|
||||||
|
authentication.redirect=<DefaultRedirectURL>
|
||||||
|
authentication.redis.host=<RedisHost>
|
||||||
|
authentication.redis.port=<RedisPort>
|
||||||
|
authentication.redis.passwork=<RedisPassword>
|
||||||
|
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=<MongoHost>
|
||||||
|
monitorservice.mongodb.port=<MongoPort>
|
||||||
|
monitorservice.mongodb.database=<DatabaseName>
|
||||||
|
monitorservice.mongodb.username=<MongoUser>
|
||||||
|
monitorservice.mongodb.password=<MongoPassword>
|
||||||
|
|
||||||
|
## 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 = <Email>
|
||||||
|
admintoolslibrary.mail.username = <Email>
|
||||||
|
admintoolslibrary.mail.password = <EmailPassword>
|
||||||
|
admintoolslibrary.mail.host = <EmailHost>
|
||||||
|
admintoolslibrary.mail.port = <EmailPort>
|
||||||
|
admintoolslibrary.mail.auth = true
|
||||||
|
admintoolslibrary.mail.sslProtocols = TLSv1.2
|
||||||
|
admintoolslibrary.mail.defaultEncoding=UTF-8
|
||||||
|
admintoolslibrary.mail.protocol=<EmailProtocol>
|
||||||
|
admintoolslibrary.mail.testConnection=false
|
||||||
|
admintoolslibrary.google.secret = <GoogleSecret>
|
||||||
|
|
176
pom.xml
176
pom.xml
|
@ -1,88 +1,102 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<modelVersion>4.0.0</modelVersion>
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<artifactId>irish-monitor-service</artifactId>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<version>1.0.5-SNAPSHOT</version>
|
<artifactId>irish-monitor-service</artifactId>
|
||||||
<packaging>war</packaging>
|
<version>1.0.5-SNAPSHOT</version>
|
||||||
<name>irish-monitor-service</name>
|
<packaging>war</packaging>
|
||||||
<scm>
|
<name>irish-monitor-service</name>
|
||||||
<developerConnection>scm:git:gitea@code-repo.d4science.org:MaDgIK/irish-monitor-service.git</developerConnection>
|
<scm>
|
||||||
<tag>HEAD</tag>
|
<developerConnection>scm:git:gitea@code-repo.d4science.org:MaDgIK/irish-monitor-service.git</developerConnection>
|
||||||
</scm>
|
<tag>HEAD</tag>
|
||||||
<parent>
|
</scm>
|
||||||
<groupId>eu.dnetlib</groupId>
|
<parent>
|
||||||
<artifactId>uoa-spring-boot-parent</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
</parent>
|
|
||||||
<properties>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
||||||
<timestamp>${maven.build.timestamp}</timestamp>
|
|
||||||
<maven.build.timestamp.format>E MMM dd HH:mm:ss z yyyy</maven.build.timestamp.format>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
|
|
||||||
<dependency> <!-- this dependency includes dependency to uoa-monitor-service-library -->
|
|
||||||
<groupId>eu.dnetlib</groupId>
|
<groupId>eu.dnetlib</groupId>
|
||||||
<artifactId>uoa-monitor-service</artifactId>
|
<artifactId>uoa-spring-boot-parent</artifactId>
|
||||||
<version>1.1.13</version>
|
<version>1.0.0</version>
|
||||||
<classifier>library</classifier>
|
</parent>
|
||||||
</dependency>
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>E MMM dd HH:mm:ss z yyyy</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency> <!-- this dependency includes dependency to uoa-monitor-service-library -->
|
||||||
<groupId>eu.dnetlib</groupId>
|
<groupId>eu.dnetlib</groupId>
|
||||||
<artifactId>uoa-login-core</artifactId>
|
<artifactId>uoa-monitor-service</artifactId>
|
||||||
<version>2.1.1</version>
|
<version>1.1.13</version>
|
||||||
</dependency>
|
<classifier>library</classifier>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!--swagger-->
|
<dependency>
|
||||||
<dependency>
|
<groupId>eu.dnetlib</groupId>
|
||||||
<groupId>io.springfox</groupId>
|
<artifactId>uoa-login-core</artifactId>
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
<version>2.1.1</version>
|
||||||
<version>${swagger-version}</version>
|
</dependency>
|
||||||
</dependency>
|
|
||||||
<!--swagger official ui-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
|
||||||
<version>${swagger-version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
<!--swagger-->
|
||||||
<plugins>
|
<dependency>
|
||||||
<plugin>
|
<groupId>io.springfox</groupId>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<version>${swagger-version}</version>
|
||||||
<version>${spring-boot-version}</version>
|
</dependency>
|
||||||
<configuration>
|
<!--swagger official ui-->
|
||||||
<mainClass>eu.dnetlib.irishmonitorservice.IrishMonitorServiceApplication</mainClass>
|
<dependency>
|
||||||
<executable>true</executable>
|
<groupId>io.springfox</groupId>
|
||||||
</configuration>
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
<executions>
|
<version>${swagger-version}</version>
|
||||||
<execution>
|
</dependency>
|
||||||
<goals>
|
</dependencies>
|
||||||
<goal>repackage</goal>
|
<repositories>
|
||||||
</goals>
|
<repository>
|
||||||
</execution>
|
<id>dnet45-releases</id>
|
||||||
</executions>
|
<name>D-Net 45 Releases</name>
|
||||||
</plugin>
|
<url>https://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-releases/</url>
|
||||||
<plugin>
|
<releases>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<enabled>true</enabled>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
</releases>
|
||||||
<version>2.6</version>
|
<snapshots>
|
||||||
<configuration>
|
<enabled>false</enabled>
|
||||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
</snapshots>
|
||||||
</configuration>
|
<layout>default</layout>
|
||||||
</plugin>
|
</repository>
|
||||||
</plugins>
|
</repositories>
|
||||||
<finalName>irish-monitor-service</finalName>
|
<build>
|
||||||
<resources>
|
<plugins>
|
||||||
<resource>
|
<plugin>
|
||||||
<directory>src/main/resources</directory>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<filtering>true</filtering>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</resource>
|
<version>${spring-boot-version}</version>
|
||||||
</resources>
|
<configuration>
|
||||||
</build>
|
<mainClass>eu.dnetlib.irishmonitorservice.IrishMonitorServiceApplication</mainClass>
|
||||||
|
<executable>true</executable>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<finalName>irish-monitor-service</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#static properties
|
#static properties
|
||||||
api.title = Irish Monitor Service Documentation Swagger
|
api.title = Irish Monitor Service Documentation Swagger
|
||||||
api.description = Irish Monitor Service is a service which ...
|
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}
|
api.version = ${project.version}
|
||||||
|
|
Loading…
Reference in New Issue