Difference between revisions of "Gazelle Projects"

From IHE Wiki
Jump to navigation Jump to search
(Created page with "The Gazelle software at the INRIA forge has several different projects. This page describes the projects and gives you instructions on how to obtain each project, and the step...")
 
(No difference)

Latest revision as of 16:28, 7 March 2019

The Gazelle software at the INRIA forge has several different projects. This page describes the projects and gives you instructions on how to obtain each project, and the steps for building and testing.

Assuming you are using eclipse to manage code control with Subversion, do not download the entire Gazelle tree. You will find the process works better if you follow the instructions on this page.



Product Registry

Description

The IHE Product Registry is database/web system that will allow vendors to enter product information with a list of IHE profiles and actors supported by those products. This web system will provide a user search mechanism to allow customers to locate vendor products with desired actor/profile pairs.

Module List

  • ProductRegistry-ear
  • ProductRegistry-ejb
  • ProductRegistry-persistence
  • ProductRegistry-ui
  • Common-ejb
  • Common-ui
  • TF-ejb
  • TF-ui
  • Systems-ejb
  • Systems-ui
  • Users-ejb
  • Users-ui

Eclipse/Subversion Checkout Instructions

  • JBoss Application Server must be installed Prerequisites - Developement Tools)
  • From Eclipse, select "New project > Checkout projects from SVN"
  • Go into the repository "/svn/gazelle/ProductRegistry", and select all the projects inside (those listed above) and install/check out all the projects in your workspace. Do not select the ProductRegistry folder but the projects in this folder.
  • Be sure that you can see now the projects (as projects and not folders).
  • It is now recommended to define a Working set "ProductRegistry" in your Eclipse environment. You will see those projects in a folder, this will be a sight of your application. Read the section " How to configure your Eclipse environment ? " for further information.


Command Line / Subversion Checkout Instructions

Developers use Eclipse to checkout the projects. In case you want to checkout and build without using eclipse.

  • Subversion must be installed on your system (debian: apt-get install subversion)
  • Create a folder for your copy, place the following in a script (x.csh) and run the script.
 #!/bin/csh
 
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Common-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Common-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Systems-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Systems-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Users-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Users-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/TF-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/TF-ui
 
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/ProductRegistry/ProductRegistry-ear
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/ProductRegistry/ProductRegistry-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/ProductRegistry/ProductRegistry-persistence
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/ProductRegistry/ProductRegistry-ui

Configuration

  • Create a Postgres database for the Product Registry. You need to use the user name and database name listed below. You will have to know how to configure Postgres to allow a connection by this user (read the Postgres documentation). The first line below is the command to create the gazelle user in Postgres.
 createuser gazelle (you don't need this, if your database already has a gazelle user)
 createdb -U gazelle -E UTF8 product-registry
  • Make sure the JDBC driver for Postgres is copied to the JBoss folder (eg. postgresql-8.1-409.jdbc3.jar is added in your $JBOSS_HOME/server/default/lib/
  • Run your JBoss AS
  • Update the "build-dev.properties" or "build-prod.properties" file to match your configuration. Those 2 files are located in the directory : ProductRegistry-ear.

Update the following variables :

  jboss.as.home = /jboss/home
  jboss.seam.home = /jboss/seam/home
  gazelle.home = /opt/productRegistry
  ...
  database.connection.url=localhost/<your-database>
  database.connection.username=<your-database-username>
  database.connection.password=<your-database-password>
  ...
  application.url.basename= ProductRegistry      (in the case you want to access to the application with the URL : http://localhost:8080/ProductRegistry )

Do not check this file back in to the forge. This properties file now reflects your development system.

Build/Deploy Instructions

  • Build the application using Ant. A master script will generate all the application using child scripts (existing in each module).
  • To execute this ant master script, use a terminal emulator to run ant by hand. This is not yet integrated with the Eclipse IDE:
cd ~/workspace/ProductRegistry-ear/
ant -Dapplication=ProductRegistry -Dtarget=all -Dprofile=dev

The instructions above build for development. For production, substitute -Dprofile=prod.

  • During the Ant execution, check your ant console logs. At the end of execution, you should find :
 datasource:
    [echo] Deploy XML datasource file into JBoss environment...
    [copy] Copying 1 file to /usr/local/jboss/server/default/deploy
 deploy-ear-archive-in-jboss:
    [echo] Deploy the EAR archive into JBoss environment...
    [copy] Copying 59 files to /usr/local/jboss/server/default/deploy
 all:
    [echo] The EAR archive (with all modules) has been created and deployed. Check on your JBoss console.
 BUILD SUCCESSFUL

Test

  • Following the previous step, your application is now reachable on your Web browser, from the address :

http://localhost:8080/ProductRegistry (if your JBoss AS uses the 8080 port).

Your 'product-registry' database has been normally created with many tables, and populated using an import SQL script.

Safeguard your environment

  • If the project from the Forge deploys and works, we need to make it safe before developing. Your properties file and intermediate files do not belong in the forge.
  • In the Eclipse environment, select your working set.
  • In the “Java” perspective (or "Synchronize with the repository" perspective), add to the SVN:ignore all the generated files/directories out of commit procedures:
  • Please make sure that the following elements are not commitable :
 '/dist' directory
 '/exploded-archives' directory 
 '/lib-TF' directory (which contains the .jar file corresponding to this project)
 '/build.properties' file

Gazelle / Test Management

Description

The IHE Test Management is web application for the management of connectathon, as known as Gazelle.

Modules List

  • TestManagement-ear
  • TestManagement-ejb
  • TestManagement-persistence
  • TestManagement-ui
  • Common-ejb
  • Common-ui
  • TF-ejb
  • TF-ui
  • Systems-ejb
  • Systems-ui
  • Users-ejb
  • Users-ui

Eclipse/Subversion Checkout Instructions

  • JBoss Application Server must be installed Prerequisites - Developement Tools)
  • From Eclipse, select "New project > Checkout projects from SVN"
  • Go into the repository "/svn/gazelle/TestManagement", and select all the projects inside (those listed above) and install/check out all the projects in your workspace. Do not select the TestManagement folder but the projects in this folder.
  • Be sure that you can see now the projects (as projects and not folders).
  • It is now recommended to define a Working set "TestManagement" in your Eclipse environment. You will see those projects in a folder, this will be a sight of your application. Read the section " How to configure your Eclipse environment ? " for further information.

Command Line / Subversion Checkout Instructions

Developers use Eclipse to checkout the projects. In case you want to checkout and build without using eclipse.

  • Subversion must be installed on your system (debian: apt-get install subversion)
  • Create a folder for your copy, place the following in a script (x.csh) and run the script.
 #!/bin/csh
 
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Common-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Common-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Systems-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Systems-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Users-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Users-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/TF-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/TF-ui
 
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/TestManagement/TestManagement-ear
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/TestManagement/TestManagement-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/TestManagement/TestManagement-persistence
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/TestManagement/TestManagement-ui

Configuration

  • Create a Postgres database for the Test Management. You need to use the user name and database name listed below. You will have to know how to configure Postgres to allow a connection by this user (read the Postgres documentation). The first line below is the command to create the gazelle user in Postgres.
 createuser -P <database-username>   (you don't need this, unless you already have created the user)
 createdb -E UTF8 -U <database-username> <database-name>    
  • Make sure the JDBC driver for Postgres is copied to the JBoss folder (eg. postgresql-8.4-701.jdbc4.jar is added in your $JBOSS_HOME/server/default/lib/
  • In the TestManagement-ear project, you need to create a file build-dev.properties (for development version) or build-prod.properties (for production version). The development version will build a project with development database (including development data). The production version uses the production database (with no initial data, ready for a production). You can use the following command to create the 2 property files from the template :
cd workspace/TestManagement-ear
ant -Dprofile=prod update_build_properties
ant -Dprofile=dev update_build_properties

  • Update the "build-dev.properties" or "build-prod.properties" file to match your configuration. Those 2 files are located in the directory : TestManagement-ear.

Update the following variables :

  jboss.as.home = /jboss/home
  jboss.seam.home = /jboss/seam/home
  gazelle.home = /opt/gazelle
  ...
  database.connection.url=localhost/<database-name>
  database.connection.username=<database-username>
  database.connection.password=<database-password>
  ...
  application.url.basename= Gazelle      (Application will be reachable at  : http://localhost:8080/<application.url.basename>)

Do not check this file back in to the forge. This properties file now reflects your development system.

Build/Deploy Instructions

  • Build the application using Ant. A master script will generate all the application using child scripts (existing in each module).
  • To execute this ant master script, use a terminal to run ant :
cd ~/workspace/TestManagement-ear/
ant -Dapplication=TestManagement -Dtarget=all -Dprofile=dev

or

cd ~/workspace/TestManagement-ear/
ant -Dapplication=TestManagement -Dtarget=all -Dprofile=prod
  • During the Ant execution, check your ant console logs. At the end of execution, you should find :
 datasource:
    [echo] Deploy XML datasource file into JBoss environment...
    [copy] Copying 1 file to /usr/local/jboss/server/default/deploy
 
 deploy-ear-archive-in-jboss:
    [echo] Deploy the EAR archive into JBoss environment...
    [copy] Copying 59 files to /usr/local/jboss/server/default/deploy
 
 all:d
    [echo] The EAR archive (with all modules) has been created and deployed. Check on your JBoss console.
 
 BUILD SUCCESSFUL

Test

  • Following the previous step, your application is now reachable on your Web browser, from the address :

http://localhost:8080/Gazelle (if your JBoss AS uses the 8080 port). Please note that if you changed the variable application.url.basename to something else than Gazelle then you need to update the link accordingly.

Database tables are created and populated at deployment time.

Warning for developers

If you are a developer of the project, please make sure that you set all files generated at build time to svn.ignore. This will avoid to commit them back to the forge.

Production environment

TestManagement may be managed either within Development environment or within Production environment.

  • Within Development environment, application will be initialized with a lot of informations in the database, specially some fake companies informations. This is a way to test developed features in the application. The database is automatically dropped and recreated (and populated with all those informations). That is why you launched previous Ant commands, passing parameter -Dprofile=dev. All the data to be imported in the development database are located as SQL files into workspace/<project-module>-ejb/sql/data-dev directory (where <project-module> is : Common, Users, Systems, TF or TestManagement).


  • Within Production environment, application will be initialized with a minimum of informations in the database, just the needed informations to run the application. This is the way to install the application on a production server, not used by developers, but by vendors. In this environment, the database is never dropped, informations are always kept in the database, even after redeploying application. The database initialization (with an import SQL script) can be performed only one time, during the life of this application. There is a way to reinitialize the application for an administrator, described below. To work in the production environment, you have to launch Ant commands, passing parameter -Dprofile=prod. All the data to be imported in the production database are located as SQL files into workspace/<project-module>-ejb/sql/data-prod directory (where <project-module> is : Common, Users, Systems, TF or TestManagement).


How to install the production environment

Note for production environment : to install the application, follow steps below in order :

  • Drop and create by hand your database (if your database already exists, you may launch the script /TestManagement-ear/resources/clean_production_db.sql, or look Configuration section above, describing how to create the database).
  • Make sure that the data to be inserted into the production database are up-to-date for initialization in the different SQL files (if you did not, read for details Production environment section above).
  • Install and deploy your application (this step requires that you read the Configuration section before) : ant -Dapplication=TestManagement -Dprofile=prod -Dtarget=make-release
  • When deployment is over and tables are well-created, populate the initial database : ant -Dapplication=TestManagement -Dprofile=prod -Dtarget=populating-database-for-production


If you have already populated your production database, and you want to reinitialized the database executing the initial database populating script, you will see the error message below :

 [ERROR]  This production initialization has ever been performed in the past. Please read wiki (Production environment section in http://ihewiki.wustl.edu/wiki/index.php/Gazelle_Projects) for further informations.

There is a security file that prevents from this action, reacting as a safety lock. When the application is initialized for the first time, the file /TestManagement-ear/resources/production_db_already_initialized.txt is created. If an administrator needs to clean and repopulate the production database, he will have to delete this file, and repeat the steps above (How to install the production environment section)

How to configure your production environment

To configure your production environment, follow steps below in order :

Gazelle MasterModel

Description

The Gazelle Master Model application is used to manage data describing the components that comprise IHE Integration Profiles and the Gazelle test management system.

Module List

  • GazelleMasterModel-ear
  • GazelleMasterModel-ejb
  • GazelleMasterModel-persistence
  • GazelleMasterModel-ui
  • Common-ejb
  • Common-ui
  • TF-ejb
  • TF-ui
  • Users-ejb
  • Users-ui

Eclipse/Subversion Checkout Instructions

  • JBoss Application Server must be installed Prerequisites - Developement Tools)
  • From Eclipse Menu, select "File>New>project...
  • In the "New Project" Dialog "Select Wizard" tree, open the "SVN" folder, select "Checkout projects from SVN" and "Next".
  • Enter the repository : 'https://scm.gforge.inria.fr/svn/gazelle'
  • select this project and "Next".
  • Go into the repository "/svn/gazelle/GazelleMasterModel", and select all the projects inside (those listed above) and install/check out all the projects in your workspace. Do not select the GazelleMasterModel folder but the projects in this folder.
  • Be sure that you can see now the projects (as projects and not folders).
  • It is now recommended to define a Working set "GazelleMasterModel" in your Eclipse environment. You will see those projects in a folder, this will be a sight of your application. Read the section " How to configure your Eclipse environment ? " for further information.

Command Line / Subversion Checkout Instructions

Developers use Eclipse to checkout the projects. In case you want to checkout and build without using eclipse.

  • Subversion must be installed on your system (debian: apt-get install subversion)
  • Create a folder for your copy, place the following in a script (x.csh) and run the script.
 #!/bin/csh
 
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Common-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Common-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Systems-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Systems-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Users-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/Users-ui
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/TF-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/Modules/TF-ui
 
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/GazelleMasterModel/GazelleMasterModel-ear
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/GazelleMasterModel/GazelleMasterModel-ejb
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/GazelleMasterModel/GazelleMasterModel-persistence
 svn checkout https://scm.gforge.inria.fr/svn/gazelle/trunk/GazelleMasterModel/GazelleMasterModel-ui

Configuration

  • In the GazelleMasterModel-ear project, you need to update the "build-dev.properties" file with your configuration. To do that, in the root directory of the GazelleMasterModel-ear project, copy the file "build.properties.template" to "build-dev.properties" , and configure in this file the homepaths of your JBoss applications.
  jboss.as.home = /jboss/home
  jboss.seam.home = /jboss/seam/home

Do not check this file back in to the forge. This properties file now reflects your development system.

  • Create a Postgres database for the GazelleMasterModel. You need to use the user name and database name listed below. You will have to know how to configure Postgres to allow a connection by this user (read the Postgres documentation). The first line below is the command to create the gazelle user in Postgres.
 createuser gazelle (you don't need this, if your database already has a gazelle user)
 createdb -U gazelle master-model
  • Make sure the JDBC driver for Postgres is copied to the JBoss folder (eg. postgresql-8.1-409.jdbc3.jar is added in your $JBOSS_HOME/server/default/lib/
  • Run your JBoss AS

Build/Deploy Instructions

  • Build the application using Ant. A master script will generate all the application using child scripts (existing in each module).
  • To execute this ant master script, use a terminal emulator to run ant by hand. This is not yet integrated with the Eclipse IDE:
cd ~/workspace/GazelleMasterModel-ear/
ant -Dapplication= GazelleMasterModel -Dprofile=dev -Dtarget=all -Dprofile=dev
  • During the Ant execution, check your ant console logs. At the end of execution, you should find :


 datasource:
    [echo] Deploy XML datasource file into JBoss environment...
    [copy] Copying 1 file to /usr/local/jboss/server/default/deploy
 deploy-ear-archive-in-jboss:
    [echo] Deploy the EAR archive into JBoss environment...
    [copy] Copying 59 files to /usr/local/jboss/server/default/deploy
 all:
    [echo] The EAR archive (with all modules) has been created and deployed. Check on your JBoss console.
 BUILD SUCCESSFUL

Test

  • Following the previous step, your application is now reachable on your Web browser, from the address :

http://localhost:8080/MasterModel (if your JBoss AS uses the 8080 port).

Your 'test-management' database has been normally created with many tables, and populated using an import SQL script.

Shakespeare