-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
194 lines (185 loc) · 5.79 KB
/
docker-compose.yaml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
---
version: '3.9'
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.3.0
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
healthcheck:
test:
- "CMD-SHELL"
- "cub zk-ready localhost 2181"
volumes:
- zookeeper-logs:/var/lib/zookeeper/log
- zookeeper-data:/var/lib/zookeeper/data
broker:
depends_on:
zookeeper:
condition: service_healthy
image: confluentinc/cp-kafka:7.3.0
hostname: broker
ports:
- "29092:29092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
healthcheck:
test:
- "CMD-SHELL"
- "cub kafka-ready -b broker:9092 1 10"
interval: 10s
timeout: 10s
retries: 30
volumes:
- broker-data:/var/lib/kafka/data
schema-registry:
image: confluentinc/cp-schema-registry:7.3.0
hostname: schema-registry
depends_on:
broker:
condition: service_healthy
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'broker:9092'
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
healthcheck:
test:
- "CMD-SHELL"
- "cub sr-ready schema-registry 8081 5"
ksqldb:
image: confluentinc/ksqldb-server:0.28.2
depends_on:
broker:
condition: service_healthy
ports:
- "8088:8088"
environment:
KSQL_LISTENERS: http://0.0.0.0:8088
KSQL_BOOTSTRAP_SERVERS: broker:9092
KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: "true"
KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: "true"
KSQL_KSQL_SCHEMA_REGISTRY_URL: http://schema-registry:8081
KSQL_KSQL_LOGGING_PROCESSING_TOPIC_NAME: __default_ksql_processing_log
KSQL_CONNECT_GROUP_ID: "ksql-connect-cluster"
KSQL_CONNECT_BOOTSTRAP_SERVERS: broker:9092
KSQL_CONNECT_KEY_CONVERTER: "org.apache.kafka.connect.storage.StringConverter"
KSQL_CONNECT_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
KSQL_CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE: "false"
KSQL_CONNECT_CONFIG_STORAGE_TOPIC: "__ksql-connect-configs"
KSQL_CONNECT_OFFSET_STORAGE_TOPIC: "__ksql-connect-offsets"
KSQL_CONNECT_STATUS_STORAGE_TOPIC: "__ksql-connect-statuses"
KSQL_CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
KSQL_CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
KSQL_CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
KSQL_CONNECT_PLUGIN_PATH: "/home/appuser/plugins"
AWS_ACCESS_KEY: "admin"
AWS_SECRET_KEY: "password"
healthcheck:
test:
- "CMD-SHELL"
- "curl -sf http://localhost:8088/healthcheck"
command:
- bash
- -c
- |
echo "Installing Connector"
mkdir /home/appuser/plugins
#
/home/appuser/bin/confluent-hub install --no-prompt --component-dir /home/appuser/plugins --worker-configs /etc/ksqldb/connect.properties confluentinc/kafka-connect-s3:10.3.0
#
echo "Launching KSQL"
/usr/bin/docker/run
kafka-ui:
depends_on:
broker:
condition: service_healthy
schema-registry:
condition: service_healthy
# connect:
# condition: service_healthy
image: provectuslabs/kafka-ui:master
ports:
- "8080:8080"
restart: always
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: broker:9092
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181
KAFKA_CLUSTERS_0_KSQLDBSERVER: http://ksqldb:8088
KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schema-registry:8081
KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: ksqldb
KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: http://ksqldb:8083
healthcheck:
test:
- "CMD-SHELL"
- "wget http://localhost:8080/actuator/health -q -O - > /dev/null 2>&1"
minio:
entrypoint: sh
command: -c 'mkdir -p /data/sink-bucket && /opt/bin/minio server /data --console-address ":9001"'
environment:
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD=password
image: quay.io/minio/minio:latest
ports:
- '9000:9000'
- '9001:9001'
volumes:
- minio-data:/data
healthcheck:
test:
- "CMD-SHELL"
- "curl -f http://localhost:9000/minio/health/live"
interval: 30s
timeout: 20s
retries: 3
influxdb:
image: influxdb:latest
volumes:
- influxdb-data:/var/lib/influxdb2
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: myusername
DOCKER_INFLUXDB_INIT_PASSWORD: passwordpasswordpassword
DOCKER_INFLUXDB_INIT_ORG: myorg
DOCKER_INFLUXDB_INIT_BUCKET: mybucket
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: mytoken
ports:
- 8086:8086
healthcheck:
test:
- "CMD-SHELL"
- "curl -f http://localhost:8086/ping"
interval: 5s
timeout: 10s
retries: 5
telegraf:
image: telegraf:latest
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
environment:
- DOCKER_INFLUXDB_INIT_ORG=myorg
- DOCKER_INFLUXDB_INIT_BUCKET=mybucket
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mytoken
healthcheck:
test:
- "CMD-SHELL"
- "curl -f http://localhost:8080/"
restart: unless-stopped
volumes:
zookeeper-data:
zookeeper-logs:
broker-data:
minio-data:
influxdb-data: