OpenRIMS-RPM - Installation Part 2

From OpenRIMS Wiki
Jump to navigation Jump to search

Objective

              This document helps deploy Pharmadex 2 software first time, along with the demo database.

The audience of it is IT persons that are responsible to install and maintain the Pharmadex 2 software. Minimal qualification requirements are:

·       Ability to install and configure programs and components in the selected Operation System.

·       The MySQL knowledge.

Pre-conditions

              Regardless of deployment configuration selected, the following pre-conditions should be fulfilled:

·       At least 2 GB of free RAM

·       At least 10GB of free SDD/HDD

·       Operation Systems:

o  Windows Server 2016 and above

o  Windows 10

o  Linux, released after 2018. Tested on Ubuntu 18.04.4 LTS and above

·       MySQL R 5.7

o  Server

o  Workbench

·       Oracle Java JDK 1.8. OpenJDK 1.8 has been tested on Linux Ubuntu, but not Windows

·       Internet connection. Properties of it should suit minimal requirements for Google Mail

·       Binary Pharmadex 2 distribution (see below)

·       Pharmadex 2 demo database (https://github.com/MSH/Pharmadex2/tree/main/database[1])

·       The own, private Google Mail account

Pharmadex 2 binary distribution

The possibility to build the Pharmadex 2 software directly from the source codes is possible, however is not covered by this document. However, this manual describes deployment from the binary distribution. For current, the MSH staff may get this distribution from the corporative GitHub, address is

              The descriptions of binary components may be found in the respective file README.md

Steps to deploy

Prepare to install

1.      Install using the vendor’s deployment manual:

1.1.   MySQL

1.2.   Java JDK 1.8

2.      Restore the demo database to MySQL using MySQL Workbench or the command line

3.      Copy the binary application pharmadex2-0.0.1.jar  and application.properties to the dedicated folder, e.g. applications/pharmadex2

Configure

Local TCP/IP port

In the application.properties file edit the values marked bold (if it will be necessary):

Database

              In the application.properties file edit the values marked bold:

spring.datasource.url = jdbc:mysql://localhost/pdx2?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&characterSetResults=UTF-8&serverTimezone=Europe/Kiev

spring.datasource.username = username

spring.datasource.password = password

Logs

              In the application.properties file edit the values marked bold:

logging.file.path=/home/alexk/pharmadex/log

the good choice is:

logging.file.path= ./log/


After configuration it will be necessary to copy Client ID and Client secret to the application.properties

## OATH2

spring.security.oauth2.client.registration.google.client-id=client_id

spring.security.oauth2.client.registration.google.client-secret=client_secret

Install as a service

              For Linux the official guide is here https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html#deployment.installing.nix-services.system-d

              For Windows the official guide is here https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html#deployment.installing.windows-services

              Examples of the configurations are in the binary distributive. The folders are “windows” and “Linux”.

Provide access from the Internet

              To provide access from the Internet it will be a good idea to establish a proxy gateway like Nginx or Apache2. The example of virtual server configuration for Apache 2 is in the binary distributive, folder “Linux”.


Configuring Google Authentication

LINK: See Configuring Google Authentication for Pharmadex 2

Special Configuration

LINK: See IIS as a gateway for Spring Boot application



[1] For current, available only to MSH staff