forked from bf2fc6cc711aee1a0c2a/kafka-admin-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (82 loc) · 3.03 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
version: '3.9'
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.2.1
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_SASL_ENABLED: "false"
broker-plain:
profiles: [ 'plain' ]
image: confluentinc/cp-kafka:7.2.1 ## = 3.2.1
hostname: broker
container_name: broker
depends_on:
- zookeeper
ports:
- "9091:9091"
- "9092:9092"
- "9101:9101"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_SASL_ENABLED_MECHANISMS: PLAIN
KAFKA_INTER_BROKER_LISTENER_NAME: SASL_PLAINTEXT
KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAIN
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
KAFKA_SUPER_USERS: 'User:admin'
KAFKA_LISTENERS: SASL_PLAINTEXT://:9092,PLAINTEXT://:9091
KAFKA_ADVERTISED_LISTENERS: SASL_PLAINTEXT://localhost:9092,PLAINTEXT://localhost:9091
ZOOKEEPER_SASL_ENABLED: "false"
KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/kafka_server_jaas.conf"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
volumes:
- ./kafka_server_jaas.conf:/etc/kafka/kafka_server_jaas.conf
broker-tls:
profiles: [ 'tls' ]
image: confluentinc/cp-kafka:7.2.1 ## = 3.2.1
hostname: broker
container_name: broker
depends_on:
- zookeeper
ports:
- "9091:9091"
- "9092:9092"
- "9093:9093"
- "9101:9101"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_SASL_ENABLED_MECHANISMS: PLAIN
KAFKA_INTER_BROKER_LISTENER_NAME: SASL_PLAINTEXT
KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAIN
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
KAFKA_SUPER_USERS: 'User:admin'
KAFKA_LISTENERS: SASL_PLAINTEXT://:9092,PLAINTEXT://:9091,SASL_SSL://:9093
KAFKA_ADVERTISED_LISTENERS: SASL_PLAINTEXT://localhost:9092,PLAINTEXT://localhost:9091,SASL_SSL://localhost:9093
KAFKA_SSL_KEYSTORE_FILENAME: "cluster.keystore.p12"
KAFKA_SSL_KEYSTORE_CREDENTIALS: "kafka_secret.txt"
KAFKA_SSL_KEY_CREDENTIALS: "kafka_secret.txt"
KAFKA_SSL_KEYSTORE_TYPE: "PKCS12"
ZOOKEEPER_SASL_ENABLED: "false"
KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/kafka_server_jaas.conf"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
volumes:
- ./kafka_server_jaas.conf:/etc/kafka/kafka_server_jaas.conf
- ./target/certs/:/etc/kafka/secrets