MDR Core Manual Installation
Step 1. Install the Prerequisites
mdrCore depends on a number of software components. Make sure you download the software prerequisites and configure your environment properly to use mdrCore.
Step 2. Obtain a Software Release
Download openMDR 1.0 Source Bundle
Download the source release: Source Code zip![]()
- Build Instructions: openMDR1.0
Obtain openMDR 1.0 from the Repository
You can connect to the openMDR repository and download the source code. This option is similar to downloading the source release, but has the benefit of getting you all the latest updates to the code since it was released. That is, the source code checkout always has the latest patches applied to fix bugs found since the openMDR release.
Source Code: Subversion Checkout on Linux
On Linux systems, use the commands shown below to check out from the SVN repository.
Source Code: Subversion Checkout on Windows
On Windows systems, we recommend the following 3rd party tool as a GUI front-end to subversion to check out a caGrid release: http://tortoisesvn.tigris.org
The command line version of subversion can be obtained from http://subversion.tigris.org![]()
openMDR 1.0 Release Stream
openMDR 1.0 Latest

openMDR 1.0

Development Stream

svn checkout https://gforge.nci.nih.gov/svnroot/grid-incubation/trunk/grid-incubation/incubator/projects/mdr/
| Note You might have to setup proxy variables in your svn profile if you are behind a firewall. |
* Setup environment variable "OPENMDR_HOME" for your source code checkout:
export OPENMDR_HOME=/home/mdrcore/projects/openMDR_1.0
Step 3. Build openMDR
Once you have mdrCore project on you host system with Java, Ant, Globus and Exist Database prerequisites in place you can build mdrCore
- Build mdr project from the project root so as to resolve the dependencies. The above checkout comprises of multiple projects in MDR.
a) Goto the the mdr project directory:$ cd $OPENMDR_HOME
b) Run the default target. This process is going to take a while when run for the first time, as it resolves and downloads multiple dependencies.
$ ant all
Step 4. Deploy mdrCore
Go to the mdrCore project within the projects directory in mdr
$ cd projects/mdrCore
* Make sure the Exist database service is running before you run the "ant install" target.
- Install the MDR Core artifacts in the eXist Database. MDR database will be created in
exist and the management web application will be deployed.a) $ ant install
You will need the database hostname, database port number, admin username and password that was used during ExistDb installation process.
A default test demokeystore is created. On production systems, this should be replaced with your institution specific jetty host certificate. In $OPENMDR_HOME/projects/mdrCore/build.xml file, there is a generateKey task that creates a key for the values specified.
<target name="generateKey" unless="keyexists"> <genkey alias="jetty" storepass="12345" keystore="${exist.dir}/tools/jetty/etc/demokeystore" validity="100000"> <dname> <param name="CN" value="MDR" /> <param name="OU" value="Anonymous" /> <param name="O" value="cagrid.org" /> <param name="C" value="US" /> </dname> </genkey> </target>
The parameters can be customized to create something specific to your institution. Alternatively, if you can generate a certificate for your host from your institution's registration authority, you can delete the one generated for jetty in the above task, and import the one generated by your institution with same same alias "jetty".
Example:
$ ant install
Buildfile: build.xml
generateKey:
[genkey] Generating Key for jetty
getDBHost:
[input] Database Host
[input]
localhost
getDBPort:
[echo] Please make sure you enter the actual values you want to configure
[input] Database Port
[input]
8080
getDBUserName:
[input] Database Admin User Name
[input]
admin
getDBPassword:
[input] Database Admin Password
[input]
cagrid
... BUILD SUCCESSFUL Total time: 47 seconds
if the key-pair has already been created, you might encounter the following problem:
$ ant install
Buildfile: build.xml
generateKey:
[genkey] Generating Key for jetty
[genkey] keytool error: java.lang.Exception: Key pair not generated, alias <jetty> already exists
BUILD FAILED
/home/mdrcore/projects/mdr/projects/mdrCore/build.xml:44: genkey returned: 1
This means that the key-pair has already been created. Use the following target to deploy the database again: $ ant uploadDatabase |
* Restart the exist service and open the URL http://<serverHost>:<serverPort>
Example: http://mdr.triadcommunity.org:8080
]
Step 5(Optional). Customize your local MDR installation
Step 5(A). eXist Database Port Configuration:
Use the following target to configure the installed eXist database:
ant configDatabase
Example:
$ ant configDatabase
Buildfile: build.xml
getDBHost:
[input] Database Host
[input]
localhost
getDBPort:
[echo] Please make sure you enter the actual values you want to configure
[input] Database Port
[input]
9090
configDatabase:
[echo] Previous DB Port : 8080
[echo] Entered DB Port : 9090
[copy] Copying 1 file to /Users/dhav01/tools/exist/db10/tools/jetty/etc
[echo] DB Properties have been updated
BUILD SUCCESSFUL
Total time: 10 seconds
| Make sure that you also run the following tasks :- (a) Shutdown and Restart eXist Database. (b) Execute "ant uploadDatabase" target. (c) Shutdown and Restart the eXist Database. If an already configured eXist Database or openMDR code has been removed and re-installed/re-checked-out, then execute Step 5(A) configDatabase. |
Step 5(B). Local configuration for the Data/CDE specific information to be stored in the openMDR database
This requires changes to be made in 2 configuration files in the source code checkout:
i) Registration Authority can be customized in the file db/mdr/data/registration_authority/cagrid.org.xml:
$ cd $OPENMDR_HOME/projects/mdrCore $ vi db/mdr/data/registration_authority/cagrid.org.xml
Original Content:
<openMDR:Registration_Authority xmlns:openMDR="http://www.cagrid.org/schema/openMDR" organization_identifier="cagrid.org"> <openMDR:organization_name>caGrid</openMDR:organization_name> <openMDR:organization_mail_address/> <openMDR:documentation_language_identifier> <openMDR:language_identifier>eng</openMDR:language_identifier> </openMDR:documentation_language_identifier> <openMDR:registration_authority_identifier> <openMDR:international_code_designator>US</openMDR:international_code_designator> <openMDR:OPI_Source>BSI</openMDR:OPI_Source> <openMDR:organization_identifier>cagrid.org</openMDR:organization_identifier> <openMDR:organization_part_identifier>cagrid</openMDR:organization_part_identifier> </openMDR:registration_authority_identifier> <openMDR:represented_by> <openMDR:registrar_contact> <openMDR:contact_information>01865 283509</openMDR:contact_information> <openMDR:contact_name>Shannon Hastings</openMDR:contact_name> <openMDR:contact_title>Director</openMDR:contact_title> </openMDR:registrar_contact> <openMDR:registrar_identifier>mdr.cagrid.org</openMDR:registrar_identifier> </openMDR:represented_by> </openMDR:Registration_Authority>
Replace with local specific information.
<openMDR:Registration_Authority xmlns:openMDR="http://www.cagrid.org/schema/openMDR" organization_identifier="osu.edu"> <openMDR:organization_name>OSU</openMDR:organization_name> <openMDR:organization_mail_address/> <openMDR:documentation_language_identifier> <openMDR:language_identifier>eng</openMDR:language_identifier> </openMDR:documentation_language_identifier> <openMDR:registration_authority_identifier> <openMDR:international_code_designator>US</openMDR:international_code_designator> <openMDR:OPI_Source>BMI</openMDR:OPI_Source> <openMDR:organization_identifier>osu.edu</openMDR:organization_identifier> <openMDR:organization_part_identifier>osu</openMDR:organization_part_identifier> </openMDR:registration_authority_identifier> <openMDR:represented_by> <openMDR:registrar_contact> <openMDR:contact_information>123-456-7890</openMDR:contact_information> <openMDR:contact_name>Rakesh Dhaval</openMDR:contact_name> <openMDR:contact_title>Sr. Systems Consultant</openMDR:contact_title> </openMDR:registrar_contact> <openMDR:registrar_identifier>mdr.osu.edu</openMDR:registrar_identifier> </openMDR:represented_by> </openMDR:Registration_Authority>
ii) Organization can be customized in the file db/mdr/data/organization/cagrid.org.xml
cd $OPENMDR_HOME/projects/mdrCore $ vi db/mdr/data/organization/cagrid.org.xml
Original Content
<openMDR:Organization xmlns:openMDR="http://www.cagrid.org/schema/openMDR" organization_identifier="cagrid.org"> <openMDR:organization_name>caGrid</openMDR:organization_name> <openMDR:organization_mail_address>Columbus, OH</openMDR:organization_mail_address> <openMDR:Contact contact_identifier="cagrid.org.1"> <openMDR:contact_information>shannon.hastings@osumc.edu</openMDR:contact_information> <openMDR:contact_name>Shannon Hastings</openMDR:contact_name> <openMDR:contact_title>Metadata Creator</openMDR:contact_title> </openMDR:Contact> </openMDR:Organization>
Replace with local specific information.
<openMDR:Organization xmlns:openMDR="http://www.cagrid.org/schema/openMDR" organization_identifier="cagrid.org"> <openMDR:organization_name>caGrid</openMDR:organization_name> <openMDR:organization_mail_address>Columbus, OH</openMDR:organization_mail_address> <openMDR:Contact contact_identifier="cagrid.org.1"> <openMDR:contact_information>rakesh.dhaval@@osumc.edu</openMDR:contact_information> <openMDR:contact_name>Rakesh Dhaval</openMDR:contact_name> <openMDR:contact_title>Metadata Creator</openMDR:contact_title> </openMDR:Contact> </openMDR:Organization>
Step 5(C) Modifying or Adding Connectors in the configuration file.
i) Example for Concept Query Service
You can add/remove/edit any number of query services (example- local LexEVS installation) so that the Search window for concept query has the appropriate service listed in the dropdown, you can make changes to the configuration file at /home/mdrcore/projects/mdr/projects/mdrCore/db/mdr/connector/config.xml
- Copy the following content and paste it in the config file under <resources> element.
<query_service name="EVS-MetaThesaurusConcept" class="org.cagrid.ws.query.RestQueryService" serviceUrl="http://lexevsapi.nci.nih.gov/lexevsapi50/GetXML" cache_collection_id="EVS-MetaThesaurusConcept" cache="false" cache_provider="HibernateCacheProvider" category="CONCEPT" connection_type="REST" requestSequence="LexMetaThesaurusConcept_query" digestSequence="LexMetaThesaurusConcept_construct fixtag LexMetaThesaurusConcept_transform add_namespace"> <title>NCI Enterprise Vocabulary Services (EVS)</title> <description>The NCI EVS is a set of services and resources that address NCI's needs for controlled vocabulary.</description> <webUrl>http://ncicb.nci.nih.gov/NCICB/infrastructure/cacore_overview/vocabulary</webUrl> </query_service>
- Edit the copied code in the config file to resemble something that you want to configure locally.
- Provide an appropriate name to the <query_service... "name" attribute. Make sure there are no duplicate names in the services.
- Enter the name provided above as the value for "cache_collection_id"
- Provide identifier_prefix: This value should be unique and should be something specific to the organization as Identifiers in mdrCore will be created using this as prefix, and the same will be used to resolve them.
- Provide appropriate url for the <query_service... "serviceURL" attribute.
- Make sure "category" attribute has a value of "CONCEPT" for Concept Query Services and "CDE" for Common Data Element(CDE's) Query Services.
- Make appropriate changes in the "<title>" and "<description>" tag values
Please do not make any other changes to the configuration. <query_service name="Local-EVS-MetaThesaurusConcept" identifier_prefix="lexevsapi.nci.nih.gov_EVS-MetaThesaurusConcept" class="org.cagrid.openmdr.ws.query.RestQueryService" serviceUrl="http://lexgrid.ctsa.cagrid.org:8081/lexevsapi50/GetXML" cache_collection_id="Local-EVS-MetaThesaurusConcept" cache="false" cache_provider="HibernateCacheProvider" category="CONCEPT" connection_type="REST" requestSequence="LexMetaThesaurusConcept_query" digestSequence="LexMetaThesaurusConcept_construct fixtag LexMetaThesaurusConcept_transform add_namespace"> <title>NCI Enterprise Vocabulary Services (EVS)</title> <description>The NCI EVS is a set of services and resources that address NCI's needs for controlled vocabulary.</description> <webUrl>http://ncicb.nci.nih.gov/NCICB/infrastructure/cacore_overview/vocabulary</webUrl> </query_service>
ii) Example for CDE Query Service
The configuration file is mdr/projects/mdrQuery/etc/config.xml
One can add query services in the configuration file for Common Data Elements (CDE's) and Concepts. Example: This file can be configured as per local environment.
Original:
<query_service name="openMDR" identifier_prefix="cagrid.org" class="org.cagrid.openmdr.ws.query.RestQueryService" serviceUrl="http://localhost:8080/exist/rest/db/mdr/services" cache_collection_id="openMDR" cache="false" cache_provider="HibernateCacheProvider" category="CDE" connection_type="REST" requestSequence="openMDR_REST_query" digestSequence="openMDR_construct"> <title>Metadata Registry (openMDR)</title> <description>Metadata Registry (openMDR) </description> <webUrl>http://localhost:8080/exist/rest/db/mdr/resources/xquery/homepage.xquery</webUrl> </query_service>
Local configuration:
Edit query_service name, identifier_prefix and service URL. Also specify category: CDE or concept.
<query_service name="Local-openMDR" identifier_prefix="osu.edu" class="org.cagrid.openmdr.ws.query.RestQueryService" serviceUrl="http://localhost:8080/exist/rest/db/mdr/services" cache_collection_id="Local-openMDR" cache="false" cache_provider="HibernateCacheProvider" category="CDE" connection_type="REST" requestSequence="openMDR_REST_query" digestSequence="openMDR_construct"> <title>Metadata Registry (openMDR)</title> <description>Metadata Registry (openMDR) </description> <webUrl>http://localhost:8080/exist/rest/db/mdr/resources/xquery/homepage.xquery</webUrl> </query_service>
Step 6(Optional). Check the Install
Once changes for custom configuration are made, you should redeploy mdrCore to the eXist Database and restart the eXist Database service. This is important to make sure all the changes that you made are reflected in the mdrCore database.
- The URL http://hostname:8080
shows the initial page.

- You can browse the contents of the repository. For Metadata repository management enter the administrative module by logging in with admin username/password created during the install process.

Step 7(Optional). Backup Processes
There are two shell scripts available in resources to backup mdrCore database and eXistDb directory structure. The scripts are:
a) mdr/projects/mdrCore/resources/backup_scripts/mdrcoredb
b) mdr/projects/mdrCore/resources/backup_scripts/mdrcore-server
These can be customized according to your local environment and can be added to cron jobs to run daily.
- a) mdrcoredb: takes a backup of the mdrCore database tars it, stores in the backup directory and copies it to remote server as specified.
#set the values according to your environment #path where Exist Database in installed EXIST_HOME=/home/mdrcore/ext/db #path where backups are stored on the client server BACKUP_HOME=mdrCore_backups #eXistdb database server Host Name DBSERVER=localhost #eXistdb database server port number DBPORT=8080 #eXistdb database server user DBUSER=admin #eXistdb database server password DBPASS=12345 # backup and copy the database files and server directory structure to a remote server # To use SSH with authentication key instead of password # Generate the authentication key on client server: ssh-keygen # Install the public key on the target server: ssh-copy-id -i .ssh/id_rsa.pub backups@remotehost.com #backup server host where the backup files need to be copied/ scp'd TARGET_SERVER=127.0.0.1 #backup server user account for which public key has already been installed TARGET_USER_ACCOUNT=backupuser #backup server directory where the tarred backup files from mdrCore server is copied to TARGET_BACKUP_DIRECTORY=/home/backupuser/triad_mdrCore_backups
- b) mdrcore-server: takes a backup of the eXistDb directory structure, tars it, stores in the backup directory and copies it to remote server as specified.
#File Name of the backup directory- A file tar.gz with the same name will be created as backup file TARGET_FILENAME=mdrCore-server #path where Exist Database in installed EXIST_HOME=/home/mdrcore/ext/db #path where backups are stored on the client server BACKUP_HOME=mdrCore_backups # backup and copy the database files and server directory structure to a remote server # To use SSH with authentication key instead of password # Generate the authentication key on client server: ssh-keygen # Install the public key on the target server: ssh-copy-id -i .ssh/id_rsa.pub backups@remotehost.com #backup server host where the backup files need to be copied/ scp'd TARGET_SERVER=127.0.0.1 #backup server user account for which public key has already been installed TARGET_USER_ACCOUNT=backupuser #backup server directory where the tarred backup files from mdrCore server is copied to TARGET_BACKUP_DIRECTORY=/home/backupuser/triad_mdrCore_backups





