-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdocker-compose.yaml
135 lines (135 loc) · 4.13 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
services:
jobmanager:
image: apache/flink:1.20.0-java11
hostname: jobmanager
command: 'jobmanager'
environment:
ENABLE_BUILT_IN_PLUGINS: "flink-s3-fs-hadoop-1.20.0.jar;flink-s3-fs-presto-1.20.0.jar"
FLINK_PROPERTIES: |
rest.bind-port: 8081
jobmanager.rpc.address: jobmanager
jobmanager.memory.jvm-overhead.min: 64mb
jobmanager.memory.jvm-metaspace.size: 192mb
jobmanager.memory.off-heap.size: 64mb
jobmanager.memory.process.size: 500mb
jobmanager.memory.flink.size: 200mb
state.backend.type: hashmap
execution.checkpointing.dir: file:///data/checkpoints
execution.checkpointing.savepoint-dir: file:///data/savepoints
parallelism.default: 1
ports:
- target: 8081
published: 8081
protocol: tcp
mode: ingress
volumes:
- jobmanager-data:/data
- ./config:/var/config
networks:
- flink
healthcheck:
test: [ "CMD-SHELL", "curl --output /dev/null --silent --fail http://localhost:8081"]
start_period: 10s
interval: 5s
timeout: 5s
retries: 5
taskmanager-1:
image: apache/flink:1.20.0-java11
hostname: taskmanager-1
command: 'taskmanager'
environment:
ENABLE_BUILT_IN_PLUGINS: "flink-s3-fs-hadoop-1.20.0.jar;flink-s3-fs-presto-1.20.0.jar"
FLINK_PROPERTIES: |
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 2
taskmanager.memory.jvm-overhead.min: 64mb
taskmanager.memory.jvm-metaspace.size: 192mb
taskmanager.memory.framework.heap.size: 64mb
taskmanager.memory.framework.off-heap.size: 64mb
taskmanager.memory.process.size: 600mb
taskmanager.memory.flink.size: 300mb
taskmanager.memory.network.fraction: 0.1
taskmanager.memory.managed.fraction: 0.1
state.backend.type: hashmap
execution.checkpointing.dir: file:///data/checkpoints
execution.checkpointing.savepoint-dir: file:///data/savepoints
parallelism.default: 1
networks:
- flink
ports:
- target: 9250
published: 9251
protocol: tcp
mode: ingress
volumes:
- taskmanager-1-data:/data
# healthcheck:
# test: [ "CMD-SHELL", "nc -z taskmanager1 9250"]
# start_period: 10s
# interval: 5s
# timeout: 5s
# retries: 5
depends_on:
jobmanager:
condition: service_healthy
taskmanager-2:
image: apache/flink:1.20.0-java11
hostname: taskmanager-2
command: 'taskmanager'
environment:
ENABLE_BUILT_IN_PLUGINS: "flink-s3-fs-hadoop-1.20.0.jar;flink-s3-fs-presto-1.20.0.jar"
FLINK_PROPERTIES: |
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 2
taskmanager.memory.jvm-overhead.min: 64mb
taskmanager.memory.jvm-metaspace.size: 192mb
taskmanager.memory.framework.heap.size: 64mb
taskmanager.memory.framework.off-heap.size: 64mb
taskmanager.memory.process.size: 600mb
taskmanager.memory.flink.size: 300mb
taskmanager.memory.network.fraction: 0.1
taskmanager.memory.managed.fraction: 0.1
state.backend.type: hashmap
execution.checkpointing.dir: file:///data/checkpoints
execution.checkpointing.savepoint-dir: file:///data/savepoints
parallelism.default: 1
networks:
- flink
ports:
- target: 9250
published: 9252
protocol: tcp
mode: ingress
volumes:
- taskmanager-2-data:/data
# healthcheck:
# test: [ "CMD-SHELL", "nc -z taskmanager2 9250"]
# start_period: 10s
# interval: 5s
# timeout: 5s
# retries: 5
depends_on:
jobmanager:
condition: service_healthy
networks:
flink:
driver: bridge
volumes:
jobmanager-data:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
o: "size=100m,uid=9999"
taskmanager-1-data:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
o: "size=100m,uid=9999"
taskmanager-2-data:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
o: "size=100m,uid=9999"