Skip to content

Latest commit

 

History

History
91 lines (71 loc) · 4.1 KB

README.md

File metadata and controls

91 lines (71 loc) · 4.1 KB

causal-web

Causal web is a Java web-based application that allows users to run causal modeling algorithms on their dataset. The Center for Causal Discovery is hosting this application at the Pittsburgh Supercomputing Center and you can access it at https://ccd2.vm.bridges.psc.edu/ccd

Documentation for using the web application can be found at https://bd2kccd.github.io/docs/causal-web/

If you want to host the application with your own hardware, follow the instructions below for configuring, building and installing the application.

Building the software

Prerequisites - You must have the following installed to build/install causal-web

Download the source code

Dependencies

Download and uncompress the source code for each of following dependencies:

Application

Download and uncompress the application source code causal-web-1.3.7. To compile and build the application, go to the directory causal-web-1.3.7 and type mvn package.

External Dependencies

Configure the software

Setup the directory structure and copy libraries

First, you need to create a workspace for the application to work in. Create a directory called workspace, for an example /home/tuser/workspace.
Inside the workspace directory, create another folder called lib, for example /home/tuser/workspace/lib.

Copy the causal-cmd-0.2.1-jar-with-dependencies.jar to the workspace/lib folder.

Configure

There are 4 configuration files to configure located in causal-web-1.3.7/src/main/resources folder:

  1. application-hsqldb.properties: HSQLDB database configurations (for testing only).
  2. application-mysql.properties: MySQL database configurations
  3. application.properties: Spring Boot configurations
  4. ccd.properties: CCD web application related configurations

Workspace Configuration

Set the property ccd.server.workspace in the ccd.properties file to the workspace location.

// based on the above example
ccd.server.workspace=/home/tuser/workspace

Mail Configuration

Set the following properties in the application.properties file:

// add gmail account
spring.mail.username=<gmail username>
spring.mail.password=<gmail username>

Testing Configuration

Set the following properties in the application.properties file:

spring.profiles.active=scheduler,hsqldb

Production Configuration

Set the following properties in the application.properties file:

spring.profiles.active=scheduler,mysql

Make sure you set ccd.server.workspace=/home/tuser/workspace and ccd.folder.lib=lib in the ccd.properties file.

Compile the Program

Go to the causal-web directory and run the command mvn clean package. This will create a jar file called causal-web-1.3.7.jar in the /target folder.

Launch the Program

java -jar causal-web-1.3.7.jar

To give the program 4GB of memory to run on, type the follow, using the jvm options:

java -Xmx4G -jar causal-web-1.3.7.jar

To launch app in the browser

http://localhost:[port]/ccd       // default port is 8080, otherwise change to specified port