Page tree

Versions Compared

Key

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

...

Details

Step 1 - Create directories

  Setup for Windows

  • Create a data directory to hold your data files (e.g. c:/refset/data)
  • Create a directory config directory to hold your config files (e.g. c:/refset/config)
  • Create a code directory to hold the code (e.g. c:/workspace/ihtsdo-refset-tool)
  • Make sure the "mvn" executable for your local maven installation is in the path
    • On Windows this means adding to the PATH variable so that it runs in a "cmd" shell without fully qualified path.

  Setup for Unix/Linux/Mac

  • Create a directory data directory to hold your data files (e.g. ~/data)
  • Create a directory config directory to hold your config files (e.g. ~/config)
  • Create a directory code directory to hold the code (e.g. ~/code)
  • Make sure the "mvn" executable for your local maven installation is in the path

...

  • NOTE: this uses the standard "dev-windows" configuration by default.  To use a different configuration artifact pass the following three parameters (this is not commonly needed):
    • -Dconfig.groupId=...
    • -Dconfig.artifactId=...
    • -Dconfig.version=...
  • For most dev deployments, the default build is fine because the only setting really used for the rest/webapp packages is the "base.url" which by default is set to http://localhost:8080/refset-rest 
  • For a production deployment, you would want to use a different setting.  For example, see Deploy Instructions (TBD) for the prod deployment instructions.see PROD Deploy Instructions

Step 4 - Setup Configuration

...

  • javax.persistence.jdbc.url (contains the databse name)
  • javax.persistence.jdbc.user
  • javax.persistence.jdbc.password
  • hibernate.search.default.indexBase  ( recommend choosing something in your data dir, e.g. c:/refset/data/indexes or ~/refset/indexes)
  • mail.smtp.to* (list for automated system emails)
  • identifier.assignment.handler, e.g.
  • terminology.handler, e.g.
    • terminology.handler=BROWSER,SNOWOWL,SNOWOWL-SE
      terminology.handler.BROWSER.class=org.ihtsdo.otf.refset.jpa.services.handlers.BrowserTerminologyHandler
      terminology.handler.BROWSER.defaultUrl=https://sct-rest.ihtsdotools.org/api
      terminology.handler.BROWSER.apiKey=EDIT_THIS
      terminology.handler.SNOWOWL.class=org.ihtsdo.otf.refset.jpa.services.handlers.SnowowlTerminologyHandler
      terminology.handler.SNOWOWL.defaultUrl=https://authoring.ihtsdotools.org/snowowl/snomed-ct/v2
      terminology.handler.SNOWOWL.authHeader=Basic EDIT_THIS
      terminology.handler.SNOWOWL.apiKey=EDIT_THIS
      terminology.handler.SNOWOWL-SE.class=org.ihtsdo.otf.refset.jpa.services.handlers.SnowowlTerminologyHandler
      terminology.handler.SNOWOWL-SE.defaultUrl=https://se-authoring.ihtsdotools.org/snowowl/snomed-ct/v2
      terminology.handler.SNOWOWL-SE.apiKey=EDIT_THIS

  • base.url=http://localhost:8080/refset-rest

Step 6 - Create database

Create a MySQL UTF8 database. e.g.

...

 

Code Block
# from top-level code directory
cd admin
mvn install -PSample -Drefset.config=/home/ihtsdo/config/config.properties -Dmode=create >&! mvn.log


 

Following is a sample Eclipse run configuration for the same thing.

...

  • Download and install apache tomcat 8 7 (or higher) in c:/apache-tomcat-XXXX
  • In Eclipse use the J2EE perspective and click on the "Servers" tab.
  • From here, you can add a server which simply involves pointing Eclipse to the install directory for Tomcat.
  • You can right-click on refset-rest.war file and use "Run As->Run on Server" to deploy to Tomcat.
  • The Tomcat server needs to be able to find the run configuration. Double-click on the Tomcat server you installed, open the launch configuration and add this setting:

     

    Code Block
    -Drefset.config=c:/refset/config/config.properties

...

Check that it all works by going to

...

Code Block
http://localhost:8080/refset-rest/index.html

 

This should be a demo app that contains a basic terminology browser and (in the header) a link to a  "swagger" Api documenting the service calls available. You should be able to log in to either the application or the Swagger services by authenticating with "guest" username and "guest" password.  

...