Skip to main content
Version: 1.3

Configuration

Configuration areas

Nussknacker configuration is divided into several configuration areas, each area addressing a specific aspect of using Nussknacker:

Designer configuration contains all settings for Nussknacker Designer - e.g. web application ports, security, various UI settings.

One Nussknacker Designer deployment may be used to create various Scenario Types which:

See development configuration (used to test various Nussknacker features) for an example of configuration with more than one Scenario Type.

Diagram below presents main relationships between configuration areas.

Configuration areas

Let's see how those concepts look in fragment of main configuration file:

# Designer configuration 
environment: "local"
...

# Each scenario type is configured here
scenarioTypes {
"scenario-type-1": {
# Configuration of DeploymentManager (Flink used as example here)
deploymentConfig: {
type: "flinkStreaming"
restUrl: "http://localhost:8081"
}
# Configuration of model
modelConfig: {
classPath: ["model/defaultModel.jar", "model/flinkExecutor.jar", "components/flink"]
restartStrategy.default.strategy: disable
components {
...
}
}
}
}

This is how it looks in default configuration file in NU distribution.

Environment variables

Environment variables are described in Installation guide, they are mostly helpful in the docker setup.

Hocon - configuration format

We use HoCon (see introduction or full specification for details) as our main configuration format. Lightbend config library is used for parsing configuration files - you can check documentation for details on conventions of file names and merging of configuration files.

Following Nussknacker specific rules apply:

  • nussknacker.config.locations system property (CONFIG_FILE environment variable for Docker image) defines location of configuration files (separated by comma). The files are read in order, entries from later files can override the former (using HoCon fallback mechanism) - see docker demo for example:
  • defaultUiConfig.conf contains defaults for Nussknacker Designer
  • config.override_with_env_vars is set to true, so it’s possible to override settings with env variables

It’s important to remember that model configuration is prepared a bit differently. Please read model configuration for the details.