User Tools

Site Tools


documentation:software:webapi:webapi_installation_guide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:software:webapi:webapi_installation_guide [2017/02/28 14:26]
anthonysena
documentation:software:webapi:webapi_installation_guide [2019/04/19 16:23] (current)
anthonysena
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
  
-=====WebAPI Installation Guide ===== + 
-----+===== IMPORTANT NOTE ===== 
 + 
 +All WebAPI documentation has moved to [[https://​github.com/​OHDSI/​WebAPI/​wiki|GitHub]]. Please disregard the content below as it is legacy and kept for posterity. 
 + 
 +===== WebAPI Installation Guide (LEGACY) ​=====
  
 ==== Overview ==== ==== Overview ====
Line 13: Line 17:
 === MS SQL Server === === MS SQL Server ===
 ---- ----
-Coming Soon.+ 
 +Please refer to the [[documentation:​software:​webapi:​sqlserver_installation_guide|SQL Server Setup Guide]] article for installation and setup details.
  
 === PostgreSQL 9.3 === === PostgreSQL 9.3 ===
Line 51: Line 56:
 **Create settings.xml File** **Create settings.xml File**
  
-Specify ​SQL Server ​user name, password, and location of the OHDSI database. Note that the user should have read, write, and create privileges on the OHDSI schema +Specify user name, password, and location of the OHDSI database ​(this was created as ‘ohdsi_app_user’ from the [[documentation:​software:​webapi:​sqlserver_installation_guide|SQL Server Setup Guide]]. Note that the user should have read, write, and create privileges on the OHDSI database. Here is an example XML that is based on the above configuration:
- +
-Here is an example XML:+
  
   <​settings>​   <​settings>​
Line 65: Line 68:
         <​datasource.password>​app1</​datasource.password>​         <​datasource.password>​app1</​datasource.password>​
         <​datasource.dialect>​sql server</​datasource.dialect>​         <​datasource.dialect>​sql server</​datasource.dialect>​
-        <​datasource.ohdsi.schema>​webapi</​datasource.ohdsi.schema>​+        <​datasource.ohdsi.schema>​dbo</​datasource.ohdsi.schema>​
         <​flyway.datasource.driverClassName>​${datasource.driverClassName}</​flyway.datasource.driverClassName>​         <​flyway.datasource.driverClassName>​${datasource.driverClassName}</​flyway.datasource.driverClassName>​
         <​flyway.datasource.url>​${datasource.url}</​flyway.datasource.url>​         <​flyway.datasource.url>​${datasource.url}</​flyway.datasource.url>​
-        <​flyway.datasource.username>​ohdsi_admin_user</​flyway.datasource.username>​ +        <​flyway.datasource.username>​ohdsi_app_user</​flyway.datasource.username>​ 
-        <​flyway.datasource.password>​!PASSWORD!</​flyway.datasource.password>​+        <​flyway.datasource.password>​app1</​flyway.datasource.password>​
         <​flyway.locations>​classpath:​db/​migration/​sqlserver</​flyway.locations>​         <​flyway.locations>​classpath:​db/​migration/​sqlserver</​flyway.locations>​
         <​security.enabled>​false</​security.enabled>​         <​security.enabled>​false</​security.enabled>​
Line 85: Line 88:
   </​profiles>​   </​profiles>​
   </​settings>​   </​settings>​
 +
 +Note: this file above is saved as /​WebAPIConfig/​settings.xml and will be referred to in the “Building the .war file section”.
 +
 +**Download the appropriate JDBC driver**
 +
 +For SQL Server, the driver is available from the Maven repository, so no additional steps are required.
  
 === PostgreSQL === === PostgreSQL ===
 **Create settings.xml File** **Create settings.xml File**
  
-Specify user name, password, and location of the OHDSI schema (this was created as ‘webapi’ from the [[https://​github.com/​OHDSI/​WebAPI/​wiki/​PostgreSQL-Installation-Guide|PostgreSQL Setup Guide]]. Note that the user should have read, write, and create privileges on the OHDSI schema. ​+Specify user name, password, and location of the OHDSI schema (this was created as ‘webapi’ from the [[documentation:software:​webapi:​postgresql_installation_guide|PostgreSQL Setup Guide]]. Note that the user should have read, write, and create privileges on the OHDSI schema. ​
 Here is an example XML that is based on the above configuration:​ Here is an example XML that is based on the above configuration:​
  
Line 131: Line 140:
 === Oracle === === Oracle ===
 **Create settings.xml File** **Create settings.xml File**
-Specify user name, password, and location of the OHDSI schema (this was created as ‘ohdsi’ ​above). Note that the user should have read, write, and create privileges on the OHDSI schema because this user is the owner of the '​ohdsi'​ schema. ​+Specify user name, password, and location of the OHDSI schema (this was created as ‘ohdsi’ ​in the [[documentation:​software:​webapi:​oracle_db_setup_guide|Oracle Setup Guide]]). Note that the user should have read, write, and create privileges on the OHDSI schema because this user is the owner of the '​ohdsi'​ schema. ​
 Here is an example XML that is based on the above configuration:​ Here is an example XML that is based on the above configuration:​
  
Line 175: Line 184:
 ==== Building the .war file ==== ==== Building the .war file ====
  
-Open command prompt, go to WebAPI folder, type+Open command prompt, ​**go to the WebAPI folder**, type
  
-  set JAVA_HOME=C:/​Program Files/​Java/​jdk1.7.0_67+  set JAVA_HOME=C:/​Program Files/​Java/​jdk1.8.0_112
  
 //Make sure you point to a JDK, not a JRE. It is probably a good idea to stick to the same Java version that is running Tomcat// //Make sure you point to a JDK, not a JRE. It is probably a good idea to stick to the same Java version that is running Tomcat//
  
-  mvn clean package -s /WebAPIConfig/​settings.xml -P {profile id}+  mvn clean package ​-DskipTests ​-s WebAPIConfig/​settings.xml -P {profile id}
  
 This will create the file WebAPI.war in the target subfolder. This will create the file WebAPI.war in the target subfolder.
Line 188: Line 197:
 === Deploy the war file === === Deploy the war file ===
 ---- ----
-In Tomcat (e.g. using the manager app), deploy the war file. + 
 +In Tomcat, you will need to increase the maximum file size allowed for WAR files. Go to webapps/​manager/​WEB-INF/​web.xml and then increase the max-file-size and max-request-size to at least the size of the WAR file. 
 + 
 +  <​multipart-config>​ 
 +    <​max-file-size></​max-file-size>​ 
 +    <​max-request-size></​max-request-size>​ 
 +   <​file-size-threshold>​0</​file-size-threshold>​ 
 +  </​multipart-config>​ 
 + 
 +In Tomcat (e.g. using the manager app), deploy the war file. 
 + 
 This should automatically create a large number of tables in the webapi schema. This should automatically create a large number of tables in the webapi schema.
  
documentation/software/webapi/webapi_installation_guide.1488291963.txt.gz · Last modified: 2017/02/28 14:26 (external edit)