From 09d28944872d9c4d1ac8e6a425882c80003a4125 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Anne-Ga=C3=ABlle=20Berg=C3=A9?=
 <anne-gaelle.berge@kereval.com>
Date: Thu, 21 Mar 2019 17:09:22 +0100
Subject: [PATCH] update Gazelle TM installation guide

---
 Test-Management/installation.md | 78 ++++++++++++++-------------------
 1 file changed, 33 insertions(+), 45 deletions(-)

diff --git a/Test-Management/installation.md b/Test-Management/installation.md
index 8144ac2..4fb1dcf 100755
--- a/Test-Management/installation.md
+++ b/Test-Management/installation.md
@@ -19,50 +19,21 @@ Thanks for having chosen Gazelle !
 
 Here is a guide to help you with installing Test Management.
 
-# Quick start
+# Pre-requisites
 
-Install Debian squeeze 64bits with an Internet access. As root :
+Gazelle Test Management runs under Jboss AS 7.2.0 with a postgresql PostGresql 9.1 or higher database. For general considerations regarding the installation of the 
+application server, read [Jboss7 installation guide](../General/jboss7.html).
 
-1. Get the setup script
-```bash
-wget https://gazelle.ihe.net/jenkins/job/gazelle-public-RELEASE/ws/gazelle-tm-ear/src/main/scripts/setup.sh
-```
-
-2. Add valid rights to the script
-```bash
-chmod +x setup.sh
-```
-
-3. Execute the script  
-```bash
-./setup.sh
-```
-
-When you see the line
-```bash
-[org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.2.0.Final "Janus" started in 1713ms - Started 120 of 173 services (53 services are passive or on-demand)
-```
-It means that TM is started. You can configure/access it using http://server:8080/gazelle. Once server is started, you can continue to step 6.
-
-# 1. Requirements
-
-Gazelle has been developed using Java under IntelliJ IDEA. You will find below the list of applications you need to compile and run Test Management.
-
-* Compilation : Apache Maven 3.0.5
-* Database : PostGresql 9.1
-* Java virtual machine : JDK 1.7 or higher
-* Application server : Jboss 7.2.0.Final
-
-# 2. Sources
+# Sources
 
 Test Management is an open source project under Apache2 licence. The sources are available on the INRIA's Forge:
 ```bash
 svn checkout https://scm.gforge.inria.fr/anonscm/svn/gazelle/Maven/gazelle-tm/trunk/
 ```
 
-# 3.  Database creation and initialization
+# Database creation and initialization
 
-The name of the database is defined in the pom.xml file. Create this database using the command :
+You can choose whatever database name you want. You will need to report it in the datasource section of the Jboss configuration.
 ```bash
 su postgresql
 psql
@@ -78,7 +49,9 @@ Download the file containing all the data required by the application to properl
 pg_restore -U gazelle -h 127.0.0.1 -d your_database tm-first-import.data
 ```
 
-# 4. Compile
+# Binary
+
+You can either fetch the public EAR (released version) in our [Nexus repository](https://gazelle.ihe.net/nexus/index.html#nexus-search;gav~~gazelle-tm-ear*~~~) or compile the tool by your own.
 
 Before compiling, go to the directory gazelle-tm and edit the file pom.xml. Open this file and adapt the properties of profile prod to your case:
 
@@ -86,29 +59,44 @@ Before compiling, go to the directory gazelle-tm and edit the file pom.xml. Open
 * jdbc.connection.url : replace the last segment with your database name
 * jdbc.connection.user / jdbc.connection.password : credentials for database access
 * Then, create the EAR archive with the command line:
+
 ```bash
-cd gazelle-tm; mvn clean package -Ppublic,distribution
+cd gazelle-tm; mvn clean package -Pprod,distribution
 ```
 
 The archive (EAR) and the distribution file are created and placed into gazelle-tm/gazelle-tm-ear/target directory.
 
-# 5. Deployment
+# Deployment
 
-Test Management requires JBoss 7 to have some additional libraries.
+Test Management requires JBoss 7.2.0 to have some additional libraries (see pre-requisites section).
 
-You can find our Jboss 7 version here : *https://gazelle.ihe.net/jboss7/*
+Since version 5.10.0, Before you start your Jboss server, you shall configure the datasource at [YOUR_JBOSS_INSTALL]/standalone/configuration/standalone.xml. 
+Read details in the "Externalize datasources from tool projects" section of [JBoss 7 installation page](../General/jboss7.html).
 
-If you use another Jboss 7 you need to update it. Stop your Jboss server and copy:
+The datasource element to import in the standalone.xml file is available in the [project](https://gazelle.ihe.net/jenkins/view/Test%20Management/job/gazelle-tm-public/ws/gazelle-tm-ear/src/main/datasource/TestManagement-ds.xml).
 
--   postgresql-9.0-801.jdbc4.jar from ditribution file in \\modules\\system\\layers\\base\\org\\postgresql\\main JBoss directory. Edit module.xml, in the same directory, to have the same version inside.
+Once you have copied the content of this file in your Jboss configuration:
 
--   hibernate-core-4.2.20.Final.jar and hibernate-entitymanager-4.2.20.Final.jar from distribution file in \\modules\\system\\layers\\base\\org\\hibernate\\main Jboss directory. Edit module.xml, in the same directory, to have the same version inside.
+* Update the ${jdbc.connection.url} variable to the location of your database. If postgres is running locally, should be something like jdbc:postgresql:\[DB_NAME\].
+* Update the ${seamName} variable to:
+    * 'TestManagement' if the EAR has been built with the __public__, __CAT__, __eucat__, or __na__ profile (that is the case if you download it from Nexus)
+    * 'TestManagementDEV' if the EAR has been built with the __dev__ profile (it is typically the case if you compiled the tool without specifying a profile)
+    * 'GMM' if the EAR has been built with the __gmm__ profile (it is the case for the instance running at https://gazelle.ihe.net/GMM)
+    * 'ProductRegistry' if the EAR has been built with the __pr__ profile (it is the case for the instance running at https://product-registry.ihe.net/PR)
+* Update ${jdbc.user} and ${jdbc.password} to match your database user and password
+* Update ${min.pool.size} and ${max.pool.size} with consistent data (be careful, those values are also set in persistence.xml). Use:
+    * min.pool.size = 5 and max.pool.size = 150 for the instance running during EU-CAT or NA connectathons
+    * min.pool.size = 1 and max.pool.size = 70 for the instance running at EU-CAT outside of connectathon periods and for intances using the __public__ profile
+    * min.pool.size = 1 and max.pool.size = 30 for the Gazelle Master Model
+    * min.pool.size = 1 and max.pool.size = 10 for the Product Registry and other instances
+    
+You can retrieve those values in [gazelle-tm's pom.xml file](https://gazelle.ihe.net/jenkins/view/Test%20Management/job/gazelle-tm-public/ws/pom.xml) for each profile.
+    
 
--   javassist-3.18.1-GA.jar from ditribution file in \\modules\\system\\layers\\base\\org\\javassist\\main Jboss directory. Edit module.xml, in the same directory, to have the same version inside.
 
 Copy the gazelle-tm.ear into the " standalone\\deployments" directory of your JBoss 7 server. Finally, start your server. When the application is deployed, open a browser and go to **http://yourserver/gazelle**. If the deployment and the database initialization are successful you should see the home page.
 
-# 6. Configuration
+# Configuration
 
 This instance of Test Management you have just deployed is free of organization, user and testing session. Consequently, the next step will be to create your organization, your account (as an administrator of the application) and the testing session. A testing session is used to hold one event, for example a Connectathon, a showcase or whatever requiring the use of Test Management. If the first part of the installation is successful, you should see the Gazelle home page (see file entitled Home page before installation).
 
-- 
GitLab