-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
127 lines (121 loc) · 4.61 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: '2.2'
networks:
kafka-network:
driver: bridge
services:
zookeeper:
image: 'bitnami/zookeeper:3.7'
container_name: zookeeper
networks:
- kafka-network
environment:
ALLOW_ANONYMOUS_LOGIN: 'yes'
kafka:
image: 'bitnami/kafka:3.1.0'
container_name: kafka
networks:
- kafka-network
depends_on:
- zookeeper
ports:
- "9092:9092"
- "9093:9093"
environment:
KAFKA_BROKER_ID: 1
ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_CFG_NUM_NETWORK_THREADS: 3
KAFKA_CFG_NUM_IO_THREADS: 8
KAFKA_CFG_SOCKET_SEND_BUFFER_BYTES: 102400
KAFKA_CFG_SOCKET_RECEIVE_BUFFER_BYTES: 102400
KAFKA_CFG_SOCKET_REQUEST_MAX_BYTES: 104857600
KAFKA_CFG_LOG_DIRS: /tmp/kafka-logs
KAFKA_CFG_NUM_PARTITIONS: 1
KAFKA_CFG_NUM_RECOVERY_THREADS_PER_DATA_DIR: 1
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_CFG_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CFG_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 18000
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_CFG_LISTENERS: CLIENT://:9092,EXTERNAL://:9093
KAFKA_CFG_ADVERTISED_LISTENERS: CLIENT://kafka:9092,EXTERNAL://localhost:9093
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: CLIENT
schema-registry:
image: 'confluentinc/cp-schema-registry:7.0.1'
container_name: 'schema-registry'
networks:
- kafka-network
depends_on:
- kafka
ports:
- "8081:8081"
environment:
CUB_CLASSPATH: '/usr/share/java/confluent-security/schema-registry/*:/usr/share/java/schema-registry/*:/usr/share/java/cp-base-new/*'
SCHEMA_REGISTRY_HOST_NAME: 'schema-registry'
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka:9092
SCHEMA_REGISTRY_LISTNERS: http://0.0.0.0:8081
SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL: INFO
SCHEMA_REGISTRY_KAFKASTORE_TOPIC: _schemas
SCHEMA_REGISTRY_DEBUG: 'true'
# https://docs.confluent.io/platform/current/schema-registry/installation/config.html
# All configuration parameters
kafka-connect:
image: 'confluentinc/cp-kafka-connect-base:7.0.1'
container_name: kafka-connect
networks:
- kafka-network
depends_on:
- schema-registry
ports:
- "8083:8083"
- "8888:8888"
volumes:
- ./target:/usr/share/java/kafka-connect-sample
environment:
CONNECT_BOOTSTRAP_SERVERS: 'kafka:9092'
CONNECT_REST_PORT: 8083
KAFKA_DEBUG: 'true'
JAVA_DEBUG_PORT: '*:8888'
CONNECT_REST_ADVERTISED_HOST_NAME: 'connect'
CONNECT_GROUP_ID: 'kafka-connect-group'
CONNECT_CONFIG_STORAGE_TOPIC: _connect-configs
CONNECT_OFFSET_STORAGE_TOPIC: _connect-offset
CONNECT_STATUS_STORAGE_TOPIC: _connect-status
CONNECT_KEY_CONVERTER_SCHEMAS_ENABLE: 'false'
CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE: 'false'
CONNECT_KEY_CONVERTER: 'org.apache.kafka.connect.storage.StringConverter'
CONNECT_VALUE_CONVERTER: 'org.apache.kafka.connect.storage.StringConverter'
CONNECT_LOG4J_ROOT_LOGLEVEL: 'INFO'
CONNECT_LOG4J_LOGGERS: 'org.apache.kafka.connect.runtime.rest=WARN,org.reflections=ERROR'
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_PLUGIN_PATH: '/usr/share/java'
datagen:
image: 'confluentinc/cp-kafka-connect-base:7.0.1'
container_name: 'datagen'
networks:
- kafka-network
depends_on:
- zookeeper
- kafka
- schema-registry
ports:
- "8084:8083"
restart: always
environment:
CONNECT_BOOTSTRAP_SERVERS: 'kafka:9092'
CONNECT_REST_PORT: 8083
CONNECT_GROUP_ID: 'connect-datagen'
CONNECT_REST_ADVERTISED_HOST_NAME: 'datagen'
CONNECT_CONFIG_STORAGE_TOPIC: '_connect-datagen-config'
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_OFFSET_STORAGE_TOPIC: '_connect-datagen-offsets'
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_STATUS_STORAGE_TOPIC: '_connect-datagen-status'
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_KEY_CONVERTER: 'org.apache.kafka.connect.storage.StringConverter'
CONNECT_VALUE_CONVERTER: 'org.apache.kafka.connect.storage.StringConverter'
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: 'http://schema-registry:8081'
CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components"
CONNECT_LOG4J_LOGGERS: 'org.apache.kafka.connect.runtime.rest=WARN,org.reflections=ERROR'