Getting Started
This page describes first steps towards getting the CVA Risk Capital Accelerator Reference Implementation up and running.
GitHub: https://github.com/activeviam/cva-risk-capital-accelerator.git
Download
Go to the Release Note page for the version of the CVA Risk Capital Accelerator you wish to download.
Maven Repository
- From the share download the maven repository for the version of ActivePivot the Accelerator is based on.
- From the Release Note, page download the maven repository for the accelerator (contains all dependencies required to build the accelerator that aren’t included in the AP download).
Unzip the downloaded repositories and copy over your existing maven repository.
Configuration
The only configuration required to start is to edit cvarc-combined-starter/src/main/resources/properties/cvarc.properties
Set input.data.root.dir.path
to the directory you want to put your data.
Alternatives
- If you only want to use the sample data embedded in the project along with the Jetty server, then you don’t need to configure the data directory.
- You can copy the sample data (
cvarc-combine-starter/src/test/resources/data-samples/data/
) intofrtb-activepivot/src/main/resources/
then the sample data will be included in the .war file and you won’t need to set the data directory.
This second alternative is not recommended beyond initial experimental deployments. It is not best practice to include the data in the .war file.
Deployment
Tomcat
- Use maven to build the .war file:
$ mvn clean install
.- This will include both ActivePivot and ActiveUI.
- You can find a zip file in deployment/target. It contains the script to start the tomcat. You may need to update the CATALINA_HOME variable in start_accelerator.sh or start_accelerator.bat.
- Copy your data files to the location specified in the configuration.
- Run start_accelerator.sh or start_accelerator.bat.
- You can find ActiveUI at http://host:port/cvarc-activeui/
[Eclipse / Intellij] + Jetty
role=“alert”>You may run into a Java.Lang.StackOverflow exception due to an unresolved Oracle issue when attempting to build the project, detailed stack trace in CVARC-275. If this occurs, then you will need to add the following PATH variable to increase the memory available to Maven during build processes.
MAVEN_OPTS="-Xms2048m -Xmx4096m -Xss8m"
- Use maven to run an initial build of the Accelerator
$ mvn clean install
. - Start the server by running
com.activeviam.cvarc.starter.server.JettyServer
incvarc-combined-starter/src/test/java
. - The server will include the compiled UI which you can use at http://localhost:9090/cvarc-activeui
- The server will run at https://localhost:9090/cvarc-starter
Extra steps to run in InteliJ
To Successfully run CVA Risk Capital inside InteliJ, you will need to allocate more memory to the InteliJ compiler. Add the necessary memory flags inside the ‘User-local build process VM options’ field found here:
Preferences | Build, Execution, Deployment | Compiler | 'User-local build process VM options'
.
Example value: -Xms2048m -Xmx4096m -Xss8m
(Set the values to allocate enough memory to the compiler considering the amount of RAM available in your machine).
Extra steps to run in Eclipse
To Successfully run CVA Risk Capital inside Eclipse, you will need to allocate more memory to the Eclipse Maven Build:
-Xms1024m -Xmx2048m -Xss5m
How to Run All Tests
mvn clean install -P IT
ActiveUI Development
role=“alert”>Since CVARC-1.1.0 release, CVARC Accelerator use MonoRepo.
If you are actively developing the UI, you can use yarn or npm to pick up changes as you make them.
- Install all ActiveUI dependencies first by running npm install within
cvarc-activeui
(This has to be done only the first time after downloading the project, as ActiveUI does not package it’s dependencies). - Start ActiveUI by running, npm start in cvarc-activeui.
- You can find ActiveUI at http://localhost:3000/