-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkafka-compose.yml
99 lines (96 loc) · 3.17 KB
/
kafka-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
version: '3'
# name: openmldb_sbin # 3.8 supports
services:
dev-node:
profiles: [all]
container_name: dev-node
image: 4pdosc/openmldb:0.8.5
restart: always
tty: true
hostname: dev-node
volumes:
# test resources mount, don't comment it
- type: bind
source: ./test/
target: /work/test/
- type: bind
source: ${EXTERNAL_MOUNT:-/dev/null}
target: /work/ext/
command:
- /bin/bash
- -c
- |
echo "source /work/test/funcs.sh" >> ~/.bashrc
tee -a ~/.bashrc << END
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export LANGUAGE=C.UTF-8
END
# /work/openmldb/sbin/deploy-all.sh && /work/openmldb/sbin/start-all.sh
# echo "SET GLOBAL deploy_stats = 'on';" | /work/openmldb/sbin/openmldb-cli.sh
tail -f /dev/null
# kafka cluster ref https://github.com/bitnami/containers/blob/7db812f196808feb47cba5f1f17377c6629c4281/bitnami/kafka/docker-compose-cluster.yml
kafka-zookeeper:
profiles: [kafka, all]
image: docker.io/bitnami/zookeeper:3.9
container_name: kafka-zookeeper
# ports:
# - "2181:2181"
volumes:
- "kafka_zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
# For error `Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes`
security_opt:
- seccomp:unconfined
kafka:
profiles: [kafka, all]
image: bitnami/kafka:3.5.1-debian-11-r75
container_name: kafka
restart: always
# ports:
# - '9092:9092'
# kraft mode has a lot of bugs
# config is /opt/bitnami/kafka/config/server.properties
environment:
# Listeners
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://:9092
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=PLAINTEXT
# don't zookeeper in openmldb cluster, it's not good for cleanup
- KAFKA_CFG_ZOOKEEPER_CONNECT=kafka-zookeeper:2181
depends_on:
- kafka-zookeeper
# if you want to persist data
# volumes:
# # As this is a non-root container, the mounted files and directories must have the proper permissions for the UID 1001
# - './kafka_data:/bitnami/kafka'
kafka-connect:
profiles: [kafka, all]
image: ghcr.io/vagetablechicken/kafka-connect
build:
context: kafka
args:
DOWNLOAD_PLUGIN: true
container_name: kafka-connect
restart: always
# ports:
# - '8079:8083'
volumes:
- './kafka/connect-distributed.properties:/opt/bitnami/kafka/config/connect-distributed.properties'
# you can bind your connector dir for test(disable DOWNLOAD_PLUGIN, skip download in image), otherwise use the official connector
# - './kafka/kafka-connect-jdbc:/opt/connectors/kafka-connect-jdbc'
depends_on:
- kafka
command:
- /bin/bash
- -c
- |
/opt/bitnami/kafka/bin/connect-distributed.sh /opt/bitnami/kafka/config/connect-distributed.properties
volumes:
kafka_zookeeper_data:
networks:
default:
name: ${NETWORK_NAME}
driver: ${NETWORK_MODE}