forked from FIWARE/tutorials.Big-Data-Spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
131 lines (126 loc) · 4.57 KB
/
docker-compose.yml
File metadata and controls
131 lines (126 loc) · 4.57 KB
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
version: "3.1"
services:
# Orion is the context broker
orion:
image: fiware/orion:${ORION_VERSION}
hostname: orion
container_name: fiware-orion
depends_on:
- mongo-db
networks:
- default
expose:
- "${ORION_PORT}"
ports:
- "${ORION_PORT}:${ORION_PORT}"
command: -dbhost mongo-db -logLevel DEBUG
healthcheck:
test: curl --fail -s http://localhost:${ORION_PORT}/version || exit 1
# IoT-Agent is configured for the UltraLight Protocol
iot-agent:
image: fiware/iotagent-ul:${ULTRALIGHT_VERSION}
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongo-db
networks:
- default
ports:
- "${IOTA_NORTH_PORT}:${IOTA_NORTH_PORT}"
- "${IOTA_SOUTH_PORT}:${IOTA_SOUTH_PORT}"
environment:
- IOTA_CB_HOST=orion # name of the context broker to update context
- IOTA_CB_PORT=${ORION_PORT} # port the context broker listens on to update context
- IOTA_NORTH_PORT=${IOTA_NORTH_PORT}
- IOTA_REGISTRY_TYPE=mongodb #Whether to hold IoT device info in memory or in a database
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
- IOTA_MONGO_HOST=mongo-db # The host name of MongoDB
- IOTA_MONGO_PORT=${MONGO_DB_PORT} # The port mongoDB is listening on
- IOTA_MONGO_DB=iotagentul # The name of the database used in mongoDB
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
healthcheck:
test: curl --fail -s http://iot-agent:${IOTA_NORTH_PORT}/iot/about || exit 1
# Tutorial acts as a series of dummy IoT Sensors over HTTP
tutorial:
image: fiware/tutorials.context-provider
hostname: tutorial
container_name: fiware-tutorial
networks:
default:
aliases:
- iot-sensors
- context-provider
expose:
- "${TUTORIAL_APP_PORT}"
- "${TUTORIAL_DUMMY_DEVICE_PORT}"
ports:
- "${TUTORIAL_APP_PORT}:${TUTORIAL_APP_PORT}"
- "${TUTORIAL_DUMMY_DEVICE_PORT}:${TUTORIAL_DUMMY_DEVICE_PORT}"
environment:
- "MONGO_URL=mongodb://mongo-db:27017"
- "DEBUG=tutorial:*"
- "WEB_APP_PORT=${TUTORIAL_APP_PORT}" # Port used by the content provider proxy and web-app for viewing data
- "IOTA_HTTP_HOST=iot-agent"
- "IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}"
- "DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT}" # Port used by the dummy IOT devices to receive commands
- "DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
- "DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov"
- "CONTEXT_BROKER=http://orion:${ORION_PORT}/v2" # URL of the context broker to update context
- "NGSI_LD_PREFIX="
- "OPENWEATHERMAP_KEY_ID=<ADD_YOUR_KEY_ID>"
- "TWITTER_CONSUMER_KEY=<ADD_YOUR_CONSUMER_KEY>"
- "TWITTER_CONSUMER_SECRET=<ADD_YOUR_CONSUMER_SECRET>"
healthcheck:
test: curl --fail -s http://tutorial:${TUTORIAL_APP_PORT}/version || exit 1
spark-master:
image: bde2020/spark-master:${SPARK_VERSION}
container_name: spark-master
expose:
- "${SPARK_WEB_APP_PORT}"
- "${SPARK_SERVICE_PORT}"
ports:
- "${SPARK_WEB_APP_PORT}:${SPARK_WEB_APP_PORT}"
- "${SPARK_MASTER_PORT}:${SPARK_MASTER_PORT}"
- "${SPARK_SERVICE_PORT}:${SPARK_SERVICE_PORT}"
environment:
- INIT_DAEMON_STEP=setup_spark
- "constraint:node==spark-master"
volumes:
- ./log4j.properties:/spark/conf/log4j.properties
spark-worker-1:
image: bde2020/spark-worker:${SPARK_VERSION}
container_name: spark-worker-1
depends_on:
- spark-master
ports:
- "${SPARK_WORKER_1_PORT}:${SPARK_WORKER_1_PORT}"
environment:
- "SPARK_MASTER=spark://spark-master:${SPARK_MASTER_PORT}"
- "constraint:node==spark-master"
volumes:
- ${PWD}/cosmos-examples/:/home/cosmos-examples/
- ${PWD}/log4j.properties:/spark/conf/log4j.properties
# Database
mongo-db:
image: mongo:${MONGO_DB_VERSION}
hostname: mongo-db
container_name: db-mongo
expose:
- "${MONGO_DB_PORT}"
ports:
- "${MONGO_DB_PORT}:${MONGO_DB_PORT}"
networks:
- default
volumes:
- mongo-db:/data
networks:
default:
ipam:
config:
- subnet: 172.18.100.0/24
volumes:
mongo-db: ~