blob: 44fbea662cd8178fa3933c16b60ccee1bc47ffaf [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:
lavado71906482020-04-13 17:02:00 -050091 - ./prometheus/:/etc/prometheus/
lavado353c8dd2018-11-08 08:22:07 -050092 - prom_db:/prometheus
lavado71906482020-04-13 17:02:00 -050093 command:
94 - '--config.file=/etc/prometheus/prometheus.yml'
95 - '--web.enable-lifecycle'
lavado60216242018-10-10 23:44:28 +020096 networks:
97 - netOSM
calvinosanch032bd772019-07-30 07:11:56 +000098 logging:
99 driver: "json-file"
100 options:
101 max-size: "100m"
102 max-file: "2"
lavado6ad812e2019-11-29 10:58:58 -0500103 prometheus-cadvisor:
104 image: google/cadvisor:${PROMETHEUS_CADVISOR_TAG:-latest}
105 ports:
106 - "${OSM_PROM_CADVISOR_PORTS:-8080:8080}"
107 volumes:
108 - /:/rootfs:ro
109 - /var/run:/var/run:ro
110 - /sys:/sys:ro
111 - /var/lib/docker/:/var/lib/docker:ro
112 - /dev/disk/:/dev/disk:ro
113 networks:
lavado1e4a88c2019-12-03 16:19:59 -0500114 - netOSM
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100115 keystone:
garciadeblas44c02192019-12-09 01:36:57 +0100116 image: ${DOCKER_USER:-opensourcemano}/keystone:${TAG:-7}
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100117 networks:
118 - netOSM
119 environment:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300120 DB_HOST: mysql
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100121 env_file:
122 - ./keystone.env
123 ports:
124 - "${OSM_KEYSTONE_PORTS:-5000:5000}"
calvinosanch032bd772019-07-30 07:11:56 +0000125 logging:
126 driver: "json-file"
127 options:
128 max-size: "100m"
129 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100130 nbi:
garciadeblas44c02192019-12-09 01:36:57 +0100131 image: ${DOCKER_USER:-opensourcemano}/nbi:${TAG:-7}
gcalvino41440fc2018-03-16 13:21:21 +0100132 networks:
133 - netOSM
134 volumes:
gcalvino796aafb2018-05-10 13:29:17 +0200135 - osm_packages:/app/storage
gcalvino41440fc2018-03-16 13:21:21 +0100136 environment:
137 OSMNBI_DATABASE_HOST: mongo
138 OSMNBI_MESSAGE_HOST: kafka
Eduardo Sousae193dfd2018-09-21 11:37:49 +0100139 env_file:
140 - ./nbi.env
gcalvino41440fc2018-03-16 13:21:21 +0100141 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400142 - "${OSM_NBI_PORTS:-9999:9999}"
calvinosanch032bd772019-07-30 07:11:56 +0000143 logging:
144 driver: "json-file"
145 options:
146 max-size: "100m"
147 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100148 #depends_on:
149 # - kafka
150 # - mongo
151 lcm:
garciadeblas44c02192019-12-09 01:36:57 +0100152 image: ${DOCKER_USER:-opensourcemano}/lcm:${TAG:-7}
gcalvino41440fc2018-03-16 13:21:21 +0100153 networks:
154 - netOSM
garciadeblase1b66ed2018-05-14 11:34:26 +0200155 volumes:
156 - osm_packages:/app/storage
gcalvino41440fc2018-03-16 13:21:21 +0100157 environment:
158 OSMLCM_RO_HOST: ro
159 OSMLCM_DATABASE_HOST: mongo
160 OSMLCM_MESSAGE_HOST: kafka
161 env_file:
162 - ./lcm.env
calvinosanch032bd772019-07-30 07:11:56 +0000163 logging:
164 driver: "json-file"
165 options:
166 max-size: "100m"
167 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100168 #depends_on:
169 # - kafka
170 # - mongo
171 # - ro
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300172 mysql:
garciadeblas41012602018-04-23 17:23:35 +0200173 image: mysql:5
gcalvino41440fc2018-03-16 13:21:21 +0100174 networks:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300175 netOSM:
176 aliases:
177 - ro-db
gcalvino796aafb2018-05-10 13:29:17 +0200178 volumes:
179 - ro_db:/var/lib/mysql
gcalvino41440fc2018-03-16 13:21:21 +0100180 env_file:
181 - ./ro-db.env
calvinosanch032bd772019-07-30 07:11:56 +0000182 logging:
183 driver: "json-file"
184 options:
185 max-size: "100m"
186 max-file: "2"
garciadeblas46e99592018-04-16 13:32:02 +0200187# ports:
188# - "3306:3306"
gcalvino41440fc2018-03-16 13:21:21 +0100189 ro:
garciadeblas44c02192019-12-09 01:36:57 +0100190 image: ${DOCKER_USER:-opensourcemano}/ro:${TAG:-7}
gcalvino41440fc2018-03-16 13:21:21 +0100191 networks:
192 - netOSM
193 environment:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300194 RO_DB_HOST: mysql
gcalvino41440fc2018-03-16 13:21:21 +0100195 env_file:
196 - ./ro.env
197 #depends_on:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300198 # - mysql
garciadeblase3697a12018-12-10 15:49:27 +0100199 volumes:
200 - ro:/var/log/osm
gcalvino41440fc2018-03-16 13:21:21 +0100201 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400202 - "${OSM_RO_PORTS:-9090:9090}"
calvinosanch032bd772019-07-30 07:11:56 +0000203 logging:
204 driver: "json-file"
205 options:
206 max-size: "100m"
207 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100208 mon:
garciadeblas44c02192019-12-09 01:36:57 +0100209 image: ${DOCKER_USER:-opensourcemano}/mon:${TAG:-7}
gcalvino41440fc2018-03-16 13:21:21 +0100210 networks:
211 - netOSM
gcalvino796aafb2018-05-10 13:29:17 +0200212 volumes:
213 - mon_db:/app/database
gcalvino41440fc2018-03-16 13:21:21 +0100214 environment:
Benjamin Diaze6f7b452019-02-07 12:09:57 -0300215 OSMMON_MESSAGE_HOST: kafka
216 OSMMON_MESSAGE_PORT: 9092
garciadeblas46e99592018-04-16 13:32:02 +0200217 env_file:
218 - ./mon.env
lavadoafa54c72018-10-05 09:28:28 -0500219 ports:
220 - "${OSM_MON_PORTS:-8662:8662}"
gcalvino41440fc2018-03-16 13:21:21 +0100221 #depends_on:
222 # - kafka
Benjamin Diaz336c7e82019-02-27 14:01:38 -0300223 logging:
224 driver: "json-file"
225 options:
226 max-file: 5
227 max-size: 10m
Mike Marchettida8a9c42018-10-01 15:25:15 -0400228 pol:
garciadeblas44c02192019-12-09 01:36:57 +0100229 image: ${DOCKER_USER:-opensourcemano}/pol:${TAG:-7}
garciadeblas14097dc2018-04-04 18:36:32 +0200230 networks:
231 - netOSM
lavado0ef7a6d2018-10-19 16:59:12 -0500232 volumes:
233 - pol_db:/app/database
garciadeblas14097dc2018-04-04 18:36:32 +0200234 environment:
Benjamin Diaze6f7b452019-02-07 12:09:57 -0300235 OSMPOL_MESSAGE_HOST: kafka
236 OSMPOL_MESSAGE_PORT: 9092
Benjamin Diaz04560882019-02-26 17:25:07 -0300237 env_file:
238 - ./pol.env
garciadeblas14097dc2018-04-04 18:36:32 +0200239 #depends_on:
240 # - kafka
241 # - mon
Benjamin Diaz336c7e82019-02-27 14:01:38 -0300242 logging:
243 driver: "json-file"
244 options:
245 max-file: 5
246 max-size: 10m
garciadeblas14097dc2018-04-04 18:36:32 +0200247 light-ui:
garciadeblas44c02192019-12-09 01:36:57 +0100248 image: ${DOCKER_USER:-opensourcemano}/light-ui:${TAG:-7}
garciadeblas14097dc2018-04-04 18:36:32 +0200249 networks:
250 - netOSM
251 environment:
252 OSM_SERVER: nbi
253 #depends_on:
254 # - nbi
Benjamin Diaz4088a9b2019-05-21 15:11:49 -0300255 env_file:
256 - ./lwui.env
garciadeblas14097dc2018-04-04 18:36:32 +0200257 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400258 - "${OSM_UI_PORTS:-80:80}"
calvinosanch032bd772019-07-30 07:11:56 +0000259 logging:
260 driver: "json-file"
261 options:
262 max-size: "100m"
263 max-file: "2"
lavado6ad812e2019-11-29 10:58:58 -0500264 grafana:
265 image: grafana/grafana
266 volumes:
lavado914aa7e2020-05-08 14:07:21 -0500267 - ./grafana/dashboards-osm.yml:/etc/grafana/provisioning/dashboards/dashboards-osm.yml
268 - ./grafana/osm-sample-dashboard.json:/etc/grafana/provisioning/dashboards/osm-sample-dashboard.json
269 - ./grafana/osm-system-dashboard.json:/etc/grafana/provisioning/dashboards/osm-system-dashboard.json
270 - ./grafana/datasource-prometheus.yml:/etc/grafana/provisioning/datasources/datasource-prometheus.yml
lavado6ad812e2019-11-29 10:58:58 -0500271 hostname: grafana
272 ports:
273 - "${OSM_GRAFANA_PORTS:-3000:3000}"
274 networks:
garciadeblasa7b27dc2019-12-04 15:06:55 +0100275 - netOSM
garciadeblas152bcad2019-12-17 11:01:06 +0100276 logging:
277 driver: "json-file"
278 options:
279 max-size: "100m"
280 max-file: "2"
281