Infrastructure prerequisites
The Runtime Manager service requires the following components to be set up before it can be started:- PostgreSQL - version 13 or higher for managing application data
- MongoDB - version 4.4 or higher for managing runtime data
- Redis - version 6.0 or higher (if required)
- Kafka - version 2.8 or higher for event-driven communication between services
- OAuth2 Authentication - Ensure a compatible OAuth2 authorization server is configured.
Dependencies
Configuration
General environment variables
The following environment variables provide essential configurations:LOGGING_CONFIG_FILE
- Path to the logging configuration file for customized logging levels.SPRING_APPLICATION_NAME
- Sets the application name.- Default Value:
application-manager
-> must be changed toruntime-manager
.
- Default Value:
Database configuration
The Runtime Manager uses the same PostgreSQL (to store application data) and MongoDB (to manage runtime data) as application-manager. Configure these database connections with the following environment variables:PostgreSQL (Application data)
SPRING_DATASOURCE_URL
- Database URL for the PostgreSQL data source (same as the one configured inapplication-manager
setup)
MongoDB (Runtime data)
SPRING_DATA_MONGODB_URI
- URI for connecting to MongoDB for runtime data (same as the one configured inapplication-manager
setup)- Format:
mongodb://${DB_USERNAME}:${DB_PASSWORD}@<host1>,<host2>,<arbiter-host>:<port>/${DB_NAME}?retryWrites=false
- Format:
DB_USERNAME
:app-runtime
DB_NAME
:app-runtime
DB_PASSWORD
: DB password.
Configuring Kafka
Kafka is used for event-driven operations within the Runtime Handler. Set up the Kafka configuration using the following environment variables:SPRING_KAFKA_BOOTSTRAP_SERVERS
- Address of the Kafka server in the formathost:port
KAFKA_TOPIC_NAMING_ENVIRONMENT
- Environment-specific suffix for Kafka topics
Kafka OAuth Authentication
To securely integrate with Kafka, configure the following OAuth credentials:KAFKA_OAUTH_CLIENT_ID
- OAuth Client ID for KafkaKAFKA_OAUTH_CLIENT_SECRET
- OAuth Client Secret for KafkaKAFKA_OAUTH_TOKEN_ENDPOINT_URI
- OAuth Token Endpoint URI for obtaining Kafka tokens- Format:
https://<auth-server>/auth/realms/<realm>/protocol/openid-connect/token
- Format:
Configuring authentication and access roles
Runtime Handler uses OAuth2 for secure access control. Set up the OAuth2 configurations with the following environment variables:SECURITY_OAUTH2_BASE_SERVER_URL
- Base URL for the OAuth 2.0 Authorization ServerSECURITY_OAUTH2_CLIENT_CLIENT_ID
- Unique identifier for the client application registered with the OAuth 2.0 serverSECURITY_OAUTH2_CLIENT_CLIENT_SECRET
- Secret key for authenticating requests made by the authorization clientSECURITY_OAUTH2_REALM
- The realm name for OAuth2 authentication
Redis configuration (optional)
If Redis is required for caching, set the following environment variable:SPRING_REDIS_HOST
- Hostname or IP address of the Redis server
Configuring file storage
For file storage needs, configure the S3-compatible storage with the following environment variable:APPLICATION_FILE_STORAGE_S3_SERVER_URL
- URL of the S3-compatible storage server for storing application files.
Ingress configuration
For exposing the Runtime manager service, configure public, admin and adminInstances ingress settings:Note: Replace placeholders in environment variables with the appropriate values for your environment before starting the service.