Table of Contents |
---|
...
- Install/Setup pre-requisite software. Refer to pre-requisites table below.
- Use the below command to download the source code:
$ git clone --depth 10 https://github.com/krishagni/openspecimen.git
- Above command will checkout the master branch or unreleased version of code. If you wish to build source code of a specific release then use below command before proceeding to build. The list of available release version tags can be view here: https://github.com/krishagni/openspecimen/releases
$ git checkout <release-version-tag>
$ git checkout v6.1.RC7 # example to checkout source code of OpenSpecimen
v6.1.RC7
Do all the pre-requisites setup before deploying WAR file.
- Use
gradle
to build and deploy the application.
...
- For database privileges, refer to Database Configuration
- Java JRE and JAVA_HOME is set.
- MySQL on Linux: MySQL Case Sensitivity issues on Linux
Following table lists pre-requisites and their supported versions.
Pre-requisite | Version |
---|---|
JDK | 17 |
Tomcat | 9.0+ |
MySQL | 58.70+ |
Oracle | 11g+ |
Gradle | 27.5.91 |
GIT | 2.17.1.8 |
node.js | 10+ |
npm | 7+ |
bower | 1.8 |
grunt | 1.2 |
The recommended memory requirement for the OpenSpecimen app is 2GB. To configure Tomcat follow How to fix "out of memory" error?
...
Environment Variable | Description |
---|---|
JAVA_HOME | The absolute path of the directory where JDK is installed. For example
|
Please refer to the following variables used throughout the document.
Keyword | Comment |
---|---|
| Directory where OpenSpecimen source code is checked-out. For example, |
| Directory where JDK is installed. For example, |
Database configuration
The deployment process involves some database operations which require specific privileges set for the database user. Use the below command to create a database. Refer to Database Configuration and make sure these privileges are assigned before the deployment process.
...
MySQL | Oracle | |
---|---|---|
Driver class name | com.mysql.jdbc.Driver | oracle.jdbc.OracleDriver |
DB URL | jdbc:mysql://<db_host>:<db_port>/<db_name> | jdbc:oracle:thin:@<db_host>:<db_port>:<dbname> |
Add below XML fragment below <Resource>
tag in $TOMCAT_HOME/conf/context.xml
Code Block |
---|
<Environment name="config/openspecimen" value="$TOMCAT_DIR/conf/openspecimen.properties" type="java.lang.String"/> |
...
Field | Description | Values |
---|---|---|
app.name | This field is useful for deploying multiple OpenSpecimen instances on the same Tomcat server. E.g. You can use "os-test" and "os-prod". | Typically this is "openspecimen". |
tomcat.dir | The absolute path to the Tomcat directory | |
app.data_dir | Absolute path to OpenSpecimen data directory. | Best practice: Create a folder in parallel to 'tomcat.dir' with the name "OpenSpecimen/data" |
app.log_conf | The folder where the OpenSpecimen logs should be created | If left empty logs are created in "app.data_dir/logs" |
datasource.jndi | Name of datasource configured in "context.xml" | Usually, it is "jdbc/openspecimen". |
datasource.type | "fresh": If your database schema is created by OpenSpecimen from scratch. "Upgrade": if your database schema is upgraded from a caTissue database. Note: The name is a bit misleading, we will fix this in v5.2. | "fresh" or "upgrade" |
database.type | MySQL or Oracle | "mysql" or "oracle" |
plugin.dir | Absolute path to the plugin directory. | Best practice: Create a folder in parallel to 'tomcat.dir' with the name "OpenSpecimen/plugins" |
Configure build.properties
...