1
+ ---
2
+ version : " 3.2"
3
+
4
+ services :
5
+ prometheus :
6
+ image : prom/prometheus
7
+ container_name : prometheus
8
+ ports :
9
+ - 9090:9090
10
+ - 8080:8080
11
+ volumes :
12
+ - ./prometheus/:/etc/prometheus/
13
+ zookeeper :
14
+ image : confluentinc/cp-zookeeper:7.0.1
15
+ hostname : zookeeper
16
+ container_name : zookeeper
17
+ ports :
18
+ - " 2181:2181"
19
+ environment :
20
+ ZOOKEEPER_CLIENT_PORT : 2181
21
+ ZOOKEEPER_TICK_TIME : 2000
22
+
23
+ broker :
24
+ image : confluentinc/cp-kafka:7.0.1
25
+ hostname : broker
26
+ container_name : broker
27
+ depends_on :
28
+ - zookeeper
29
+ ports :
30
+ - " 29092:29092"
31
+ environment :
32
+ KAFKA_BROKER_ID : 1
33
+ KAFKA_ZOOKEEPER_CONNECT : " zookeeper:2181"
34
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
35
+ KAFKA_ADVERTISED_LISTENERS : PLAINTEXT://broker:9092,PLAINTEXT_HOST://localhost:29092
36
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR : 1
37
+ KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS : 0
38
+ KAFKA_TRANSACTION_STATE_LOG_MIN_ISR : 1
39
+ KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR : 1
40
+
41
+ ksqldb-server :
42
+ image : confluentinc/ksqldb-server:0.25.1
43
+ hostname : ksqldb-server
44
+ container_name : ksqldb-server
45
+ volumes :
46
+ - ./jmx_exporter:/usr/share/jmx_exporter/
47
+ - type : bind
48
+ source : ./
49
+ target : /home/appuser
50
+ depends_on :
51
+ - broker
52
+ ports :
53
+ - " 8088:8088"
54
+ - " 1090:1099"
55
+ environment :
56
+ KSQL_LISTENERS : http://0.0.0.0:8088
57
+ KSQL_BOOTSTRAP_SERVERS : broker:9092
58
+ KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE : " true"
59
+ KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE : " true"
60
+ # KSQL_KSQL_OPTS: "-Djava.security.auth.login.config=/jaas_config.file"
61
+ # KSQL_AUTHENTICATION_METHOD: BASIC
62
+ # KSQL_AUTHENTICATION_REALM: KsqlServer-Props
63
+ # KSQL_AUTHENTICATION_ROLES: admin,developer,user
64
+ # KSQL_SSL_CLIENT_AUTHENTICATION: NONE
65
+ # KSQL_SSL_TRUSTSTORE_LOCATION: ksqldb_server_config/kafka.server.truststore.jks
66
+ # KSQL_SSL_TRUSTSTORE_PASSWORD: ${SSL_PASSWORD}
67
+ # KSQL_SSL_KEYSTORE_LOCATION: ksqldb_server_config/kafka.server.keystore.jks
68
+ # KSQL_SSL_KEYSTORE_PASSWORD: ${SSL_PASSWORD}
69
+ # KSQL_SSL_KEY_PASSWORD: ${SSL_PASSWORD}
70
+ KSQL_KSQL_HEARTBEAT_ENABLE : " true"
71
+ KSQL_KSQL_LAG_REPORTING_ENABLE : " true"
72
+ KSQL_KSQL_PULL_METRICS_ENABLED : " true"
73
+ KSQL_JMX_OPTS : >
74
+ -Dcom.sun.management.jmxremote.authenticate=false
75
+ -Dcom.sun.management.jmxremote.ssl=false
76
+ -Djava.util.logging.config.file=logging.properties
77
+ -javaagent:/usr/share/jmx_exporter/jmx_prometheus_javaagent-0.17.0.jar=7010:/usr/share/jmx_exporter/ksqldb.yml
78
+ ksqldb-cli :
79
+ image : confluentinc/ksqldb-cli:0.25.1
80
+ container_name : ksqldb-cli
81
+ depends_on :
82
+ - broker
83
+ - ksqldb-server
84
+ entrypoint : /bin/sh
85
+ tty : true
86
+ prometheus :
87
+ image : prom/prometheus
88
+ container_name : prometheus
89
+ ports :
90
+ - 9090:9090
91
+ - 8080:8080
92
+ volumes :
93
+ - ./prometheus/:/etc/prometheus/
94
+
95
+ # Possible JMX OPT alternative?
96
+ # -Djava.rmi.server.hostname=localhost
97
+ # -Dcom.sun.management.jmxremote
98
+ # -Dcom.sun.management.jmxremote.port=1099
99
+ # -Dcom.sun.management.jmxremote.authenticate=false
100
+ # -Dcom.sun.management.jmxremote.ssl=false
101
+ # -Dcom.sun.management.jmxremote.rmi.port=1099docke
0 commit comments