blob: 7070edd04e1e199dd2a6911f17d3bc9054ba9918 [file] [log] [blame]
calvinosanchfc948112019-07-26 10:46:00 +00001##
2# Copyright 2019 ETSI
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15##
16
17########################################################################
18
gcalvino41440fc2018-03-16 13:21:21 +010019version: '3'
20volumes:
garciadeblase3697a12018-12-10 15:49:27 +010021 ro:
gcalvino796aafb2018-05-10 13:29:17 +020022 ro_db:
23 mongo_db:
24 mon_db:
lavado0ef7a6d2018-10-19 16:59:12 -050025 pol_db:
gcalvino796aafb2018-05-10 13:29:17 +020026 osm_packages:
lavado353c8dd2018-11-08 08:22:07 -050027 prom_db:
gcalvino41440fc2018-03-16 13:21:21 +010028networks:
29 netOSM:
Mike Marchettib8420852018-09-13 13:45:06 -040030 external:
Mike Marchetti6e962632018-09-26 16:26:14 -040031 name: ${OSM_NETWORK:-netosm}
gcalvino41440fc2018-03-16 13:21:21 +010032 #driver: overlay
33 #driver_opts:
34 # com.docker.network.driver.mtu: "1446"
35services:
36 zookeeper:
Mike Marchetti13d76c82018-09-19 15:00:36 -040037 image: wurstmeister/zookeeper:${ZOOKEEPER_TAG:-latest}
garciadeblas46e99592018-04-16 13:32:02 +020038# ports:
39# - "2181:2181"
gcalvino41440fc2018-03-16 13:21:21 +010040 networks:
41 - netOSM
Mike Marchetti851aac22018-09-20 10:18:01 -040042 healthcheck:
43 test: echo stat | nc localhost 2181
44 interval: 10s
45 timeout: 10s
46 retries: 3
calvinosanch032bd772019-07-30 07:11:56 +000047 logging:
48 driver: "json-file"
49 options:
50 max-size: "100m"
51 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +010052 kafka:
Mike Marchetti13d76c82018-09-19 15:00:36 -040053 image: wurstmeister/kafka:${KAFKA_TAG:-latest}
gcalvino41440fc2018-03-16 13:21:21 +010054 ports:
Mike Marchettib8420852018-09-13 13:45:06 -040055 - "9092"
gcalvino41440fc2018-03-16 13:21:21 +010056 networks:
57 - netOSM
58 environment:
59 KAFKA_ADVERTISED_HOST_NAME: kafka
60 KAFKA_ADVERTISED_PORT: 9092
61 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
Benjamin Diazc5778622019-02-27 16:42:34 -030062 KAFKA_LOG_RETENTION_HOURS: 24
gcalvino41440fc2018-03-16 13:21:21 +010063 volumes:
64 - /var/run/docker.sock:/var/run/docker.sock
calvinosanchfc948112019-07-26 10:46:00 +000065 healthcheck:
66 test: zookeeper-shell.sh zookeeper:2181 ls /brokers/ids 2>&1 | grep "Node does not exist" && exit 1 || exit 0
67 interval: 20s
68 timeout: 10s
69 retries: 5
calvinosanch032bd772019-07-30 07:11:56 +000070 logging:
71 driver: "json-file"
72 options:
73 max-size: "100m"
74 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +010075 #depends_on:
76 # - zookeeper
77 mongo:
78 image: mongo
garciadeblas46e99592018-04-16 13:32:02 +020079# ports:
80# - "27017:27017"
gcalvino41440fc2018-03-16 13:21:21 +010081 networks:
82 - netOSM
gcalvino796aafb2018-05-10 13:29:17 +020083 volumes:
84 - mongo_db:/data/db
lavado60216242018-10-10 23:44:28 +020085 prometheus:
86 image: prom/prometheus:${PROMETHEUS_TAG:-latest}
87 hostname: prometheus
88 ports:
89 - "${OSM_PROM_PORTS:-9091:9090}"
90 volumes:
91 - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
lavado353c8dd2018-11-08 08:22:07 -050092 - prom_db:/prometheus
lavado60216242018-10-10 23:44:28 +020093 networks:
94 - netOSM
calvinosanch032bd772019-07-30 07:11:56 +000095 logging:
96 driver: "json-file"
97 options:
98 max-size: "100m"
99 max-file: "2"
lavado6ad812e2019-11-29 10:58:58 -0500100 prometheus-cadvisor:
101 image: google/cadvisor:${PROMETHEUS_CADVISOR_TAG:-latest}
102 ports:
103 - "${OSM_PROM_CADVISOR_PORTS:-8080:8080}"
104 volumes:
105 - /:/rootfs:ro
106 - /var/run:/var/run:ro
107 - /sys:/sys:ro
108 - /var/lib/docker/:/var/lib/docker:ro
109 - /dev/disk/:/dev/disk:ro
110 networks:
111 - netOSM
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100112 keystone:
Gerardo Garcíaffb84c52019-06-26 16:22:12 +0200113 image: ${DOCKER_USER:-opensourcemano}/keystone:${TAG:-6}
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100114 networks:
115 - netOSM
116 environment:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300117 DB_HOST: mysql
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100118 env_file:
119 - ./keystone.env
120 ports:
121 - "${OSM_KEYSTONE_PORTS:-5000:5000}"
calvinosanch032bd772019-07-30 07:11:56 +0000122 logging:
123 driver: "json-file"
124 options:
125 max-size: "100m"
126 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100127 nbi:
Gerardo Garcíaffb84c52019-06-26 16:22:12 +0200128 image: ${DOCKER_USER:-opensourcemano}/nbi:${TAG:-6}
gcalvino41440fc2018-03-16 13:21:21 +0100129 networks:
130 - netOSM
131 volumes:
gcalvino796aafb2018-05-10 13:29:17 +0200132 - osm_packages:/app/storage
gcalvino41440fc2018-03-16 13:21:21 +0100133 environment:
134 OSMNBI_DATABASE_HOST: mongo
135 OSMNBI_MESSAGE_HOST: kafka
Eduardo Sousae193dfd2018-09-21 11:37:49 +0100136 env_file:
137 - ./nbi.env
gcalvino41440fc2018-03-16 13:21:21 +0100138 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400139 - "${OSM_NBI_PORTS:-9999:9999}"
calvinosanch032bd772019-07-30 07:11:56 +0000140 logging:
141 driver: "json-file"
142 options:
143 max-size: "100m"
144 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100145 #depends_on:
146 # - kafka
147 # - mongo
148 lcm:
Gerardo Garcíaffb84c52019-06-26 16:22:12 +0200149 image: ${DOCKER_USER:-opensourcemano}/lcm:${TAG:-6}
gcalvino41440fc2018-03-16 13:21:21 +0100150 networks:
151 - netOSM
garciadeblase1b66ed2018-05-14 11:34:26 +0200152 volumes:
153 - osm_packages:/app/storage
gcalvino41440fc2018-03-16 13:21:21 +0100154 environment:
155 OSMLCM_RO_HOST: ro
156 OSMLCM_DATABASE_HOST: mongo
157 OSMLCM_MESSAGE_HOST: kafka
158 env_file:
159 - ./lcm.env
calvinosanch032bd772019-07-30 07:11:56 +0000160 logging:
161 driver: "json-file"
162 options:
163 max-size: "100m"
164 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100165 #depends_on:
166 # - kafka
167 # - mongo
168 # - ro
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300169 mysql:
garciadeblas41012602018-04-23 17:23:35 +0200170 image: mysql:5
gcalvino41440fc2018-03-16 13:21:21 +0100171 networks:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300172 netOSM:
173 aliases:
174 - ro-db
gcalvino796aafb2018-05-10 13:29:17 +0200175 volumes:
176 - ro_db:/var/lib/mysql
gcalvino41440fc2018-03-16 13:21:21 +0100177 env_file:
178 - ./ro-db.env
calvinosanch032bd772019-07-30 07:11:56 +0000179 logging:
180 driver: "json-file"
181 options:
182 max-size: "100m"
183 max-file: "2"
garciadeblas46e99592018-04-16 13:32:02 +0200184# ports:
185# - "3306:3306"
gcalvino41440fc2018-03-16 13:21:21 +0100186 ro:
Gerardo Garcíaffb84c52019-06-26 16:22:12 +0200187 image: ${DOCKER_USER:-opensourcemano}/ro:${TAG:-6}
gcalvino41440fc2018-03-16 13:21:21 +0100188 networks:
189 - netOSM
190 environment:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300191 RO_DB_HOST: mysql
gcalvino41440fc2018-03-16 13:21:21 +0100192 env_file:
193 - ./ro.env
194 #depends_on:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300195 # - mysql
garciadeblase3697a12018-12-10 15:49:27 +0100196 volumes:
197 - ro:/var/log/osm
gcalvino41440fc2018-03-16 13:21:21 +0100198 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400199 - "${OSM_RO_PORTS:-9090:9090}"
calvinosanch032bd772019-07-30 07:11:56 +0000200 logging:
201 driver: "json-file"
202 options:
203 max-size: "100m"
204 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100205 mon:
Gerardo Garcíaffb84c52019-06-26 16:22:12 +0200206 image: ${DOCKER_USER:-opensourcemano}/mon:${TAG:-6}
gcalvino41440fc2018-03-16 13:21:21 +0100207 networks:
208 - netOSM
gcalvino796aafb2018-05-10 13:29:17 +0200209 volumes:
210 - mon_db:/app/database
gcalvino41440fc2018-03-16 13:21:21 +0100211 environment:
Benjamin Diaze6f7b452019-02-07 12:09:57 -0300212 OSMMON_MESSAGE_HOST: kafka
213 OSMMON_MESSAGE_PORT: 9092
garciadeblas46e99592018-04-16 13:32:02 +0200214 env_file:
215 - ./mon.env
lavadoafa54c72018-10-05 09:28:28 -0500216 ports:
217 - "${OSM_MON_PORTS:-8662:8662}"
gcalvino41440fc2018-03-16 13:21:21 +0100218 #depends_on:
219 # - kafka
Benjamin Diaz336c7e82019-02-27 14:01:38 -0300220 logging:
221 driver: "json-file"
222 options:
223 max-file: 5
224 max-size: 10m
Mike Marchettida8a9c42018-10-01 15:25:15 -0400225 pol:
Gerardo Garcíaffb84c52019-06-26 16:22:12 +0200226 image: ${DOCKER_USER:-opensourcemano}/pol:${TAG:-6}
garciadeblas14097dc2018-04-04 18:36:32 +0200227 networks:
228 - netOSM
lavado0ef7a6d2018-10-19 16:59:12 -0500229 volumes:
230 - pol_db:/app/database
garciadeblas14097dc2018-04-04 18:36:32 +0200231 environment:
Benjamin Diaze6f7b452019-02-07 12:09:57 -0300232 OSMPOL_MESSAGE_HOST: kafka
233 OSMPOL_MESSAGE_PORT: 9092
Benjamin Diaz04560882019-02-26 17:25:07 -0300234 env_file:
235 - ./pol.env
garciadeblas14097dc2018-04-04 18:36:32 +0200236 #depends_on:
237 # - kafka
238 # - mon
Benjamin Diaz336c7e82019-02-27 14:01:38 -0300239 logging:
240 driver: "json-file"
241 options:
242 max-file: 5
243 max-size: 10m
garciadeblas14097dc2018-04-04 18:36:32 +0200244 light-ui:
Gerardo Garcíaffb84c52019-06-26 16:22:12 +0200245 image: ${DOCKER_USER:-opensourcemano}/light-ui:${TAG:-6}
garciadeblas14097dc2018-04-04 18:36:32 +0200246 networks:
247 - netOSM
248 environment:
249 OSM_SERVER: nbi
250 #depends_on:
251 # - nbi
Benjamin Diaz4088a9b2019-05-21 15:11:49 -0300252 env_file:
253 - ./lwui.env
garciadeblas14097dc2018-04-04 18:36:32 +0200254 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400255 - "${OSM_UI_PORTS:-80:80}"
calvinosanch032bd772019-07-30 07:11:56 +0000256 logging:
257 driver: "json-file"
258 options:
259 max-size: "100m"
260 max-file: "2"
lavado6ad812e2019-11-29 10:58:58 -0500261 grafana:
262 image: grafana/grafana
263 volumes:
264 - ./files/dashboards-osm.yml:/etc/grafana/provisioning/dashboards/dashboards-osm.yml
265 - ./files/osm-sample-dashboard.json:/etc/grafana/provisioning/dashboards/osm-sample-dashboard.json
266 - ./files/osm-system-dashboard.json:/etc/grafana/provisioning/dashboards/osm-system-dashboard.json
267 - ./files/datasource-prometheus.yml:/etc/grafana/provisioning/datasources/datasource-prometheus.yml
268 hostname: grafana
269 ports:
270 - "${OSM_GRAFANA_PORTS:-3000:3000}"
271 networks:
272 - netOSM