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:14]
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 49: Line 54:
  
 === Microsoft SQL Server === === Microsoft SQL Server ===
-Coming Soon.+**Create settings.xml File** 
 + 
 +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:​ 
 + 
 +  <​settings>​ 
 +  <​profiles>​ 
 +    <​profile>​ 
 +      <​id>​webapi-mssql</​id>​ 
 +      <​properties>​ 
 +        <​datasource.driverClassName>​com.microsoft.sqlserver.jdbc.SQLServerDriver</​datasource.driverClassName>​ 
 +        <​datasource.url>​jdbc:​sqlserver://​localhost;​databaseName=OHDSI</​datasource.url>​ 
 +        <​datasource.username>​ohdsi_app_user</​datasource.username>​ 
 +        <​datasource.password>​app1</​datasource.password>​ 
 +        <​datasource.dialect>​sql server</​datasource.dialect>​ 
 +        <​datasource.ohdsi.schema>​dbo</​datasource.ohdsi.schema>​ 
 +        <​flyway.datasource.driverClassName>​${datasource.driverClassName}</​flyway.datasource.driverClassName>​ 
 +        <​flyway.datasource.url>​${datasource.url}</​flyway.datasource.url>​ 
 +        <​flyway.datasource.username>​ohdsi_app_user</​flyway.datasource.username>​ 
 +        <​flyway.datasource.password>​app1</​flyway.datasource.password>​ 
 +        <​flyway.locations>​classpath:​db/​migration/​sqlserver</​flyway.locations>​ 
 +        <​security.enabled>​false</​security.enabled>​ 
 +        <​security.token.expiration>​43200</​security.token.expiration>​ 
 +        <​security.origin>​*</​security.origin>​ 
 +        <​security.ssl.enabled>​false</​security.ssl.enabled>​ 
 +        <​security.oauth.callback.ui>​http://​localhost/​atlas/#/​welcome</​security.oauth.callback.ui>​ 
 +        <​security.oauth.callback.api>​http://​localhost:​8080/​WebAPI/​user/​oauth/​callback</​security.oauth.callback.api>​ 
 +        <​security.oauth.google.apiKey></​security.oauth.google.apiKey>​ 
 +        <​security.oauth.google.apiSecret></​security.oauth.google.apiSecret>​ 
 +        <​security.oauth.facebook.apiKey></​security.oauth.facebook.apiKey>​ 
 +        <​security.oauth.facebook.apiSecret></​security.oauth.facebook.apiSecret>​ 
 +      </​properties>​  
 +    </​profile> ​  
 +  </​profiles>​ 
 +  </​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 73: Line 117:
         <​flyway.datasource.password>​!PASSWORD!</​flyway.datasource.password>​         <​flyway.datasource.password>​!PASSWORD!</​flyway.datasource.password>​
         <​flyway.locations>​classpath:​db/​migration/​postgresql</​flyway.locations>​         <​flyway.locations>​classpath:​db/​migration/​postgresql</​flyway.locations>​
 +        <​security.enabled>​false</​security.enabled>​
 +        <​security.token.expiration>​43200</​security.token.expiration>​
 +        <​security.origin>​*</​security.origin>​
 +        <​security.ssl.enabled>​false</​security.ssl.enabled>​
 +        <​security.oauth.callback.ui>​http://​localhost/​atlas/#/​welcome</​security.oauth.callback.ui>​
 +        <​security.oauth.callback.api>​http://​localhost:​8080/​WebAPI/​user/​oauth/​callback</​security.oauth.callback.api>​
 +        <​security.oauth.google.apiKey></​security.oauth.google.apiKey>​
 +        <​security.oauth.google.apiSecret></​security.oauth.google.apiSecret>​
 +        <​security.oauth.facebook.apiKey></​security.oauth.facebook.apiKey>​
 +        <​security.oauth.facebook.apiSecret></​security.oauth.facebook.apiSecret>​
       </​properties> ​       </​properties> ​
     </​profile>  ​     </​profile>  ​
Line 86: 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 104: Line 158:
         <​flyway.datasource.password>​{password}</​flyway.datasource.password>​         <​flyway.datasource.password>​{password}</​flyway.datasource.password>​
         <​flyway.locations>​classpath:​db/​migration/​oracle</​flyway.locations>​         <​flyway.locations>​classpath:​db/​migration/​oracle</​flyway.locations>​
 +        <​security.enabled>​false</​security.enabled>​
 +        <​security.token.expiration>​43200</​security.token.expiration>​
 +        <​security.origin>​*</​security.origin>​
 +        <​security.ssl.enabled>​false</​security.ssl.enabled>​
 +        <​security.oauth.callback.ui>​http://​localhost/​atlas/#/​welcome</​security.oauth.callback.ui>​
 +        <​security.oauth.callback.api>​http://​localhost:​8080/​WebAPI/​user/​oauth/​callback</​security.oauth.callback.api>​
 +        <​security.oauth.google.apiKey></​security.oauth.google.apiKey>​
 +        <​security.oauth.google.apiSecret></​security.oauth.google.apiSecret>​
 +        <​security.oauth.facebook.apiKey></​security.oauth.facebook.apiKey>​
 +        <​security.oauth.facebook.apiSecret></​security.oauth.facebook.apiSecret>​
       </​properties>​       </​properties>​
     </​profile> ​       </​profile> ​  
Line 120: 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 133: 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.1488291267.txt.gz · Last modified: 2017/02/28 14:14 by anthonysena