Dependencies overview

Ensure the following infrastructure components are available before starting the NoSQL DB Runner service:
  • Docker Engine: Version 17.06 or higher
  • Database Backend: One of the following options:
    • MongoDB: Version 4.4 or higher for data storage (replica set configuration recommended)
    • Azure Cosmos DB: With MongoDB API enabled for cloud-native deployments
  • OAuth2 Provider: For authentication and authorization

Configuration

The service comes with most of the needed configuration properties filled in, but there are several environment variables that need to be set up for your specific deployment.

Database configuration

The NoSQL DB Runner connects to MongoDB for data persistence. Configure the following variables:
Environment VariableDescriptionExample Value
DB_USERNAMEMongoDB username for the servicenosql-db-runner
DB_PASSWORDMongoDB password (should be stored as secret)secret(mongodb-generic-devenv)
SPRING_DATA_MONGODB_URIComplete MongoDB connection stringmongodb://${DB_USERNAME}:${DB_PASSWORD}@nosql-db-runner-mongodb-0.nosql-db-runner-mongodb-headless,nosql-db-runner-mongodb-1.nosql-db-runner-mongodb-headless,nosql-db-runner-mongodb-arbiter-0.nosql-db-runner-mongodb-arbiter-headless:27017/nosql-db-runner?retryWrites=false
The MongoDB URI supports replica set configuration for high availability. The connection string includes multiple MongoDB instances and an arbiter for proper replica set functionality.

Configuring authorization & access roles

Connect the NoSQL DB Runner to an OAuth 2.0 identity management platform:
Environment VariableDescriptionExample Value
SECURITY_OAUTH2_BASE_SERVER_URLBase URL for the OAuth 2.0 Authorization Serverhttps://auth.devmain.flowxai.dev/auth
SECURITY_OAUTH2_CLIENT_CLIENT_IDUnique identifier for the client applicationpaperflow-service
SECURITY_OAUTH2_CLIENT_CLIENT_SECRETSecret key for client authentication (stored as secret)secret(keycloak-generic)
SECURITY_OAUTH2_REALMOAuth 2.0 realm namepaperflow

FlowX operations document limit

This setting allows you to configure the maximum number of documents that can be retrieved from MongoDB in a single request.
Environment VariableDescriptionDefault Value
FLOWX_RUNOPERATIONS_DOCUMENTLIMITMaximum number of documents to be processed in a single operation50

Configuring logging

Control log levels for different components of the service:
Environment VariableDescriptionDefault Value
LOGGING_CONFIG_FILEPath to the logging configuration filelogback-spring.xml
LOGGING_LEVEL_ROOTRoot logger level for the Spring Boot serviceDEBUG
LOGGING_LEVEL_APPApplication-specific log levelDEBUG
LOGGING_LEVEL_SOCKETSocket communication log levelDEBUG
Using DEBUG log levels in production environments may impact performance and generate large log volumes. Consider using INFO or WARN levels for production deployments.

Configuring application management

Configure management endpoints and monitoring capabilities:
Environment VariableDescriptionDefault Value
MANAGEMENT_SERVER_PORTPort for management endpoints8081
MANAGEMENT_ENDPOINT_HEALTH_GROUP_LIVENESS_INCLUDEHealth checks for liveness probesping,accessInfo,buildInfo
MANAGEMENT_ENDPOINT_HEALTH_GROUP_READINESS_INCLUDEHealth checks for readiness probesping,accessInfo,buildInfo
MANAGEMENT_HEALTH_KUBERNETES_ENABLEDEnable Kubernetes health checksfalse

Prometheus metrics configuration

Enable Prometheus metrics export for monitoring:
Environment VariableDescriptionDefault Value
MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLEDEnable Prometheus metrics exporttrue

Troubleshooting

Common issues