blob: 0877d81e82deb28ba6b332063d69dc79c82816e7 [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:
garciadeblas7b3ed792020-12-21 11:50:36 +0000121 image: ${DOCKER_USER:-opensourcemano}/keystone:${TAG:-9}
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:
garciadeblas7b3ed792020-12-21 11:50:36 +0000136 image: ${DOCKER_USER:-opensourcemano}/nbi:${TAG:-9}
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:
garciadeblas7b3ed792020-12-21 11:50:36 +0000157 image: ${DOCKER_USER:-opensourcemano}/lcm:${TAG:-9}
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
tierno9ec1fe92020-11-25 13:16:51 +0000164 OSMLCM_RO_PORT: "9090"
gcalvino41440fc2018-03-16 13:21:21 +0100165 OSMLCM_DATABASE_HOST: mongo
166 OSMLCM_MESSAGE_HOST: kafka
167 env_file:
168 - ./lcm.env
calvinosanch032bd772019-07-30 07:11:56 +0000169 logging:
170 driver: "json-file"
171 options:
172 max-size: "100m"
173 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100174 #depends_on:
175 # - kafka
176 # - mongo
177 # - ro
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300178 mysql:
garciadeblas41012602018-04-23 17:23:35 +0200179 image: mysql:5
gcalvino41440fc2018-03-16 13:21:21 +0100180 networks:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300181 netOSM:
182 aliases:
183 - ro-db
gcalvino796aafb2018-05-10 13:29:17 +0200184 volumes:
185 - ro_db:/var/lib/mysql
gcalvino41440fc2018-03-16 13:21:21 +0100186 env_file:
187 - ./ro-db.env
calvinosanch032bd772019-07-30 07:11:56 +0000188 logging:
189 driver: "json-file"
190 options:
191 max-size: "100m"
192 max-file: "2"
garciadeblas46e99592018-04-16 13:32:02 +0200193# ports:
194# - "3306:3306"
gcalvino41440fc2018-03-16 13:21:21 +0100195 ro:
garciadeblas7b3ed792020-12-21 11:50:36 +0000196 image: ${DOCKER_USER:-opensourcemano}/ro:${TAG:-9}
gcalvino41440fc2018-03-16 13:21:21 +0100197 networks:
198 - netOSM
199 environment:
Benjamin Diaz6e3a2b62019-02-22 16:04:34 -0300200 RO_DB_HOST: mysql
tierno9ec1fe92020-11-25 13:16:51 +0000201 OSMRO_DATABASE_HOST: mongo
202 OSMRO_MESSAGE_HOST: kafka
gcalvino41440fc2018-03-16 13:21:21 +0100203 env_file:
204 - ./ro.env
205 #depends_on:
tierno9ec1fe92020-11-25 13:16:51 +0000206 # - mongo
207 # - kafka
gcalvino41440fc2018-03-16 13:21:21 +0100208 ports:
Mike Marchettib8420852018-09-13 13:45:06 -0400209 - "${OSM_RO_PORTS:-9090:9090}"
calvinosanch032bd772019-07-30 07:11:56 +0000210 logging:
211 driver: "json-file"
212 options:
213 max-size: "100m"
214 max-file: "2"
gcalvino41440fc2018-03-16 13:21:21 +0100215 mon:
garciadeblas7b3ed792020-12-21 11:50:36 +0000216 image: ${DOCKER_USER:-opensourcemano}/mon:${TAG:-9}
gcalvino41440fc2018-03-16 13:21:21 +0100217 networks:
218 - netOSM
gcalvino796aafb2018-05-10 13:29:17 +0200219 volumes:
220 - mon_db:/app/database
gcalvino41440fc2018-03-16 13:21:21 +0100221 environment:
Benjamin Diaze6f7b452019-02-07 12:09:57 -0300222 OSMMON_MESSAGE_HOST: kafka
223 OSMMON_MESSAGE_PORT: 9092
garciadeblas46e99592018-04-16 13:32:02 +0200224 env_file:
225 - ./mon.env
lavadoafa54c72018-10-05 09:28:28 -0500226 ports:
227 - "${OSM_MON_PORTS:-8662:8662}"
gcalvino41440fc2018-03-16 13:21:21 +0100228 #depends_on:
229 # - kafka
Benjamin Diaz336c7e82019-02-27 14:01:38 -0300230 logging:
231 driver: "json-file"
232 options:
233 max-file: 5
234 max-size: 10m
Mike Marchettida8a9c42018-10-01 15:25:15 -0400235 pol:
garciadeblas7b3ed792020-12-21 11:50:36 +0000236 image: ${DOCKER_USER:-opensourcemano}/pol:${TAG:-9}
garciadeblas14097dc2018-04-04 18:36:32 +0200237 networks:
238 - netOSM
lavado0ef7a6d2018-10-19 16:59:12 -0500239 volumes:
240 - pol_db:/app/database
garciadeblas14097dc2018-04-04 18:36:32 +0200241 environment:
Benjamin Diaze6f7b452019-02-07 12:09:57 -0300242 OSMPOL_MESSAGE_HOST: kafka
243 OSMPOL_MESSAGE_PORT: 9092
Benjamin Diaz04560882019-02-26 17:25:07 -0300244 env_file:
245 - ./pol.env
garciadeblas14097dc2018-04-04 18:36:32 +0200246 #depends_on:
247 # - kafka
248 # - mon
Benjamin Diaz336c7e82019-02-27 14:01:38 -0300249 logging:
250 driver: "json-file"
251 options:
252 max-file: 5
253 max-size: 10m
lavado6ad812e2019-11-29 10:58:58 -0500254 grafana:
255 image: grafana/grafana
256 volumes:
lavado914aa7e2020-05-08 14:07:21 -0500257 - ./grafana/dashboards-osm.yml:/etc/grafana/provisioning/dashboards/dashboards-osm.yml
258 - ./grafana/osm-sample-dashboard.json:/etc/grafana/provisioning/dashboards/osm-sample-dashboard.json
259 - ./grafana/osm-system-dashboard.json:/etc/grafana/provisioning/dashboards/osm-system-dashboard.json
260 - ./grafana/datasource-prometheus.yml:/etc/grafana/provisioning/datasources/datasource-prometheus.yml
lavado6ad812e2019-11-29 10:58:58 -0500261 hostname: grafana
262 ports:
263 - "${OSM_GRAFANA_PORTS:-3000:3000}"
264 networks:
garciadeblasa7b27dc2019-12-04 15:06:55 +0100265 - netOSM
garciadeblas152bcad2019-12-17 11:01:06 +0100266 logging:
267 driver: "json-file"
268 options:
269 max-size: "100m"
270 max-file: "2"
271