Building and deploying the module

This project aims to be an example of how to run Atoti Limits with an Atoti Server Spring Boot application.

This project is a starting point for your own projects and implementations. You should be able to take this, customize it, and get a Cube up and running in a few minutes.

Set up Artifactory access

In addition to the repository zips, you can download all Maven dependencies from Artifactory by setting up your Maven settings file:

<settings>
    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <repositories>
                <repository>
                    <id>ActiveViamInternalRepository</id>
                    <name>ActiveViam Internal Repository</name>
                    <url>https://activeviam.jfrog.io/activeviam/activeviam-mvn-accelerators/</url>
                </repository>
            </repositories>
        </profile>
    </profiles>

    <servers>
        <server>
            <id>ActiveViamInternalRepository</id>
            <username>username</username>
            <password>password</password>
        </server>
    </servers>
</settings>

To download the dependencies for the UI, you need to set up access to Artifactory via npm:

npm login --scope @activeviam --registry https://activeviam.jfrog.io/artifactory/api/npm/activeviam-npm-accelerators/

The result is the following message: Logged in as username to scope @activeviam on https://activeviam.jfrog.io/artifactory/api/npm/activeviam-npm-accelerators/.

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/api/npm/activeviam-npm-accelerators/

Build and deploy the project

Requirements

Maven Repositories

  • From the ActiveViam share page, download the Maven repository for the version of Atoti Server Atoti Limits is based on. This is specified in the Release notes of Atoti Limits you are deploying. The zip file containing the Maven repository is called maven-repository-<version number>.zip.

  • From the Atoti Limits Release Notes page, follow the directions to the Distribution Files section and download the Maven repository for Atoti Limits. This contains all dependencies required to build Atoti Limits that aren’t included in the Atoti Server download. A zip file containing the Maven repository is called atoti-limits-<version number>-maven-repository.zip.

Add these repositories to your existing Maven repository.

Source

Download and unzip the source zip from the Artifactory page.

Limits backend

  1. In order to compile the source code using Maven, you must set your MAVEN_OPTS environment variable, like so: MAVEN_OPTS="-Xss8m".
  2. Once you have added all the Maven repositories and extracted the source code, run mvn clean install on the parent pom file to build the entire project.
    This generates a JAR file, which can be run using standard Java commands:
  • Run java -Dinput.data.root.dir.path=path\to\data-samples -jar <path to>/limits-exec.jar
  • Alternatively, if you are on MacOS or Linux, run java -Dinput.data.root.dir.path=path\to\data-samples -DchunkAllocatorClass=com.qfs.chunk.direct.impl.MmapDirectChunkAllocator -jar <path to>/limits-exec.jar

Limits UI

For details on activating the UI features, see UI Activation.

Configuration

Configure your Atoti server to point to where you will deploy the module, as laid out in How to Integrate Limits to an Atoti Server.

For information on configuring the properties files, data files, and ActiveViam components, see Project configuration.

Usage

Atoti Limits can be integrated with any Atoti Server instance with the same version. For more information, see How to Integrate Limits to Atoti.

As Of Date

The file as_of_date.csv sets the asOfDate for the limits application. This asOfDate is used for evaluating limits against connected Solutions.

Limit structures

The files limit_sructures_approve_frtb.csv and limit_sructures_mra.csv load the LimitStructures store, and can be found in src/test/resources/data-samples/data/{server name}. Limit structures which have the same Name, CubeName, and ServerName fields create a single KPI on a connected server via REST calls.

For more information on the limit_structures.csv input file, see limit structures.

note

Currently, limit_sructures_mra.csv is being ignored because the ETL will skip un-configured accelerators. To load MRA limits, modify the ap.url.map property in src/main/resources/properties/limits.properties to include MRA. ( Example: {'MRA': 'http://localhost:10010/risk-activepivot/pivot/rest/v5/cube', 'FRTB': 'http://localhost:8080/frtb-starter/pivot/rest/v5/cube'} )

AlertTasks and the Incidents store

AlertTasks are created for each limit in the Limits store, which evaluates whether a limit is in breach or warning state. The PollingFrequency field of a limit determines how often an AlertTask is run. When limits are in breach or warning status, the AlertTask writes to a file named incidents.csv. You can find this file in today’s date folder inside the directory src/test/resources/data-damples/data/alert. The files generated here will populate the Incidents store via a listening topic.

Limit workflow

In the resources/processes folder, the following Activiti workflow bpmn files can be found out of box.

Other

note

If running as a JAR file, the limit_sructures.csv file may not be found, and you will need to explicitly point to it.

  • Atoti UI, ActiveViam’s user interface for exploring the Cube, will be available from http://localhost:9090/ui

The default security credentials are admin:admin, but can be modified in the SecurityConfig class (we use Spring Security).

Limits Ecosystem and Architecture

In the ActiveViam ecosystem, Atoti Limits runs on its own JVM and is the one-stop shop to manage all the limits across all Atoti Server cubes. The workflow audit is automatically maintained in the persistent relational database. All users log into a combined Atoti UI to access all Atoti Server cubes.

Limits Ecosystem and Architecture