2 Page 2: Setup Configurations
Bernaldo Mihasi edited this page 2022-09-05 08:55:52 +02:00

Page 2: Setup Configurations

A. Database:

The only configuration that is used is in /dmp-db-scema/Docker/dmp-db.env

Inside the file it contains configuration for the admin users (database, app), database name and admin passwords.

The values are:

ADMIN_USER: Admin username (app)

ADMIN_PASSWORD: Admin password (app)

POSTGRES_DB: database name

POSTGRES_USER: Admin username (database)

POSTGRES_PASSWORD: Admin password (database)

NOTE: The passwords are ONLY placeholders and MUST be changed

B. Backend

1. App configuration

The app configurations are in the /dmp-backend/web/src/main/resources/config folder.

Inside the folder there are 4 .properties files:

  • application.properties: Main configuration file (loads before any other)
  • application-devel.properties: Devel Profile (Internal development) configuration
  • application-staging.properties: Staging Profile (testing build) configuration
  • application-production.properties: Production Profile (main build) configuration

Inside the files you will find the following properties:

Properties with bold are the minimun that have to be configured so as the app works properly

application-staging.properties application.properties
dmp.domain the domain name of the server
database.url the url that is used to connect to database (JDBC based)
database.username database admin username
database.password database admin password
pdf.converter.url the url of the PDF converter service
server.port the network port the application is listening to
server.tomcat.max-threads the maximum number of request processing threads to be created
server.tomcat.max-connections the maximum number of connections that the server accepts
spring.profiles.active the active profile of the app (devel, staging, production)
elasticsearch.host the host url of the elastic server
elasticsearch.port the host port of the elastic server
elasticsearch.username the elastic server admin username
elasticsearch.password the elastic server admin password
elasticsearch.index the index which will be used if exists or created
elasticsearch.usingssl whether SSL is used to communicate with the elastic server
elasticsearch.certPath the path of the certification used in SSL
elasticsearch.certKey the key of the certification used in SSL
configuration.externalUrls path to the externalUrls xml file
configuration.rda path to RDACommonStandards.txt
configuration.h2020template path to H2020 export dmp template (.docx)
configuration.h2020datasettemplate path to H2020 export dataset template (.docx)
configuration.configurable_login_providers path to ConfigurableLoginProviders.json
configuration.doi_funder path to DOI_Funder.json
autouser.root.* setup an auto login user (email, username, password)
facebook.login.clientId Facebook API client Id
facebook.login.clientSecret Facebook API client Secret
facebook.login.namespace Facebook API namespace
google.login.clientId Google API client Id
linkedin.login.clientId LinkedIn API client Id
linkedin.login.clientSecret LinkedIn API client Secret
linkedin.login.redirect_uri LinkedIn API redirect uri
linkedin.login.user_info_url LinkedIn API user info url
linkedin.login.user_email LinkedIn API user email
linkedin.login.access_token_url LinkedIn API access token url
twitter.login.clientId Twitter API client Id
twitter.login.clientSecret Twitter API client Secret
twitter.login.redirect_uri Twitter API redirect uri
b2access.externallogin.user_info_url B2 Access API user info url
b2access.externallogin.access_token_url B2 Access API access token url
b2access.externallogin.redirect_uri B2 Access API redirect uri
b2access.externallogin.clientid B2 Access API client Id
b2access.externallogin.clientSecret B2 Access API client Secret
database.driver-class-name database class name
database.lock-fail-interval time before the editor lock to be automatially dleleted (in milliseconds)
database.driver-class-name database class name
userguide.path path to the user manual directory e.g <project's directory>/user-guide
notification.rateInterval time before to retry to send the notifications (in milliseconds)
notification.maxRetries number of maximum retries before it stop sending the notifications
notification.modified.subject default email subject for edited DMP/Dataset notification
notification.publish.subject default email subject for published DMP notification
notification.finalised.subject default email subject for finalised DMP notification
notification.modifiedFinalised.subject default email subject for modified and finalised DMP notification
logging.config path to the logback configuration file
temp.temp path to internal temp folder
file.storage path to internal final folder
language.path path to the language files e.g <project's directory>/dmp-frontend/src/assets/i18n/

2. External Urls

The externalUrls are used in order to retrieve data from external sources (funders, grants, organizations etc)

The files are in <project's directory>/dmp-backend/externalUrls folder.

There are 3 files:

ExternalUrls.xml: Default externalUrl configuration

ExternalUrlsStaging.xml: externalUrls configuration for the Staging Profile

ExternalUrlsProduction.xml: externalUrls configuration for the Production Profile

Inside these files there are:

registries: The Dataset external reference for registries

grants: The DMP grants

projects: The DMP projects

funders: The DMP funders  

repositories: The Dataset external reference for repositories

services: The Dataset external reference for services

researchers: The DMP researchers

organisations: The DMP organizations

datasets: The Dataset external reference for datasets

Inside each one there are:

urls: list of urls from where the data will be retrieved

fetchMode: How the data will be fetched. Available values are:

FIRST: Load ONLY the first urls configuration

ALL: Load ALL the urls configurations

On each urls there are urlConfigs from which each one is having:

key: Configuration key (lowercase)

Label: Configuration Name

type: type of the data source (usually External)

url: The url template that will be used for retrieving the data

funderQuery: (OpenAIRE only) The Funder search query

firstPage: The default page that is used if none is specified

contenttype: The content Type to be returned by the source

data: the data returned

paginationpath: The path where pagination data are from the response

Inside data there are different fields based on the content type:

JSON:

path: the json path where the data are

fields: the name of the fields to be read and where to be mapped. example : <id>'myid'</id> it will map myid to the id value

XML:

parse-class: The classpath to be used for parsing the xml document

parse-field: The xml field that is used as a root for parsing

merge-fields: The fields that will be merged together (with space character)

merge-field-name: The name of the merged field

B. Frontend

The only configuration that is used is the <project's directory>/dmp-frontend/webapp/config/config.json

Inside the file there are those properties:

production: Enable or Disable Production default configuration

Server: The url to the Backend service

App: The url to the Frontend service

defaultCulture: The default culture

LoginProviders which has:

enabled: An array of the loginproviders to be used. Available values:

1: Google
2: Facebook
3: Twitter
4: LinkedIn
6: B2Access
7: ORCID
8: OpenAIRE
9: Configurable LoginProvider
10: Zenodo

lockInteval: After how much time it will send an editor lock request to the backend (in milliseconds)

guideAssets: path to the folder that contains the user Manual assets (images etc)

allowOrganizationCreator: Allow the user to create custom organizations when creating or updating DMPs

The minimun property that has to be configured is loginProviders.googleConfiguration.clientId which stores the Google API client Id