Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • $HOME/.opencds/opencds.properties

This file must contain the first two lines below. 

 

 

 

Install OpenCDS Sample Knowledge Repository

  1. OpenCDS currently supports two configuration methods:
    1. jar on the classpath which contains the configuration files
    2. files on a connected filesystem

...

The third line is options, if logging is desired.

Code Block
languagetext
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/
  • 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

  1. A sample knowledge repository is distributed with the OpenCDS deployment file (the 'war').
  2. 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
  3. Unzip it to a location on the same machine where you will be running Tomcat.
  4. NOTE: you won't have to change any configuration settings if you unzip it into "C:/OpenCDS".
  5. NOTE: There is a configuration file named "the location specified in the OpenCDS Configuration discussion above.
    1. The location must be on a filesystem visible to the running instance of Tomcat.

Jar-based Method

  1. A test repository is included in the war, and may be updated with custom repository elements.
  2. The procedure for updating the jar within the war is as follows:
    1. Build the filesystem consistent with a the folder hierarchy and contents of the opencds-knowledge-repository-data.zip file.
      1. e.g., resources_v1.1/...
    2. Get the name of the jar that will be replaced:

      Code Block
      jar -tvf opencds-decision-support-service
      -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>/
      .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.

    3. 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.

    4. Replace the jar in the war, e.g.:

      Code Block
      jar -uvf opencds-decision-support-service
      /
      .war WEB-INF/
      classesit specifies a default path of "C:/OpenCDS/
      lib/opencds-knowledge-repository-data
      /resources_v1.1"
      -1.2.0-SNAPSHOT.jar
  3. 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

...