Message-ID: <358747204.19960.1710847048892.JavaMail.confluence@ip-172-30-4-17.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_19959_1343637971.1710847048890" ------=_Part_19959_1343637971.1710847048890 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Installation Instructions

Installation Instructions

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

=20

Note: For convenience it is recommended that both the project pi= cker and the odm generator app be checked out to the C:\runtime\ folder.

=20

***This guide will assume that***

=20

1. Tomcat is installed

=20

2. You have the source availaible via an SVN client

=20

3. project 'redcapui' will be checked out to c:\runtime\redcapui

=20

4. project 'odm' will be checked out to c:\runtime\odm\

=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 
=20

***Step 1: Check out code for Project Picker UI app***<= /p>=20

1. Create a folder "redcapui". This is where we will checkout the projec= t from the svn repository.

=20

2. Right click on the "redcapui" folder and choose "svn checkout"

=20

3. For "URL of repository" use XXXXXXXXXX

=20

4. Leave all other values at default and click ok.

=20

***Step 2: Configure the Project Picker UI app***

= =20

1. Create a "c:\runtime\grails-config\redcapui" directory where the conf= iguration for the project will reside.

=20

2. Copy the attached Config.groovy and DataSource.groovy to this directo= ry.

=20

3. In Config.groovy update

=20

   - grails.serverURL by replacing "localhost" with the contex= t where tomcat is running on.

=20

   - Create a "c:\runtime\repository" directory and two sub di= rectories "inbox" and "archive" under it. This is where the odm files will = be stored.

=20

   - Provide absolute path to the repository directory and ass= ign it to "com.recomdata.odm.repositoryPath"

=20

   - Edit the Redcap webservice urls and the i2b2 database con= nection settings for your environment.

=20

4.In DataSource.groovy update

=20

   - production->datasource->url to point to a SQL Serve= r instance

=20

   - update username as necessary

=20

   - update passward as necessary

=20

   - leave dbCreate as "create". This will create the necessar= y tables once the app boots up.

=20

5.Create an empty database with the details as entered in step 4 above.<= /p>=20

6.Go back to the "redcapui" directory where the project picker app was c= hecked out. Find the file Config.groovy under ..\redcapui\grails-app\conf\C= onf\

=20

7.Find "defaultConfigFiles" property and edit it to provide absolute pat= hs to the Config.groovy and DataSource.groovy files we edited above.

=20

***Step 3: Setup Grails***

=20

1. Download latest Grails distribution from here

=20

2. Unzip the distribution in a suitable place. (For convenience I have i= t at C:\Program Files\grails\grails-1.3.7)

=20

3. Setup a 'GRAILS_HOME' system variable and set the value as the path t= o the directory where the grails distribution was unzipped.

=20

4. Add the bin folder inside GRAILS_HOME to your system Path

=20

5. Setup a 'JAVA_HOME' system variable and set the value to where a JDK = has been installed. If JAVA_HOME allready exists please verify that it does= not point to a JRE but infact to a JDK.
<= /p>=20

***Step 4: Check out code for ODM creation and translation app***

=20

1. Create a folder "odm". We will checkout the odm project into this dir= ectory.

=20

2. Right click on the "odm" folder and choose "svn checkout"

=20

3. For "URL of repository" use "XXXXXXX"

=20

4. Leave all other values at default and click ok.

=20

***Step 5: Setup Ant***

=20

1. Download Ant 1.8.2 from here

=20

2. Unzip ant into a suitable directory.

=20

3. Append the path to the ANT/bin directory to your system path.

=20

***Step 6: Building the ODM project***

=20

1. In a command prompt navigate to c:\runtime\odm

=20

2. Type "ant" and press enter.

=20

3. The odm project will be built and the binary will be compressed into = a jar file.

=20

4. This jar file will be placed in the lib directory of the redcapui pro= ject.

=20

***Step 7: Building the redcapui project***

=20

1. In a command prompt navigate to c:\runtime\redcapui

=20

2. Type "grails war"

=20

3. This will create a war (a compressed java web archive) in the c:\runt= ime\redcapui\target directory

=20

4. In a web browser go to http://localhost:8080/manager/htm= l  

=20

(change the port to where tomcat is installed. Bitnami installations mig= ht not need a port specified)

=20

5. Select and deploy the generated redcapui.war file.

=20

*** Additional Notes ***

=20

How to Build and Deploy for Production

=20

Assuming the production server is named 'myprod':

=20

1. Generate war file.

=20

   a. update redcapui, odm project sources in C:\runtime\odm a= nd C:\runtime\redcapui. (right-click, SVN Update).

=20

   b. odm build: on crit-test, in DOS window go to c:\runtime\= odm, enter 'ant'.

=20

   c. redcapui build: on crit-test, go to c:\runtime\redcapui,= enter 'grails war'. redcapui build warns that authentication library not f= ound. Skip warning.

=20

   d. Redeploy:

=20

      d.1 Open IE, go to http://lo= calhost:8080/manager/html

=20

      d.2 ALTERNATIVELY, browse to myprod\\C:\P= rogram Files\BitNami Apache Tomcat Stack\apache-tomcat\webapps, delete war = file and app directory redcapui, copy the war file in C:\runtime\redcapui\t= arget to the webapps directory, then stop and restart the Apache Tomcat ser= vice.  This automatically unzips the war file into the correct directo= ry structure.

=20

On myprod,

=20

   the Config.groovy and DataSource.groovy configuration files= are in C:\runtime\grails-config\redcapui.

=20

   the redcapui executable files are in C:\Program Files\BitNa= mi Apache Tomcat Stack\apache-tomcat\webapps\redcapui.

=20

   the redcapui sources are in C:\runtime.

=20

   the log file is in C:\runtime\logs.

=20

   the archive and inbox directories are in C:\runtime\reposit= ory.

=20

Runtime

=20

Enable/Disable debug logging - in config.groovy, use one of the followin= g:

=20

   info   'org.mortbay.log'

=20

   debug  'org.mortbay.log'

=20

Database Initialization: to init the rcdata database at startup, in Data= Source.groovy:

=20

   dbCreate =3D "create"

=20

otherwise:

=20

   dbCreate =3D "update"

=20

When creating a new server connection in the app, specify the path to th= e REDCap_Service directory e.g. https:// your_redcap_instance/REDCap_Servic= e/

------=_Part_19959_1343637971.1710847048890--