OpenRIMS-RPM - Installation Part 2: Difference between revisions

From OpenRIMS Wiki
Jump to navigation Jump to search
(New Page)
 
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Configuring Google Authentication ==
OpenRIMS uses OATH2[1] to allow authenticate using Google login. For each deployment, the Google Authentication need to be configured separately.


= Objective =
The Google guide is available here for additional reference and detail:
              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:
https://developers.google.com/identity/sign-in/web/sign-in and https://developers.google.com/adwords/api/docs/guides/authentication


·       Ability to install and configure programs and components in the selected Operation System.
Here are the steps to perform:


·       The MySQL knowledge.
# Use a Google account to access the Google Cloud Console
# Create a Project unless you already have one
# Access APIs & Services for that Project
# Navigate to Credentials
# Create Oauth Client ID
# Choose Web Application
# Add Authorized Redirection URI e.g. <code>https://openrims.msh.org/login/oauth2/code/google</code>
# After clicking Create a Client Secret and a Client ID will be created. You need both for the below configuration of OpenRIMS.


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


·       At least 2 GB of free RAM
After configuration it will be necessary to copy Client ID and Client secret to the application.properties


·       At least 10GB of free SDD/HDD
<code>## OATH2</code>


·       Operation Systems:
<code>spring.security.oauth2.client.registration.google.client-id=client_id</code>


o  Windows Server 2016 and above
<code>spring.security.oauth2.client.registration.google.client-secret=client_secret</code>


o  Windows 10
{|
 
!Go Back to Part 1: [[OpenRIMS - Installation Part 1]]
o  Linux, released after 2018. Tested on Ubuntu 18.04.4 LTS and above
!
 
!
·       MySQL R 5.7
!Move Forward to Part 3: [[OpenRIMS - Installation Part 3]]
 
|}
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 (<nowiki>https://github.com/MSH/Pharmadex2/tree/main/database</nowiki>[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/'''
----[1] For current, available only to MSH staff

Latest revision as of 20:04, 14 August 2023

Configuring Google Authentication

OpenRIMS uses OATH2[1] to allow authenticate using Google login. For each deployment, the Google Authentication need to be configured separately.

The Google guide is available here for additional reference and detail:

https://developers.google.com/identity/sign-in/web/sign-in and https://developers.google.com/adwords/api/docs/guides/authentication

Here are the steps to perform:

  1. Use a Google account to access the Google Cloud Console
  2. Create a Project unless you already have one
  3. Access APIs & Services for that Project
  4. Navigate to Credentials
  5. Create Oauth Client ID
  6. Choose Web Application
  7. Add Authorized Redirection URI e.g. https://openrims.msh.org/login/oauth2/code/google
  8. After clicking Create a Client Secret and a Client ID will be created. You need both for the below configuration of OpenRIMS.


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

Go Back to Part 1: OpenRIMS - Installation Part 1 Move Forward to Part 3: OpenRIMS - Installation Part 3