...
$HOME/.opencds/opencds.properties
This file must contain the first two lines below.
Install OpenCDS Sample Knowledge Repository
- OpenCDS currently supports two configuration methods:
- jar on the classpath which contains the configuration files
- files on a connected filesystem
...
The third line is options, if logging is desired.
Code Block | ||
---|---|---|
| ||
knowledge-repository.type=<repository type>
knowledge-repository.path=<repository path>
log4j.logfile=<full path to log file> |
knowledge-repository.type may be either of the two following values:
SIMPLE_FILE
CLASSPATH
- knowledge-repository.path is the absolute or relative path to the configuration, depending upon which type is chosen (above).
- Example configurations for SIMPLE_FILE may include:
- /var/lib/opencds/resources_v1.1/
- /home/opencds/config/resources_v1.1/
- $HOME/.opencds/config/resources_v1.1/
- etc.
- The path for the CLASSPATH type is relative to the classpath of the running JVM (e.g., Tomcat).
- resources_v1.1/
- Example configurations for SIMPLE_FILE may include:
- log4j.logfile is the location used by OpenCDS to write the logs. This line is optional. Typical values may include:
- /var/log/opencds/opencds.log
- $HOME/.opencds/logs/opencds.log
Install OpenCDS Sample Knowledge Repository
Filesystem-based Method
- A sample knowledge repository is distributed with the OpenCDS deployment file (the 'war').
- Download opencds-knowledge-repository-data.zip from the OpenCDS website | Members | Binary Downloads | at http://develop.opencds.org/OpenCDSDemo/latest/opencds-knowledge-repository-data.zip
- Unzip it to a location on the same machine where you will be running Tomcat.
- NOTE: you won't have to change any configuration settings if you unzip it into "C:/OpenCDS". NOTE: There is a configuration file named "the location specified in the OpenCDS Configuration discussion above.
- The location must be on a filesystem visible to the running instance of Tomcat.
Jar-based Method
- A test repository is included in the war, and may be updated with custom repository elements.
- The procedure for updating the jar within the war is as follows:
- Build the filesystem consistent with a the folder hierarchy and contents of the opencds-knowledge-repository-data.zip file.
- e.g., resources_v1.1/...
Get the name of the jar that will be replaced:
-config.xml" that you will need to update if you have located the sample KR somewhere other than "C:/OpenCDS".This file is found inside the exploded war file at <servletContainerPath>/Code Block jar -tvf opencds-decision-support-service
.war
The file in the current SNAPSHOT version is located as "WEB-INF/lib/opencds-knowledge-repository-data-1.2.0-SNAPSHOT.jar"; look for this file or a file similar to it.
create a jar with the contents:
Code Block jar -cvf opencds-knowledge-repository-data.jar resources_v1.1
This will package the "resources_v1.1" folder hierarchy into the jar.
Replace the jar in the war, e.g.:
/Code Block jar -uvf opencds-decision-support-service
classesit specifies a default path of "C:/OpenCDS/.war WEB-INF/
/resources_v1.1"lib/opencds-knowledge-repository-data
-1.2.0-SNAPSHOT.jar
- Build the filesystem consistent with a the folder hierarchy and contents of the opencds-knowledge-repository-data.zip file.
- NOTE: Developers may update their local copies of the codebase to automatically build the war with a custom repository. However, please do not commit this to the repository.
Install OpenCDS RunTime WAR file
...