HowtoDeployWebService

From Cheaha
Jump to navigation Jump to search


Attention: Research Computing Documentation has Moved
https://docs.rc.uab.edu/


Please use the new documentation url https://docs.rc.uab.edu/ for all Research Computing documentation needs.


As a result of this move, we have deprecated use of this wiki for documentation. We are providing read-only access to the content to facilitate migration of bookmarks and to serve as an historical record. All content updates should be made at the new documentation site. The original wiki will not receive further updates.

Thank you,

The Research Computing Team

The dasi web services are uploaded to http://repo.uabgrid.uab.edu/files/dataservices after caCORESDK build process. These war files contain fake/generic database parameters with MySQL db type and localhost url. The deployment step does nothing, but change these database parameters. The search-replace pattern in deployment script is dependent on generic config as described in HowtoBuildDataService. Also, deployment script looks for generic war file locally in specific dir location before deployment step. Use dw-wds script to download the web service from repo first.

Download

The war file download script contains simple wget command and only reason to use script is to have automation (in future) and consistency.

This script can be used with two arguments - service name and version number OR without any arguments. In later case it will prompt you for a service name and version number. The war fie will be downloaded in '/tmp/wds-download-dir/$service-name/$version-number' directory. Note that deployment script searches for generic war file in this directory, so keep them in-sync. Example usage:

dw-wds hq 2.1

The script assumes that dataservices download url is http://repo.uabgrid.uab.edu/files/dataservices , but one can modify the script and accept user argument if necessary.


Deploy

The deployment script looks for generic web service war file in '/tmp/wds-download-dir/$service-name/$version-number' local directory. The script will do following things:

  • prompt user for database connection parameters which will be replaced in the war file
  • download generic web.xml and log4j.xml from repo.uabgrid.uab.edu which will be then modified with web service name
  • Change result per query setting in application-config.xml
  • Repack war file with above settings and deploy it in Tomcat.

Script and config file locations:

The script should be run without any arguments and it will prompt for necessary parameters. Usage:

deploy-wds-log4j

The script will return an error if it can't find generic war file in '/tmp/wds-download-dir/$service-name/$version-number'.