Add option to choose Kafka client in Docker

- Add docker option to choose confluent-kafka or legacy kafka.
- Set confluent-kafka as default.

Change-Id: I5464f999ace16d9093e90e7ce7204406131bdf15
Story: 2006436
Task: 41145
This commit is contained in:
Martin Chacon Piza 2020-10-23 12:14:14 +02:00
parent 1491ed9a43
commit ef433f084c
3 changed files with 9 additions and 0 deletions

View File

@ -18,6 +18,7 @@ FROM monasca/base:$BASE_TAG
ENV \
KAFKA_URI=kafka:9092 \
KAFKA_WAIT_FOR_TOPICS=alarm-state-transitions,metrics \
KAFKA_LEGACY_CLIENT_ENABLED=false \
MONASCA_CONTAINER_API_PORT=8070 \
DATABASE_BACKEND=influxdb \
INFLUX_HOST=influxdb \

View File

@ -25,6 +25,7 @@ Environment variables
Variable Default Description
============================== ======================================================================= ==========================================
KAFKA_URI kafka:9092 URI to Apache Kafka (distributed streaming platform)
KAFKA_LEGACY_CLIENT_ENABLED false Enable legacy Kafka client
MONASCA_CONTAINER_API_PORT 8070 The port from the metric pipeline endpoint
DATABASE_BACKEND influxdb Select for backend database
INFLUX_HOST influxdb The host for influxdb

View File

@ -498,6 +498,13 @@ wait_time = 1
# effect on stability and/or performance.
#auto_commit = false
#
# Enable legacy Kafka client. When set old version of
# kafka-python library is used. Message format version
# for the brokers should be set to 0.9.0.0 to avoid
# performance issues until all consumers are upgraded.
legacy_kafka_client_enabled = {{ KAFKA_LEGACY_CLIENT_ENABLED | default(false) }}
[keystone_authtoken]