Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Mongey committed Aug 9, 2024
1 parent 7723934 commit 67fe5fd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.kafka
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ ENV KAFKA_BROKER_ID=$broker_id
ENV KAFKA_NODE_ID=$broker_id
ENV KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
ENV KAFKA_PROCESS_ROLES='broker,controller'
ENV KAFKA_CONTROLLER_QUORUM_VOTERS=$broker_id@$listener_host:9093
ENV KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka1:9093
ENV KAFKA_CONTROLLER_LISTENER_NAMES='CONTROLLER'


# confluent's bash script looks for an 'SSL' suffix in listener names:
# https://github.com/confluentinc/cp-docker-images/blob/76d786d0243ea16626b8b46dba34ec0b1066de84/debian/kafka/include/etc/confluent/docker/configure#L65
ENV KAFKA_LISTENERS=INTERNAL_SSL://$listener_host:9090,EXTERNAL_SSL://$listener_host:9092,CONTROLLER://$listener_host:9093
ENV KAFKA_LISTENERS=INTERNAL_SSL://$listener_host:9090,EXTERNAL_SSL://$listener_host:9092
ENV KAFKA_ADVERTISED_LISTENERS=INTERNAL_SSL://$listener_host:9090,EXTERNAL_SSL://localhost:$listener_port
ENV KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL_SSL:SSL,EXTERNAL_SSL:SSL,CONTROLLER:PLAINTEXT
ENV KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL_SSL
Expand Down
26 changes: 25 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@ services:
broker_id: 1
listener_host: kafka1
listener_port: 9092
environment:
CLUSTER_ID: "MkU3OEVBNTcwNTJENDM2Qk"
KAFKA_LISTENERS: INTERNAL_SSL://kafka1:9090,EXTERNAL_SSL://kafka1:9092,CONTROLLER://kafka1:9093
ports:
- "9092:9092"
- "9093:9093"
kafka2:
build:
context: .
dockerfile: Dockerfile.kafka
args:
broker_id: 2
listener_host: kafka2
listener_port: 9092
environment:
CLUSTER_ID: "MkU3OEVBNTcwNTJENDM2Qk"
KAFKA_PROCESS_ROLES: broker
kafka3:
build:
context: .
dockerfile: Dockerfile.kafka
args:
broker_id: 3
listener_host: kafka3
listener_port: 9092
environment:
CLUSTER_ID: "MkU3OEVBNTcwNTJENDM2Qk"
KAFKA_PROCESS_ROLES: broker

0 comments on commit 67fe5fd

Please sign in to comment.