Building & deploying the Accelerator
Building the Project
Maven Repositories
-
From the ActiveViam share page, download the maven repository for the version of ActivePivot the Accelerator is based on. This is specified in the release notes of the Accelerator you are deploying. The zip file containing the maven repository will be called maven-repository-<version number>.zip.
-
From the Accelerator Distribution folder, download the maven repository for the accelerator (this contains all dependencies required to build the accelerator that aren’t included in the ActivePivot download). A zip file containing the maven repository will be called mra-<version number>-maven-repository.zip.
Add these repositories to your existing maven repository.
Source
From the Distribution folder, download and unzip the source files. The zipped file will be called market-risk-accelerator-<version number>.zip.
Build
-
Once you have added all the maven repositories and extracted the source code, run
mvn install
on the parent pom file to build the entire project.This will build the ActivePivot executable JAR file (risk-stater/target/risk-starter-exec.jar) and ActiveMonitor executable JAR file (risk-activemonitor/target/risk-activemonitor-2.1.0-exec.jar)
-
When the build is complete, you must deploy it. See Deployment
-
Build the standalone UI application using npm or yarn.
-
Deploy the UI application.
Configuration
Deployment
ActivePivot and ActiveMonitor
Starting from MRA 1.4.0, the risk-starter and risk-activemonitor are Spring Boot applications that build to an executable JAR. To deploy the executable JAR files, simply use the following commands:
java -jar risk-starter-exec.jar
and
java -jar risk-activemonitor-1.4.0-exec.jar
Note that each executable JAR will publish the application on a
different port. To configure the port and context path, two properties
are used: server.port
and server.servlet.context-path
. The default
values are in resources/application.yaml
, the standard configuration
file for Spring Boot applications.
For example:
java -jar risk-starter-exec.jar --server.port=<port>
This can also be changed by externalising the properties files (see Externalising Properties Files ).
ActivePivot will be available at: http://<your hostname>:10010/risk-starter/
ActiveMonitor will be available at: http://<your hostname>:8081/risk-activemonitor/
ActiveUI
ActiveUI is a static website that can be deployed in any way you see fit. All the necessary files are to be found in the /build folder after the project has been built.
As an example, the UI can be deployed on Tomcat using the following instructions:
-
Build the standalone application:
- Use maven to build the project. You can use the command
mvn clean install
on the parent pom - This will build all the necessary modules including the Javascript UI
- Use maven to build the project. You can use the command
-
Place the deployment in the webapps folder of your Tomcat.
-
Find where the webapps folder is for your Tomcat
-
Create a folder called risk-activeui in the Tomcat webapps folder
-
Copy the contents from the build folder into your new folder webapps/risk-activeui/
-
-
Start the Tomcat server. You should be able to access the UI on the address http://<your hostname>:<port>/risk-activeui/.
Externalising Properties Files
In the default implementation, all the necessary properties are within the project. A number of properties files have been externalised and can be overridden with an external file using JVM variables. You may wish to use this functionality if you are running the project in different environments. Below is a list of the files together with their respective variable names:
There are two options to override default properties:
-
OPTION 1: Command line arguments, e.g. –csvSource.dataset=/path/to/folder . Note we are using “
--
”, instead of “-D
” to set properties with Spring Boot. -
OPTION 2: Create a properties file (e.g. application.properties) and add your property overrides. Then pass it to the main using the command line argument –spring.config.additional-location=/<path>/application.properties