blob: 950946a19364e12b9106acc653c85805eb678c40 [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:
Felipe Vicensadf35b52020-06-17 18:37:18 +020043 test: echo ruok | nc -w 2 localhost 2181
44 interval: 20s
Mike Marchetti851aac22018-09-20 10:18:01 -040045 timeout: 10s
Felipe Vicensadf35b52020-06-17 18:37:18 +020046 retries: 5
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
garciadeblas9e637372020-06-12 14:29:48 +000063 KAFKA_BROKER_ID: 1
64 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://:9092
65 KAFKA_LISTENERS: PLAINTEXT://:9092
66 KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
67 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
gcalvino41440fc2018-03-16 13:21:21 +010068 volumes:
69 - /var/run/docker.sock:/var/run/docker.sock
calvinosanchfc948112019-07-26 10:46:00 +000070 healthcheck:
Felipe Vicensadf35b52020-06-17 18:37:18 +020071 test: echo ruok | nc -w 2 zookeeper 2181
calvinosanchfc948112019-07-26 10:46:00 +000072 interval: 20s
73 timeout: 10s
74 retries: 5
calvinosanch032bd772019-07-30 07:11:56 +000075 logging:
76 driver: "json-file"
77 options:
78 max-size: "100m"
79 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +010080 #depends_on:
81 # - zookeeper
82 mongo:
83 image: mongo
garciadeblas46e99592018-04-16 13:32:02 +020084# ports:
85# - "27017:27017"
gcalvino41440fc2018-03-16 13:21:21 +010086 networks:
87 - netOSM
gcalvino796aafb2018-05-10 13:29:17 +020088 volumes:
89 - mongo_db:/data/db
lavado60216242018-10-10 23:44:28 +020090 prometheus:
91 image: prom/prometheus:${PROMETHEUS_TAG:-latest}
92 hostname: prometheus
93 ports:
94 - "${OSM_PROM_PORTS:-9091:9090}"
95 volumes:
lavado71906482020-04-13 17:02:00 -050096 - ./prometheus/:/etc/prometheus/
lavado353c8dd2018-11-08 08:22:07 -050097 - prom_db:/prometheus
lavado71906482020-04-13 17:02:00 -050098 command:
99 - '--config.file=/etc/prometheus/prometheus.yml'
100 - '--web.enable-lifecycle'
lavado60216242018-10-10 23:44:28 +0200101 networks:
102 - netOSM
calvinosanch032bd772019-07-30 07:11:56 +0000103 logging:
104 driver: "json-file"
105 options:
106 max-size: "100m"
107 max-file: "2"
lavado6ad812e2019-11-29 10:58:58 -0500108 prometheus-cadvisor:
109 image: google/cadvisor:${PROMETHEUS_CADVISOR_TAG:-latest}
110 ports:
111 - "${OSM_PROM_CADVISOR_PORTS:-8080:8080}"
112 volumes:
113 - /:/rootfs:ro
114 - /var/run:/var/run:ro
115 - /sys:/sys:ro
116 - /var/lib/docker/:/var/lib/docker:ro
117 - /dev/disk/:/dev/disk:ro
118 networks:
lavado1e4a88c2019-12-03 16:19:59 -0500119 - netOSM
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100120 keystone:
garciadeblas44c02192019-12-09 01:36:57 +0100121 image: ${DOCKER_USER:-opensourcemano}/keystone:${TAG:-7}
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100122 networks:
123 - netOSM
124 environment:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300125 DB_HOST: mysql
Eduardo Sousa09a1e972018-09-21 11:06:32 +0100126 env_file:
127 - ./keystone.env
128 ports:
129 - "${OSM_KEYSTONE_PORTS:-5000:5000}"
calvinosanch032bd772019-07-30 07:11:56 +0000130 logging:
131 driver: "json-file"
132 options:
133 max-size: "100m"
134 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100135 nbi:
garciadeblas44c02192019-12-09 01:36:57 +0100136 image: ${DOCKER_USER:-opensourcemano}/nbi:${TAG:-7}
gcalvino41440fc2018-03-16 13:21:21 +0100137 networks:
138 - netOSM
139 volumes:
gcalvino796aafb2018-05-10 13:29:17 +0200140 - osm_packages:/app/storage
gcalvino41440fc2018-03-16 13:21:21 +0100141 environment:
142 OSMNBI_DATABASE_HOST: mongo
143 OSMNBI_MESSAGE_HOST: kafka
Eduardo Sousae193dfd2018-09-21 11:37:49 +0100144 env_file:
145 - ./nbi.env
gcalvino41440fc2018-03-16 13:21:21 +0100146 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400147 - "${OSM_NBI_PORTS:-9999:9999}"
calvinosanch032bd772019-07-30 07:11:56 +0000148 logging:
149 driver: "json-file"
150 options:
151 max-size: "100m"
152 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100153 #depends_on:
154 # - kafka
155 # - mongo
156 lcm:
garciadeblas44c02192019-12-09 01:36:57 +0100157 image: ${DOCKER_USER:-opensourcemano}/lcm:${TAG:-7}
gcalvino41440fc2018-03-16 13:21:21 +0100158 networks:
159 - netOSM
garciadeblase1b66ed2018-05-14 11:34:26 +0200160 volumes:
161 - osm_packages:/app/storage
gcalvino41440fc2018-03-16 13:21:21 +0100162 environment:
163 OSMLCM_RO_HOST: ro
164 OSMLCM_DATABASE_HOST: mongo
165 OSMLCM_MESSAGE_HOST: kafka
166 env_file:
167 - ./lcm.env
calvinosanch032bd772019-07-30 07:11:56 +0000168 logging:
169 driver: "json-file"
170 options:
171 max-size: "100m"
172 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100173 #depends_on:
174 # - kafka
175 # - mongo
176 # - ro
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300177 mysql:
garciadeblas41012602018-04-23 17:23:35 +0200178 image: mysql:5
gcalvino41440fc2018-03-16 13:21:21 +0100179 networks:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300180 netOSM:
181 aliases:
182 - ro-db
gcalvino796aafb2018-05-10 13:29:17 +0200183 volumes:
184 - ro_db:/var/lib/mysql
gcalvino41440fc2018-03-16 13:21:21 +0100185 env_file:
186 - ./ro-db.env
calvinosanch032bd772019-07-30 07:11:56 +0000187 logging:
188 driver: "json-file"
189 options:
190 max-size: "100m"
191 max-file: "2"
garciadeblas46e99592018-04-16 13:32:02 +0200192# ports:
193# - "3306:3306"
gcalvino41440fc2018-03-16 13:21:21 +0100194 ro:
garciadeblas44c02192019-12-09 01:36:57 +0100195 image: ${DOCKER_USER:-opensourcemano}/ro:${TAG:-7}
gcalvino41440fc2018-03-16 13:21:21 +0100196 networks:
197 - netOSM
198 environment:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300199 RO_DB_HOST: mysql
gcalvino41440fc2018-03-16 13:21:21 +0100200 env_file:
201 - ./ro.env
202 #depends_on:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300203 # - mysql
garciadeblase3697a12018-12-10 15:49:27 +0100204 volumes:
205 - ro:/var/log/osm
gcalvino41440fc2018-03-16 13:21:21 +0100206 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400207 - "${OSM_RO_PORTS:-9090:9090}"
calvinosanch032bd772019-07-30 07:11:56 +0000208 logging:
209 driver: "json-file"
210 options:
211 max-size: "100m"
212 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100213 mon:
garciadeblas44c02192019-12-09 01:36:57 +0100214 image: ${DOCKER_USER:-opensourcemano}/mon:${TAG:-7}
gcalvino41440fc2018-03-16 13:21:21 +0100215 networks:
216 - netOSM
gcalvino796aafb2018-05-10 13:29:17 +0200217 volumes:
218 - mon_db:/app/database
gcalvino41440fc2018-03-16 13:21:21 +0100219 environment:
Benjamin Diaze6f7b452019-02-07 12:09:57 -0300220 OSMMON_MESSAGE_HOST: kafka
221 OSMMON_MESSAGE_PORT: 9092
garciadeblas46e99592018-04-16 13:32:02 +0200222 env_file:
223 - ./mon.env
lavadoafa54c72018-10-05 09:28:28 -0500224 ports:
225 - "${OSM_MON_PORTS:-8662:8662}"
gcalvino41440fc2018-03-16 13:21:21 +0100226 #depends_on:
227 # - kafka
Benjamin Diaz336c7e82019-02-27 14:01:38 -0300228 logging:
229 driver: "json-file"
230 options:
231 max-file: 5
232 max-size: 10m
Mike Marchettida8a9c42018-10-01 15:25:15 -0400233 pol:
garciadeblas44c02192019-12-09 01:36:57 +0100234 image: ${DOCKER_USER:-opensourcemano}/pol:${TAG:-7}
garciadeblas14097dc2018-04-04 18:36:32 +0200235 networks:
236 - netOSM
lavado0ef7a6d2018-10-19 16:59:12 -0500237 volumes:
238 - pol_db:/app/database
garciadeblas14097dc2018-04-04 18:36:32 +0200239 environment:
Benjamin Diaze6f7b452019-02-07 12:09:57 -0300240 OSMPOL_MESSAGE_HOST: kafka
241 OSMPOL_MESSAGE_PORT: 9092
Benjamin Diaz04560882019-02-26 17:25:07 -0300242 env_file:
243 - ./pol.env
garciadeblas14097dc2018-04-04 18:36:32 +0200244 #depends_on:
245 # - kafka
246 # - mon
Benjamin Diaz336c7e82019-02-27 14:01:38 -0300247 logging:
248 driver: "json-file"
249 options:
250 max-file: 5
251 max-size: 10m
garciadeblas14097dc2018-04-04 18:36:32 +0200252 light-ui:
garciadeblas44c02192019-12-09 01:36:57 +0100253 image: ${DOCKER_USER:-opensourcemano}/light-ui:${TAG:-7}
garciadeblas14097dc2018-04-04 18:36:32 +0200254 networks:
255 - netOSM
256 environment:
257 OSM_SERVER: nbi
258 #depends_on:
259 # - nbi
Benjamin Diaz4088a9b2019-05-21 15:11:49 -0300260 env_file:
261 - ./lwui.env
garciadeblas14097dc2018-04-04 18:36:32 +0200262 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400263 - "${OSM_UI_PORTS:-80:80}"
calvinosanch032bd772019-07-30 07:11:56 +0000264 logging:
265 driver: "json-file"
266 options:
267 max-size: "100m"
268 max-file: "2"
lavado6ad812e2019-11-29 10:58:58 -0500269 grafana:
270 image: grafana/grafana
271 volumes:
lavado914aa7e2020-05-08 14:07:21 -0500272 - ./grafana/dashboards-osm.yml:/etc/grafana/provisioning/dashboards/dashboards-osm.yml
273 - ./grafana/osm-sample-dashboard.json:/etc/grafana/provisioning/dashboards/osm-sample-dashboard.json
274 - ./grafana/osm-system-dashboard.json:/etc/grafana/provisioning/dashboards/osm-system-dashboard.json
275 - ./grafana/datasource-prometheus.yml:/etc/grafana/provisioning/datasources/datasource-prometheus.yml
lavado6ad812e2019-11-29 10:58:58 -0500276 hostname: grafana
277 ports:
278 - "${OSM_GRAFANA_PORTS:-3000:3000}"
279 networks:
garciadeblasa7b27dc2019-12-04 15:06:55 +0100280 - netOSM
garciadeblas152bcad2019-12-17 11:01:06 +0100281 logging:
282 driver: "json-file"
283 options:
284 max-size: "100m"
285 max-file: "2"
286