Skip to main content
Version: 1.16

Configuration

Minimal configuration file

The Docker image and the binary distribution contain minimal working configuration file, which is designed as a base for further customizations using additional configuration files. Check Conventions section for more details how to amend and override the minimal configuration file. This file is not used by the Helm chart, which prepares its own config file.

The location and name of the configuration files is defined by the CONFIG_FILE environment variable. Consult Basic environment variables for information on how this variable is resolved.

Details of K8s based configuration can be found in Nussknacker Helm chart documentation.

Configuration areas

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

  • Designer configuration (web application ports, security, various UI settings, database),
  • Scenario Types configuration, comprising of:

Model configuration defines which components and which Processing Mode will be available for the user. Scenario Deployment configuration defines how scenario using these components will be deployed on the Engine. Category defines who has access to the given combination of Model and Scenario Deployment.

The Scenario Type is a convenient umbrella term that groups all these things. Diagram below presents main relationships between configuration areas.

Configuration areas

Configuration file

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

# Designer configuration environment: "local"

# Each scenario type is configured here scenarioTypes: { "scenario-type-1": {

# Configuration of scenario deployment (Flink used as example here) deploymentConfig: { type: "flinkStreaming" restUrl: "http://localhost:8081" }

# Configuration of the model modelConfig: { classPath: ["model/defaultModel.jar", "model/flinkExecutor.jar", "components/flink"] restartStrategy.default.strategy: disable components: { } }

category: "Default" } }

It is worth noting that one Nussknacker Designer may be used to work with multiple Scenario Types and allow user:

  • To use different set of components depending on the category
  • To deploy scenarios on different Engines

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

Environment variables

All configuration options are described in Configuration.

Some of them can be configured using already predefined environment variables, which is mostly useful in the Docker setup. The table below shows all the predefined environment variables used in the Nussknacker image. $NUSSKNACKER_DIR is a placeholder pointing to the Nussknacker installation directory.

Because we use HOCON, you can set (or override) any configuration value used by Nussknacker even if the already predefined environment variable does not exist. This is achieved by setting the JVM property -Dconfig.override_with_env_vars=true and setting environment variables following conventions described here.

Basic environment variables

Variable nameTypeDefault valueDescription
JDK_JAVA_OPTIONSstringCustom JVM options, e.g -Xmx512M
JAVA_DEBUG_PORTintPort to Remote JVM Debugger. By default debugger is turned off.
CONFIG_FILEstring$NUSSKNACKER_DIR/conf/application.confLocation of application configuration. You can pass comma separated list of files, they will be merged in given order, using HOCON fallback mechanism
LOGBACK_FILEstring$NUSSKNACKER_DIR/conf/docker-logback.xmlLocation of logging configuration
WORKING_DIRstring$NUSSKNACKER_DIRLocation of working directory
STORAGE_DIRstring$WORKING_DIR/storageLocation of HSQLDB database storage
CLASSPATHstring$NUSSKNACKER_DIR/lib/:$NUSSKNACKER_DIR/managers/Classpath of the Designer, lib directory contains related jar libraries (e.g. database driver), managers directory contains deployment manager providers
LOGS_DIRstring$WORKING_DIR/logsLocation of logs
HTTP_INTERFACEstring0.0.0.0Network address Nussknacker binds to
HTTP_PORTstring8080HTTP port used by Nussknacker
HTTP_PUBLIC_PATHstringPublic HTTP path prefix the Designer UI is served at, e.g. using external proxy like nginx
DB_URLstringjdbc:hsqldb:file:${STORAGE_DIR}/db;sql.syntax_ora=trueSee also for more information
DB_DRIVERstringorg.hsqldb.jdbc.JDBCDriverDatabase driver class name
DB_USERstringSAUser used for connection to database
DB_PASSWORDstringPassword used for connection to database
DB_CONNECTION_TIMEOUTint30000Connection to database timeout in milliseconds
AUTHENTICATION_METHODstringBasicAuthMethod of authentication. One of: BasicAuth, OAuth2
AUTHENTICATION_USERS_FILEstring$NUSSKNACKER_DIR/conf/users.confLocation of users configuration file
AUTHENTICATION_HEADERS_ACCEPTstringapplication/json
FLINK_REST_URLstringhttp://localhost:8081URL to Flink's REST API - used for scenario deployment
FLINK_ROCKSDB_ENABLEbooleantrueEnable RocksDB state backend support
KAFKA_ADDRESSstringlocalhost:9092Kafka address used by Kafka components (sources, sinks)
KAFKA_AUTO_OFFSET_RESETstringSee Kafka documentation. For development purposes it may be convenient to set this value to 'earliest', when not set the default from Kafka ('latest' at the moment) is used
SCHEMA_REGISTRY_URLstringhttp://localhost:8082Address of Confluent Schema registry used for storing data model
GRAFANA_URLstring/grafanaURL to Grafana, used in UI. Should be relative to Nussknacker URL to avoid additional CORS configuration
INFLUXDB_URLstringhttp://localhost:8086URL to InfluxDB used by counts mechanism
MODEL_CLASS_PATHlist of strings(for flink) "model/defaultModel.jar", "model/flinkExecutor.jar", "components/flink", "components/common", "flink-dropwizard-metrics-deps/"]Classpath of model (jars that will be used for execution of scenarios)
PROMETHEUS_METRICS_PORTintWhen defined, JMX MBeans are exposed as Prometheus metrics on this port
PROMETHEUS_AGENT_CONFIG_FILEint$NUSSKNACKER_DIR/conf/jmx_prometheus.yamlDefault configuration for JMX Prometheus agent. Used only when agent is enabled. See PROMETHEUS_METRICS_PORT
TABLES_DEFINITION_FILEstring$NUSSKNACKER_DIR/conf/dev-tables-definition.sqlLocation of file containing definitions of tables for Flink Table API components in Flink Sql

OAuth2 environment variables

Variable nameTypeDefault value
OAUTH2_CLIENT_SECRETstring
OAUTH2_CLIENT_IDstring
OAUTH2_AUTHORIZE_URIstring
OAUTH2_REDIRECT_URIstring
OAUTH2_ACCESS_TOKEN_URIstring
OAUTH2_PROFILE_URIstring
OAUTH2_PROFILE_FORMATstring
OAUTH2_IMPLICIT_GRANT_ENABLEDboolean
OAUTH2_ACCESS_TOKEN_IS_JWTbooleanfalse
OAUTH2_USERINFO_FROM_ID_TOKENstringfalse
OAUTH2_JWT_AUTH_SERVER_PUBLIC_KEYstring
OAUTH2_JWT_AUTH_SERVER_PUBLIC_KEY_FILEstring
OAUTH2_JWT_AUTH_SERVER_CERTIFICATEstring
OAUTH2_JWT_AUTH_SERVER_CERTIFICATE_FILEstring
OAUTH2_JWT_ID_TOKEN_NONCE_VERIFICATION_REQUIREDstring
OAUTH2_GRANT_TYPEstringauthorization_code
OAUTH2_RESPONSE_TYPEstringcode
OAUTH2_SCOPEstringread:user
OAUTH2_AUDIENCEstring
OAUTH2_USERNAME_CLAIMstring

Conventions

  • We use HOCON (see the introduction or the full specification for details) as our main configuration format. Lightbend config library is used for parsing configuration files - you can check the documentation for details on conventions of file names and merging of configuration files.
  • nussknacker.config.locations Java 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). This mechanism is used to extend or override default configuration contained in the minimal configuration file - see docker demo for example:
  • If config.override_with_env_vars Java system property is set to true, it is possible to override settings with env variables. This property is set to true in the official Nussknacker Docker image.

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

What is next?

Most likely you will want to configure enrichers - they are configured under the modelConfig.components configuration key - see the configuration file. The details of enrichers configuration are in the Integration chapter of the documentation.