-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
148 lines (136 loc) · 3.83 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
version: '3.3'
services:
virtual-device-simulator:
image: mmahmood/virtual-device-simulator:latest
container_name: virtual-device-simulator
ports:
- 8890:8081
environment:
VIRTUALDEVICES_MQTT_BROKER_URL: tcp://mosquitto:1883
depends_on:
- mosquitto
networks:
- iot-hub
mosquitto:
image: eclipse-mosquitto
container_name: mosquitto
hostname: mosquitto
ports:
- 1883:1883
- 9001:9001
networks:
- iot-hub
kafka-zookeeper:
image: wurstmeister/zookeeper
container_name: kafka-zookeeper
hostname: kafka-zookeeper
ports:
- 2181:2181
networks:
- iot-hub
kafka:
image: wurstmeister/kafka
container_name: kafka
hostname: kafka
command: [start-kafka.sh]
ports:
- 9092:9092
- 29092:29092
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost # docker-machine ip
KAFKA_LISTENERS: "INTERNAL://:9092,EXTERNAL://:29092"
KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka:9092,EXTERNAL://localhost:29092"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_ZOOKEEPER_CONNECT: kafka-zookeeper:2181
KAFKA_ADVERTISED_PORT: 29092
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- kafka-zookeeper
networks:
- iot-hub
kafdrop:
image: obsidiandynamics/kafdrop
container_name: kafdrop
ports:
- 9000:9000
environment:
KAFKA_BROKERCONNECT: "kafka:9092"
JVM_OPTS: "-Xms16M -Xmx48M -Xss180K -XX:-TieredCompilation -XX:+UseStringDeduplication -noverify"
depends_on:
- kafka
networks:
- iot-hub
simple-kafka-mqtt-connector:
image: arthurgrigo/simple-kafka-mqtt-connector:0.0.1-SNAPSHOT
container_name: simple-kafka-mqtt-connector
hostname: simple-kafka-mqtt-connector
restart: always
environment:
KAFKA_HOST: kafka
KAFKA_PORT: 9092
KAFKA_CLIENT_ID: simple-kafka-mqtt-connector-1
MQTT_HOST: mosquitto
MQTT_PORT: 1883
MQTT_CLIENT_ID: simple-kafka-mqtt-connector-1
MQTT_QOS: 2
TOPIC_MAPPING: TemperatureSensor>>>TemperatureSensor;HeartRateMonitor>>>HeartRateMonitor;FuelGaugeSensor>>>FuelGaugeSensor;
networks:
- iot-hub
influxdb:
image: influxdb:latest
container_name: influxdb
ports:
- 8086:8086 # HTTP API
- 8090:8090
environment:
INFLUXDB_DB: SensorData
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: admin
INFLUXDB_USER: admin
INFLUXDB_USER_PASSWORD: admin
volumes:
- influxdb-storage:/var/lib/influxdb
networks:
- iot-hub
chronograf:
image: chronograf:latest
container_name: chronograf
ports:
- 8888:8888
environment:
INFLUXDB_URL: http://influxdb:8086
links:
- influxdb:influxdb
volumes:
- chronograf-storage:/var/lib/chronograf
networks:
- iot-hub
kafka-connect-influxdb-sink:
image: mmahmood/kafka-connect-influxdb-sink:latest
container_name: kafka-connect-influxdb-sink
restart: always
ports:
- 8889:8080
environment:
KAFKA_CONNECTOR_BOOTSTRAP_SERVERS: kafka:9092
KAFKA_CONNECTOR_CONSUMER_GROUPID: iot
KAFKA_CONNECTOR_CONSUMER_AUTOOFFSETRESET: earliest
KAFKA_CONNECTOR_TOPICS: TemperatureSensor,HeartRateMonitor,FuelGaugeSensor
KAFKA_CONNECTOR_INFLUXDB_URL: http://influxdb:8086
KAFKA_CONNECTOR_INFLUXDB_USERNAME: admin
KAFKA_CONNECTOR_INFLUXDB_PASSWORD: admin
KAFKA_CONNECTOR_INFLUXDB_DATABASE: SensorData
KAFKA_CONNECTOR_INFLUXDB_RETENTIONPOLICY: autogen
KAFKA_CONNECTOR_INFLUXDB_READTIMEOUT: 5000
depends_on:
- kafka
- influxdb
networks:
- iot-hub
networks:
iot-hub:
volumes:
influxdb-storage:
chronograf-storage: