-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
194 lines (178 loc) · 5.8 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
version: '3'
services:
# Cluster compose from: https://github.com/calvinlfer/compose-cassandra-cluster
##########################################################################################################
# 3 node cluster
# If you see exit code 137 (OOM killer) then ensure Docker has access to more resources
cassandra-seed-node:
container_name: cassandra-seed-node
image: cassandra
volumes:
- ./cassandra.yaml:/tmp/custom_cassandra/cassandra.yaml
- ./kafkacdchandler/src/main/resources:/resources
- ./kafkacdchandler/target:/code
environment:
- "JVM_EXTRA_OPTS=-Dcassandra.config=/tmp/custom_cassandra/cassandra.yaml"
entrypoint: /bin/bash
command: -c "(docker-entrypoint.sh cassandra -f &) && echo 'Waiting for Cassandra' && sleep 150 && java -Dcassandra.config=file:///tmp/custom_cassandra/cassandra.yaml -jar /code/kafka-cdc-handler-1.0-SNAPSHOT.jar"
networks:
default:
ipv4_address: 172.18.0.3
ports:
- "9042:9042" # Native transport, CQL
- "7199:7199" # JMX
- "9160:9160" # Thrift clients
# - "7000:7000" # Intra-node communication
# - "7001:7001" # TLS intra-node communication
# restart: always
# cassandra-node-1:
# container_name: cassandra-node-1
# image: cassandra
# command: /bin/bash -c "echo 'Waiting for seed node' && sleep 30 && /docker-entrypoint.sh cassandra -f"
# environment:
# - "CASSANDRA_SEEDS=cassandra-seed-node"
# depends_on:
# - "cassandra-seed"
# restart: always
# you cannot have multiple nodes join the cluster at the same time when
# cassandra.consistent.rangemovement is true so we further delay it to give it time to stabilize
# cassandra-node-2:
# container_name: cassandra-node-2
# image: cassandra
# command: /bin/bash -c "echo 'Waiting for seed node' && sleep 80 && /docker-entrypoint.sh cassandra -f"
# environment:
# - "CASSANDRA_SEEDS=cassandra-seed-node"
# depends_on:
# - "cassandra-seed"
# restart: always
##########################################################################################################
# If you need an extra cassandra node to run cqlsh to the cassandra-seed-node
# cassandra-cql:
# container_name: cassandra-cql
# image: cassandra
# depends_on:
# - "cassandra-seed"
##########################################################################################################
# For the storm-cassandra-pulling
##########################################################################################################
zookeeper:
image: zookeeper
container_name: zookeeper
restart: always
nimbus:
image: storm
container_name: nimbus
command: bash -c "(storm logviewer -c logviewer.port='8002' &) && (storm nimbus -c logviewer.port='8002')"
depends_on:
- zookeeper
links:
- zookeeper
restart: always
ports:
- 8002:8002
volumes:
- ./stormcassandrapulling/target:/code
- ./stormcassandrapulling/src/main/resources:/resources
supervisor:
image: storm
container_name: supervisor
command: bash -c "(storm logviewer -c logviewer.port='8003' &) && (storm supervisor -c logviewer.port='8003')"
depends_on:
- nimbus
- zookeeper
links:
- nimbus
- zookeeper
restart: always
ports:
- 8003:8003
volumes:
- ./stormcassandrapulling/src/main/resources:/resources
stormui:
image: storm
container_name: stormmui
command: storm ui
depends_on:
- nimbus
- zookeeper
links:
- nimbus
- zookeeper
restart: always
ports:
- 8088:8080
redisdb:
image: redis
container_name: redisdb
depends_on:
- nimbus
- zookeeper
- supervisor
restart: always
redis-browser:
container_name: redis-browser
build:
context: ./docker-context
dockerfile: ./redis-browser.dockerfile
command: --url redis://redisdb:6379 -b 0.0.0.0
depends_on:
- redisdb
restart: always
ports:
- 4567:4567
datasource:
image: openjdk:8u131
container_name: datasource
command: /bin/bash -c "echo 'Waiting for seed node' && sleep 100 && java -jar /data-source-simulator/data-source-simulator-assembly-0.1.jar"
depends_on:
- cassandra-seed-node
- redisdb
restart: always
volumes:
- ./data-source-simulator/target/scala-2.11:/data-source-simulator
- ./data-source-simulator/resources/dss.yml:/resources/dss.yml
##########################################################################################################
# Kafka
##########################################################################################################
kafka:
image: wurstmeister/kafka
container_name: kafka
ports:
- "9092:9092"
environment:
- "KAFKA_CREATE_TOPICS=test:1:1"
- KAFKA_ADVERTISED_HOST_NAME=kafka
- KAFKA_ADVERTISED_PORT=9092
- "KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181"
depends_on:
- zookeeper
kafkarest:
image: confluentinc/cp-kafka-rest
container_name: kafkarest
environment:
- "KAFKA_REST_BOOTSTRAP_SERVERS=kafka:9092"
- "KAFKA_REST_HOST_NAME=kafkarest"
- "KAFKA_REST_LISTENERS=http://kafkarest:8082"
- "KAFKA_REST_ZOOKEEPER_CONNECT=zookeeper:2181"
depends_on:
- kafka
- zookeeper
kafkaui:
image: landoop/kafka-topics-ui
container_name: kafkaui
ports:
- "8005:8000"
environment:
- "KAFKA_REST_PROXY_URL=kafkarest:8082"
- "PROXY=true"
depends_on:
- kafka
- zookeeper
##########################################################################################################
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.18.0.1/16