forked from SpataMassimo/WebMeteo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
197 lines (185 loc) · 4.78 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
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
195
196
197
version: "1.0"
services:
kafka_zookeeper:
build:
context: ./kafka/kafka_image
dockerfile: Dockerfile
container_name: kafka_zookeeper
ports:
- 2181:2181
command: >
bash -c "set -v
mkdir -p /tmp/zookeeper
cd /opt/kafka
zookeeper-server-start.sh config/zookeeper.properties"
networks:
tap:
ipv4_address: 10.0.100.22
kafka_ui:
build:
context: ./kafka/kafka_ui
dockerfile: Dockerfile.UI
depends_on:
- kafka_zookeeper
container_name: kafka_ui
ports:
- 8080:8080
networks:
tap:
ipv4_address: 10.0.100.20
kafka_broker:
build:
context: ./kafka/kafka_image
dockerfile: Dockerfile
container_name: kafka_broker
depends_on:
- kafka_zookeeper
- kafka_ui
ports:
- 9092:9092
command: >
bash -c "set -v
cd /opt/kafka
kafka-server-start.sh config/server.properties"
networks:
tap:
ipv4_address: 10.0.100.23
web_meteo_topics:
build:
context: ./kafka/kafka_image
dockerfile: Dockerfile
container_name: web_meteo_topics
command: >
bash -c "set -v
cd /opt/kafka
kafka-topics.sh --bootstrap-server 10.0.100.23:9092 --list
kafka-topics.sh --create --bootstrap-server 10.0.100.23:9092 --replication-factor 1 --partitions 1 --topic web_image
kafka-topics.sh --create --bootstrap-server 10.0.100.23:9092 --replication-factor 1 --partitions 1 --topic web_data
kafka-topics.sh --create --bootstrap-server 10.0.100.23:9092 --replication-factor 1 --partitions 2 --topic restart_request
kafka-topics.sh --bootstrap-server 10.0.100.23:9092 --list"
depends_on:
- kafka_zookeeper
- kafka_ui
- kafka_broker
networks:
tap:
elastic:
container_name: elastic
build:
context: ./elasticsearch
dockerfile: Dockerfile
volumes:
- ./resources/dataset/datas:/opt/datas
restart: on-failure
ports:
- 9200:9200
- 9300:9300
environment:
- "discovery.type=single-node"
- "xpack.security.enabled=false"
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
healthcheck:
test: ["CMD-SHELL", "curl --silent localhost:9200/_cluster/health"]
interval: 30s
timeout: 30s
retries: 5
networks:
tap:
ipv4_address: 10.0.100.51
load_data:
container_name: load_data
build:
context: ./loader
dockerfile: Dockerfile
#restart: on-failure
volumes:
- ./resources/dataset:/opt/dataset
depends_on:
elastic:
condition: service_healthy
networks:
tap:
spark:
build:
context: ./spark
dockerfile: Dockerfile
container_name: spark
volumes:
- ./spark/code:/opt/spark/code
- ./resources:/opt/spark/demo
ports:
- 4040:4040
command: |
bash -c "spark-submit --packages org.apache.spark:spark-sql-kafka-0-10_2.12:3.1.1,org.elasticsearch:elasticsearch-spark-30_2.12:7.12.1 code/process_datas.py"
depends_on:
- load_data
networks:
tap:
mem_limit: 2g
kibana:
build:
context: ./kibana
dockerfile: Dockerfile
container_name: kibana
ports:
- 5601:5601
depends_on:
- kafka
- load_data
networks:
tap:
ipv4_address: 10.0.100.52
mem_limit: 1g
web_data:
build:
context: ./web_resources/selenium-python
dockerfile: Dockerfile
container_name: web_data
restart: always
depends_on:
- fluentd
volumes:
- ./web_data/bin:/usr/src/app/
command: >
bash -c "set -v
cd /usr/src/app/
python3 WebData.py"
mem_limit: 512m
networks:
tap:
web_image:
build:
context: ./web_resources/selenium-python
dockerfile: Dockerfile
container_name: web_image
restart: always
depends_on:
- fluentd
volumes:
- ./web_image/bin:/usr/src/app/
command: >
bash -c "set -v
cd /usr/src/app/
python3 WebImage.py"
mem_limit: 1g
networks:
tap:
fluentd:
container_name: fluentd
build:
context: ./fluentd
dockerfile: Dockerfile
volumes:
- ./fluentd/conf:/fluentd/etc/
- ./fluentd/datas:/opt/datas
depends_on:
- load_data
restart: always
command: >
bash -c 'fluentd -c /fluentd/etc/python.conf'
mem_limit: 512m
networks:
tap:
networks:
tap:
external: true