Auto-configuration

This section walks you through integrating the Limits Module with an Atoti+ (ActivePivot) server via auto-configuration. This feature was introduced in V1.1.0.

note

The configuration provided in Manual Configuration is still a viable option, but the auto-configuration is now the recommended approach.

Auto-configuration

According to Manual Configuration, the following properties are required to enable Limits to connect to an already running ActivePivot server:

  • ap.url.map
  • ap.asOfDate.dim.map
  • ap.auth.map
  • limits.rest.url
  • limits.auth
  • content.server.url
  • content.server.auth

Some of these properties can be auto-configured at runtime by the ActivePivot server. Here’s how to do this:

1. Import ‘LimitsAutoConfig’ into the ActivePivot server

Maven dependency:

  <dependency>
    <groupId>com.activeviam.limits</groupId>
    <artifactId>limits-auto-config-{AP VERSION}</artifactId>
    <version>{LIMIT MODULE VERSION}</version>
  </dependency>

Currently the auto-config is available for AP versions:

ActivePivot version Auto-config artifact
5.9.X limits-auto-config-ap59
5.10.X limits-auto-config-ap510
5.11.X limits-auto-config-ap511
6.0.X limits-auto-config-ap60

Java import:

import org.springframework.context.annotation.Import;
import com.activeviam.limits.autoconfig.impl.LimitsAutoConfig;

@Import( LimitsAutoConfig.class )
public class ActivePivotApplication {
	// Spring App
}

3. Start the Limits server

Start the Limits server using the installation instructions. Limits will wait for a connection from the ActivePivot server.

4. Start the ActivePivot server with the following properties

Property Description Required Default Value
limits.rest.url The URL where Limit’s REST APIs are located, Ex: http://localhost:3090/limits/rest/v1/. true null
limits.auth The authentication to use in REST requests to the Limits server from the connected Servers. true null

One of each of the following two sets of properties are required (i.e. either 1a or 1b and either 2a or 2b) . The first takes precedence over the second (a takes precedence over b). Note that a org.springframework.security.core.userdetails.UserDetailsService must be defined for the username options to work.

Set Property Description Default Value
1a ap.auth The base-64 encoded authentication used to auto-configure the authorization for Limits to connect to the ActivePivot server null
1b ap.auth.username The username used to auto-configure the authorization for Limits to connect to the ActivePivot server null
2a content.server.auth The base-64 encoded authentication used to auto-configure the authorization for Limits to connect to the ActivePivot Content server null
2b content.server.auth.username The username used to auto-configure the authorization for Limits to connect to the ActivePivot Content server null

The following properties can be provided but are optional:

Property Description Required Default Value
limits.connect.fixed.delay The time delay in milliseconds between consecutive attempts to connect to Limits false 10000
limits.connect.attempts The number of attempts to connect to Limits before quitting. If less than zero the ActivePivot server will continuously try to connect. The ActivePivot server will also try to reconnect if Limits is stopped and restarted. false -1

note

In most production environments the server.root.url property (listed at the bottom of this page) should also be specified.

You are connected!

Your ActivePivot server should now resolve and register the correct LookUpPostProcessor (depending on the ActivePivot version being used), auto-configure the properties required by Limits, send these properties to the Limits server at limits.rest.url and Limits will connect to your ActivePivot server.

Startup sequence does not matter

The auto-configuration does not care if you’re ActivePivot server or your Limits server is up first. As long as limits.connect.attempts has not been reached, your ActivePivot server willcontinuously try to send information to Limits.

note

Ensure that within the ActivePivotConfig of your connected accelerator, the contextValueManager method is not setting the ActivePivotContentService to null. If the ActivePivotContentService is null, KPIs will not appear in the UI, even if they are present in the content server. Sometimes this can be fixed by setting the property contentServer.context-values.ignore to false.

Auto-configuration properties

The following optional properties can be used to start the ActivePivot server in the event that the server cannot auto-configure the properties;

Property Descripton Example
server.root.url The absolute root url of the ActivePivot server. If defined then server.protocol, server.hostname and server.port need not be specified. https://localhost:8080
server.name The name of the ActivePivot server. Used as the (case-sensitive) folder name of Limit definitions. FRTB
server.protocol The protocol used by the ActivePivot server (defaults to http) https
server.hostname The hostname of the ActivePivot server localhost
server.port The port of the ActivePivot server 8080
ap.url The URL of the ActivePivot server’s cube discovery http://localhost:8080/frtb-starter/pivot/rest/v5/cube
ap.configuration.kpi.path The path to get the KPI permissions configuration/kpis
ap.asOfDate.dim The slicing date dimension present in the ActivePivot cube. Notation is Level@Hierarchy@Dimension AsOfDate@Date@Dates
content.server.url The URL of the content server http://localhost:8080/frtb-starter/content
level.path.url The URL of the level path rest service http://localhost:8080/frtb-starter/services/rest/v1/levelPath/

Note that the auto-configuration can be disabled by setting the following property to false.

Property Description Default
auto-config.enable If false then the auto-configuration methods will not be fired true