Skip to main content
Version: 2.14.0

CMS setup guide

The service is available as a docker image.

It has the following dependencies:

  • a mongodb database
  • it needs to be able to connect to the same Kafka instance as the one used by the engine
  • a redis instance for caching

The service comes with most of the needed configuration properties filled in, but there are a few that need to be set up using some custom environment variables.

Dependencies

Mongo database

Basic Mongo configuration - helm values.yaml

cms-mdb:
existingSecret: {{secretName}}
mongodbDatabase: {{CmsDatabaseName}}
mongodbUsername: {{CmsDatabaseUser}}
persistence:
enabled: true
mountPath: /bitnami/mongodb
size: 4Gi
replicaSet:
enabled: true
name: rs0
pdb:
enabled: true
minAvailable:
arbiter: 1
secondary: 1
replicas:
arbiter: 1
secondary: 1
useHostnames: true
serviceAccount:
create: false
usePassword: true

Redis server

The service can use the Redis component already deployed for the engine.

Configuration

Authorization configuration

The following variables need to be set in order to connect to the identity management platform:

SECURITY_OAUTH2_BASE_SERVER_URL

SECURITY_OAUTH2_CLIENT_CLIENT_ID

SECURITY_OAUTH2_REALM

MongoDB configuration

The MongoDB database is used for storing taxonomies and contents. The following configurations need to be set using environment variables:

SPRING_DATA_MONGODB_URI - the uri for the mongodb database

Redis configuration

The following values should be set with the corresponding Redis-related values.

SPRING_REDIS_HOST

SPRING_REDIS_PASSWORD

REDIS_TTL

All the data produced by the service will be stored in Redis under a specific key. The name of the key can be configured using the environment variable:

SPRING_CACHE_REDIS_KEY_PREFIX

Kafka configuration

The following Kafka-related configurations can be set by using environment variables:

SPRING_KAFKA_BOOTSTRAP_SERVERS - address of the Kafka server

SPRING_KAFKA_CONSUMER_GROUP_ID - a group of consumers

KAFKA_CONSUMER_THREADS - the number of Kafka consumer threads

KAFKA_AUTH_EXCEPTION_RETRY_INTERVAL - the interval between retries after AuthorizationException is thrown by KafkaConsumer

Each action available in the service corresponds to a Kafka event. A separate Kafka topic must be configured for each use case.

caution

The Engine is listening for messages on topics with names of a certain pattern, make sure to use correct outgoing topic names when configuring the CMS service.

Logging

The following environment variables could be set in order to control log levels:

LOGGING_LEVEL_ROOT - root spring boot microservice logs

LOGGING_LEVEL_APP - app level logs

LOGGING_LEVEL_MONGO_DRIVER - logs related to mongo driver

File storage

APPLICATION_FILE_STORAGE_S3_SERVER_URL

APPLICATION_FILE_STORAGE_S3_BUCKET_NAME

APPLICATION_FILE_STORAGE_S3_ROOT_DIRECTORY

APPLICATION_FILE_STORAGE_S3_CREATE_BUCKET


Was this page helpful?