========================================================================================
Note: For convenience it is recommended that both the project picker and the odm generator app be checked out to the C:\runtime\ folder.
***This guide will assume that***
1. Tomcat is installed
2. You have the source availaible via an SVN client
3. project 'redcapui' will be checked out to c:\runtime\redcapui
4. project 'odm' will be checked out to c:\runtime\odm\
=====================================================================================
***Step 1: Check out code for Project Picker UI app***
1. Create a folder "redcapui". This is where we will checkout the project from the svn repository.
2. Right click on the "redcapui" folder and choose "svn checkout"
3. For "URL of repository" use XXXXXXXXXX
4. Leave all other values at default and click ok.
***Step 2: Configure the Project Picker UI app***
1. Create a "c:\runtime\grails-config\redcapui" directory where the configuration for the project will reside.
2. Copy the attached Config.groovy and DataSource.groovy to this directory.
3. In Config.groovy update
- grails.serverURL by replacing "localhost" with the context where tomcat is running on.
- Create a "c:\runtime\repository" directory and two sub directories "inbox" and "archive" under it. This is where the odm files will be stored.
- Provide absolute path to the repository directory and assign it to "com.recomdata.odm.repositoryPath"
- Edit the Redcap webservice urls and the i2b2 database connection settings for your environment.
4.In DataSource.groovy update
- production->datasource->url to point to a SQL Server instance
- update username as necessary
- update passward as necessary
- leave dbCreate as "create". This will create the necessary tables once the app boots up.
5.Create an empty database with the details as entered in step 4 above.
6.Go back to the "redcapui" directory where the project picker app was checked out. Find the file Config.groovy under ..\redcapui\grails-app\conf\Conf\
7.Find "defaultConfigFiles" property and edit it to provide absolute paths to the Config.groovy and DataSource.groovy files we edited above.
***Step 3: Setup Grails***
1. Download latest Grails distribution from here
2. Unzip the distribution in a suitable place. (For convenience I have it at C:\Program Files\grails\grails-1.3.7)
3. Setup a 'GRAILS_HOME' system variable and set the value as the path to the directory where the grails distribution was unzipped.
4. Add the bin folder inside GRAILS_HOME to your system Path
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.
***Step 4: Check out code for ODM creation and translation app***
1. Create a folder "odm". We will checkout the odm project into this directory.
2. Right click on the "odm" folder and choose "svn checkout"
3. For "URL of repository" use "XXXXXXX"
4. Leave all other values at default and click ok.
***Step 5: Setup Ant***
1. Download Ant 1.8.2 from here
2. Unzip ant into a suitable directory.
3. Append the path to the ANT/bin directory to your system path.
***Step 6: Building the ODM project***
1. In a command prompt navigate to c:\runtime\odm
2. Type "ant" and press enter.
3. The odm project will be built and the binary will be compressed into a jar file.
4. This jar file will be placed in the lib directory of the redcapui project.
***Step 7: Building the redcapui project***
1. In a command prompt navigate to c:\runtime\redcapui
2. Type "grails war"
3. This will create a war (a compressed java web archive) in the c:\runtime\redcapui\target directory
4. In a web browser go to http://localhost:8080/manager/html
(change the port to where tomcat is installed. Bitnami installations might not need a port specified)
5. Select and deploy the generated redcapui.war file.
*** Additional Notes ***
How to Build and Deploy for Production
Assuming the production server is named 'myprod':
1. Generate war file.
a. update redcapui, odm project sources in C:\runtime\odm and C:\runtime\redcapui. (right-click, SVN Update).
b. odm build: on crit-test, in DOS window go to c:\runtime\odm, enter 'ant'.
c. redcapui build: on crit-test, go to c:\runtime\redcapui, enter 'grails war'. redcapui build warns that authentication library not found. Skip warning.
d. Redeploy:
d.1 Open IE, go to http://localhost:8080/manager/html
d.2 ALTERNATIVELY, browse to myprod\\C:\Program Files\BitNami Apache Tomcat Stack\apache-tomcat\webapps, delete war file and app directory redcapui, copy the war file in C:\runtime\redcapui\target to the webapps directory, then stop and restart the Apache Tomcat service. This automatically unzips the war file into the correct directory structure.
On myprod,
the Config.groovy and DataSource.groovy configuration files are in C:\runtime\grails-config\redcapui.
the redcapui executable files are in C:\Program Files\BitNami Apache Tomcat Stack\apache-tomcat\webapps\redcapui.
the redcapui sources are in C:\runtime.
the log file is in C:\runtime\logs.
the archive and inbox directories are in C:\runtime\repository.
Runtime
Enable/Disable debug logging - in config.groovy, use one of the following:
info 'org.mortbay.log'
debug 'org.mortbay.log'
Database Initialization: to init the rcdata database at startup, in DataSource.groovy:
dbCreate = "create"
otherwise:
dbCreate = "update"
When creating a new server connection in the app, specify the path to the REDCap_Service directory e.g. https:// your_redcap_instance/REDCap_Service/
125 Comments
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous