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
=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
=20Note: For convenience it is recommended that both the project pi=
cker and the odm generator app be checked out to the C:\runtime\ folder.
***This guide will assume that***
=201. Tomcat is installed
=202. You have the source availaible via an SVN client
=203. project 'redcapui' will be checked out to c:\runtime\redcapui
=204. 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
***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.
=202. Right click on the "redcapui" folder and choose "svn checkout"
=203. For "URL of repository" use XXXXXXXXXX
=204. Leave all other values at default and click ok.
***Step 2: Configure the Project Picker UI app***
= =201. Create a "c:\runtime\grails-config\redcapui" directory where the conf= iguration for the project will reside.
=202. Copy the attached Config.groovy and DataSource.groovy to this directo= ry.
=203. 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.
=204.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.
=205.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\
=207.Find "defaultConfigFiles" property and edit it to provide absolute pat=
hs to the Config.groovy and DataSource.groovy files we edited above.
***Step 3: Setup Grails***
=201. Download latest Grails distribution from here
=202. Unzip the distribution in a suitable place. (For convenience I have i= t at C:\Program Files\grails\grails-1.3.7)
=203. Setup a 'GRAILS_HOME' system variable and set the value as the path t= o the directory where the grails distribution was unzipped.
=204. Add the bin folder inside GRAILS_HOME to your system Path
=205. 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= strong>***
=201. Create a folder "odm". We will checkout the odm project into this dir= ectory.
=202. Right click on the "odm" folder and choose "svn checkout"
=203. For "URL of repository" use "XXXXXXX"
=204. Leave all other values at default and click ok.
***Step 5: Setup Ant***
=201. Download Ant 1.8.2 from here
=202. Unzip ant into a suitable directory.
=203. Append the path to the ANT/bin directory to your system path.
***Step 6: Building the ODM project***
=201. In a command prompt navigate to c:\runtime\odm
=202. Type "ant" and press enter.
=203. The odm project will be built and the binary will be compressed into = a jar file.
=204. This jar file will be placed in the lib directory of the redcapui pro=
ject.
***Step 7: Building the redcapui project***
=201. In a command prompt navigate to c:\runtime\redcapui
=202. Type "grails war"
=203. This will create a war (a compressed java web archive) in the c:\runt= ime\redcapui\target directory
=204. 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)
=205. Select and deploy the generated redcapui.war file.
*** Additional Notes ***
=20How to Build and Deploy for Production
=20Assuming the production server is named 'myprod':
=201. Generate war file.
=20a. update redcapui, odm project sources in C:\runtime\odm a= nd C:\runtime\redcapui. (right-click, SVN Update).
=20b. odm build: on crit-test, in DOS window go to c:\runtime\= odm, enter 'ant'.
=20c. redcapui build: on crit-test, go to c:\runtime\redcapui,= enter 'grails war'. redcapui build warns that authentication library not f= ound. Skip warning.
=20d. Redeploy:
=20d.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.
On myprod,
=20the Config.groovy and DataSource.groovy configuration files= are in C:\runtime\grails-config\redcapui.
=20the redcapui executable files are in C:\Program Files\BitNa= mi Apache Tomcat Stack\apache-tomcat\webapps\redcapui.
=20the redcapui sources are in C:\runtime.
=20the log file is in C:\runtime\logs.
=20 the archive and inbox directories are in C:\runtime\reposit=
ory.
Runtime
=20Enable/Disable debug logging - in config.groovy, use one of the followin= g:
=20info 'org.mortbay.log'
=20 debug 'org.mortbay.log'
Database Initialization: to init the rcdata database at startup, in Data= Source.groovy:
=20dbCreate =3D "create"
=20otherwise:
=20dbCreate =3D "update"
=20When 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/