insights-ccx-messaging

Stub for all CCX services based on Insights Core Messaging framework

View the Project on GitHub RedHatInsights/insights-ccx-messaging

Configuration

The config.yaml is an standard Insights Core Messaging configuration file. To learn about its structure and configuring some common things, you probably want to read its documentation: Insights Core Messaging documentation.

Let’s use the ccx-data-pipeline2 configuration as an example to understand the configuration points. The service section, where the specific consumer, downloader, engine and publisher are configured.

Environment variables

In addition to the configuration mentioned above, some other behaviors can be configured through the definition of environment variables.

All the YAML file is parsed by the Insights Core Messaging library, that includes support for using environment variables with default values as values for any variable in the configuration file.

As an example, given an environment variable named KAFKA_INCOMING_TOPIC that contains the Kafka topic name where the consumer should read, you can put ${KAFKA_INCOMING_TOPIC} as the value for the consumer/incoming_topic configuration.

Following the same example, if you want that a default value is used in case of KAFKA_INCOMING_TOPIC is not defined, you can specify ${KAFKA_INCOMING_TOPIC:default_value}. In this case, the environment variable will take precedence over the default value, but this default will be used in case the environment variable is not defined.

In addition to the YAML configuration, another important note about the needed environment variables:

CloudWatch configuration

To enable the sending of log messages to a Cloud Watch (AWS) instance, you should define all the following environment variables:

If any of these environment variables are not defined, the Cloud Watch service cannot be configured and won’t be used at all.