Skip to content

Commit

Permalink
Update docker-compose-3-control-3-broker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KoshelevDV authored Nov 24, 2024
1 parent f69a25f commit 6495550
Showing 1 changed file with 31 additions and 57 deletions.
88 changes: 31 additions & 57 deletions docker-compose/docker-compose-3-control-3-broker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
version: '3'

controller-environment: &controller-environment
KAFKA_CFG_PROCESS_ROLES: 'controller'
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@controller1:29091,2@controller2:29092,3@controller3:29093'
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CFG_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_KRAFT_CLUSTER_ID: 'eqzumUc5SUii2QiSB9jBWA'

broker-environment: &broker-environment
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@controller1:29091,2@controller2:29092,3@controller3:29093'
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_PROCESS_ROLES: 'broker'
KAFKA_CFG_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_KRAFT_CLUSTER_ID: 'eqzumUc5SUii2QiSB9jBWA'
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_MIN_ISR: 3
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CFG_GROUP_INITIAL_REBALANCE_DELAY_MS: 3

services:
controller1:
image: bitnami/kafka:3.5-debian-11
Expand All @@ -8,16 +32,9 @@ services:
- "9091:9091"
- "29091:29091"
environment:
KAFKA_CFG_PROCESS_ROLES: 'controller'
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@controller1:29091,2@controller2:29092,3@controller3:29093'
<<: *controller-environment
KAFKA_CFG_NODE_ID: 1
KAFKA_CFG_LISTENERS: 'CONTROLLER://controller1:29091'
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CFG_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_KRAFT_CLUSTER_ID: 'eqzumUc5SUii2QiSB9jBWA'

controller2:
image: bitnami/kafka:3.5-debian-11
Expand All @@ -27,16 +44,9 @@ services:
- "9092:9092"
- "29092:29092"
environment:
KAFKA_CFG_PROCESS_ROLES: 'controller'
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@controller1:29091,2@controller2:29092,3@controller3:29093'
<<: *environment
KAFKA_CFG_NODE_ID: 2
KAFKA_CFG_LISTENERS: 'CONTROLLER://controller2:29092'
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CFG_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_KRAFT_CLUSTER_ID: 'eqzumUc5SUii2QiSB9jBWA'

controller3:
image: bitnami/kafka:3.5-debian-11
Expand All @@ -46,16 +56,9 @@ services:
- "9093:9093"
- "29093:29093"
environment:
KAFKA_CFG_PROCESS_ROLES: 'controller'
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@controller1:29091,2@controller2:29092,3@controller3:29093'
<<: *environment
KAFKA_CFG_NODE_ID: 3
KAFKA_CFG_LISTENERS: 'CONTROLLER://controller3:29093'
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CFG_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_KRAFT_CLUSTER_ID: 'eqzumUc5SUii2QiSB9jBWA'

kafka1:
image: bitnami/kafka:3.5-debian-11
Expand All @@ -69,21 +72,12 @@ services:
- "9094:9094"
- "29094:29094"
environment:
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@controller1:29091,2@controller2:29092,3@controller3:29093'
<<: *broker-environment
KAFKA_CFG_NODE_ID: 4
KAFKA_CFG_BROKER_ID: 4
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_PROCESS_ROLES: 'broker'
KAFKA_CFG_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_KRAFT_CLUSTER_ID: 'eqzumUc5SUii2QiSB9jBWA'
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_MIN_ISR: 3
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT'
KAFKA_CFG_LISTENERS: 'PLAINTEXT://kafka1:29094,EXTERNAL://:9094'
KAFKA_CFG_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka1:29094,EXTERNAL://192.168.88.239:9094'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CFG_GROUP_INITIAL_REBALANCE_DELAY_MS: 3


kafka2:
image: bitnami/kafka:3.5-debian-11
Expand All @@ -97,21 +91,11 @@ services:
- "9095:9095"
- "29095:29095"
environment:
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@controller1:29091,2@controller2:29092,3@controller3:29093'
<<: *broker-environment
KAFKA_CFG_NODE_ID: 5
KAFKA_CFG_BROKER_ID: 5
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_PROCESS_ROLES: 'broker'
KAFKA_CFG_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_KRAFT_CLUSTER_ID: 'eqzumUc5SUii2QiSB9jBWA'
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_MIN_ISR: 3
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT'
KAFKA_CFG_LISTENERS: 'PLAINTEXT://kafka2:29095,EXTERNAL://:9095'
KAFKA_CFG_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka2:29095,EXTERNAL://192.168.88.239:9095'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CFG_GROUP_INITIAL_REBALANCE_DELAY_MS: 3

kafka3:
image: bitnami/kafka:3.5-debian-11
Expand All @@ -125,21 +109,11 @@ services:
- "9096:9096"
- "29096:29096"
environment:
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@controller1:29091,2@controller2:29092,3@controller3:29093'
<<: *broker-environment
KAFKA_CFG_NODE_ID: 6
KAFKA_CFG_BROKER_ID: 6
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_PROCESS_ROLES: 'broker'
KAFKA_CFG_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_KRAFT_CLUSTER_ID: 'eqzumUc5SUii2QiSB9jBWA'
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_CFG_TRANSACTION_STATE_LOG_MIN_ISR: 3
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT'
KAFKA_CFG_LISTENERS: 'PLAINTEXT://kafka3:29096,EXTERNAL://:9096'
KAFKA_CFG_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka3:29096,EXTERNAL://192.168.88.239:9096'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CFG_GROUP_INITIAL_REBALANCE_DELAY_MS: 3

kafka-ui:
image: provectuslabs/kafka-ui
Expand Down

0 comments on commit 6495550

Please sign in to comment.