Building the project
Set up Artifactory access
You can download all Maven dependencies from Artifactory by setting up your Maven settings file:npm login --scope @activeviam --registry https://activeviam.jfrog.io/artifactory/npm/
The result is the following message:
Logged in as username to scope @activeviam on https://activeviam.jfrog.io/artifactory/npm/.
If the scope isn’t mentioned in the message, change the command to the following:
npm login --scope=@activeviam --registry=https://activeviam.jfrog.io/artifactory/npm/
Source
Download and unzip the source zip from the Artifactory page.Build
Java 17 supportThe Solution can be run within a Java 17 JVM. Some functionality in the full application and in the regressions tests requires deep reflection access to Java packages. To enable access, please use the following JVM parameters, either through the command line or maven surefire/failsafe configuration.Atoti ISDA-SIMM also works in a Java 11 JVM.
-
Once you have added all the maven repositories and extracted the
source code, run
mvn installon the parent pom file to build the entire project. This will build the Atoti Server executable JAR file (simm-starter/target/simm-starter-exec.jar), ActiveMonitor executable JAR file (simm-activemonitor/target/simm-activemonitor-2.0.2-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
The only configuration required to start is to editsimm-starter/src/main/resources/properties/simm.properties
Set input.data.root.dir.path to the directory you want to put your data.
For more details, see Project configuration.
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 (
simm-starter/src/test/resources/data-samples/data/) intosimm-starter/src/main/resources/then the sample data will be included in the .jar file and you won’t need to set the data directory.
Deployment
Atoti Server and ActiveMonitor
simm-starter and simm-activemonitor are Spring Boot applications that build to an executable JAR. To deploy the
executable JAR files, simply use the following commands:
Each executable JAR will publish the application on a
different port. The default port for simm-starter is 12000, and for
simm-activemonitor is 12001.Atoti Server will be available at: http://<your
hostname>:12000/simm-starter/ActiveMonitor will be available at: http://<your
hostname>:12001/simm-activemonitor/
-
Use the argument
server.port. For example: - Externalize the properties files (see Externalizing Properties Files )
[Eclipse / IntelliJ]
- Use maven to run an initial build of the Solution
$ mvn clean install. - Start the server by running
SimmWebApplication.javainsimm-starter/src/java/com/activeviam/simm/starter. - The server will run at https://localhost:12000/simm-starter
- You will need to compile and serve up the ui from the ui source code, as described in the Atoti UI section below.
Atoti UI
Atoti UI 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 of the standalone application after the project has been built. As an example, the UI can be deployed on Tomcat using the following instructions:-
Build the standalone application:
- Set up artifactory access for node dependencies
- Download the ui source code from artifactory.
- Copy the lockfile for the build tool you use (i.e. package-lock.json for npm, yarn.lock for yarn) into the project’s main directory.
- Run
npm ciif using npm, oryarn install --frozen-lockfileif using yarn. - Run
npm run buildif using npm, oryarn buildif using yarn.
-
Place the deployment in the webapps folder of your Tomcat:
- Find where the webapps folder is for your Tomcat.
- Create a folder called simm-activeui in the Tomcat webapps folder.
- Copy the contents from the build folder into your new folder webapps/simm-activeui/.
- Start the Tomcat server. You can now access the UI on the address http://<your hostname>:<port>/simm-activeui/.
How to run all tests
mvn clean install -P IT
Externalizing Properties Files
In the default implementation, all the necessary properties are within the project. A number of properties files have been externalized 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 three options to override default properties:- OPTION 1: Command line arguments, e.g.
<span class="measure"> --csvSource.dataset=/path/to/folder</span>.
We use ”—” to set properties with Spring Boot.
-
OPTION 2: Create a properties file (e.g.
<span class="measure">application.properties</span>)and add your property overrides. Then pass it to the main using the command line argument<span class="measure">--spring.config.additional-location=/<path> application.properties</span> -
OPTION 3: Change the path to the default properties file using the
appropriate variable specified below:
If any of the above variables are not set, the default properties files will be used. Example values for these properties files include:
- classpath:<filename>
- file:/home/etc/<filename>; - Unix Environment
- file:///C:/Users/john/config/<filename> - Windows environment