Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
chengjie8 committed Oct 10, 2023
1 parent bf7ee32 commit a04b7a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ services:
environment:
<<: [*rabbitmq-placeholder-vars, *common-vars]
BIE_KAFKA_PLACEHOLDERS_BROKERS: mock-bie-kafka:9092
BIE_KAFKA_PLACEHOLDERS_SCHEMA_REGISTRY: mock-bie-schema-registry:8081
BIE_KAFKA_KEYSTORE_INBASE64: ${BIE_KAFKA_KEYSTORE_INBASE64}
BIE_KAFKA_KEYSTORE_PASSWORD: ${BIE_KAFKA_KEYSTORE_PASSWORD}
BIE_KAFKA_TRUSTSTORE_INBASE64: ${BIE_KAFKA_TRUSTSTORE_INBASE64}
Expand Down
21 changes: 17 additions & 4 deletions mocks/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ services:
- vro_intranet

mock-bie-kafka:
profiles: ["all","kafka"]
profiles: [ "all","kafka" ]
image: va/vro_mocks-mock-bie-kafka:latest
<<: [*common-sde-security, *common-security-opt]
<<: [ *common-sde-security, *common-security-opt ]
# Port 9092 is for internal communication within the vro_intranet, and is needed for consuming/producing messages
# within the vro_intranet docker network. In order to produce/consume messages outside the vro_intranet network,
# the port 9094 is exposed for external communication with mock-bie-kafka from outside the vro_intranet. Advertised
Expand All @@ -76,6 +76,7 @@ services:
KAFKA_CFG_ADVERTISED_LISTENERS: INTERNAL://mock-bie-kafka:9092,EXTERNAL://localhost:9094
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'INTERNAL'
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: 'true'

# Kafka Kraft configurations
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
Expand All @@ -89,8 +90,20 @@ services:

# For development without having to deal with connecting via SSL, use port 9092 or do the following.
# To disable SSL, uncomment the following and comment out the next SSL section
ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
# ALLOW_PLAINTEXT_LISTENER: 'yes'
# KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT

# Set up SSL -- see "Security" section of https://hub.docker.com/r/bitnami/kafka/
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:SSL
KAFKA_CFG_SSL_CLIENT_AUTH: required
# PEM https://medium.com/analytics-vidhya/how-to-use-pem-certificates-with-apache-kafka-f3b444a00816
KAFKA_TLS_TYPE: JKS
KAFKA_CERTIFICATE_PASSWORD: mockKafka

volumes:
# scripts/setenv.sh creates jks files from env variables
- './mock-bie-kafka/kafka.keystore.jks:/opt/bitnami/kafka/config/certs/kafka.keystore.jks:ro'
- './mock-bie-kafka/kafka.truststore.jks:/opt/bitnami/kafka/config/certs/kafka.truststore.jks:ro'
networks:
- vro_intranet

Expand Down

0 comments on commit a04b7a2

Please sign in to comment.