X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fdocker%2Fdocker-compose.yaml;h=6675e97c78633ea77867f305f2f30dc3ae5d4ef5;hb=032bd77f7595a34063db4f30fa55c5db5998a76b;hp=f4c014e9369fbfacfb89b7fa8b1fdb5cc880f892;hpb=da8a9c4fe65046e3ae854f5e7caa745528143175;p=osm%2Fdevops.git diff --git a/installers/docker/docker-compose.yaml b/installers/docker/docker-compose.yaml index f4c014e9..6675e97c 100644 --- a/installers/docker/docker-compose.yaml +++ b/installers/docker/docker-compose.yaml @@ -1,10 +1,30 @@ +## +# Copyright 2019 ETSI +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +## + +######################################################################## + version: '3' volumes: + ro: ro_db: mongo_db: mon_db: + pol_db: osm_packages: - keystone_db: + prom_db: networks: netOSM: external: @@ -24,6 +44,11 @@ services: interval: 10s timeout: 10s retries: 3 + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2" kafka: image: wurstmeister/kafka:${KAFKA_TAG:-latest} ports: @@ -34,8 +59,19 @@ services: KAFKA_ADVERTISED_HOST_NAME: kafka KAFKA_ADVERTISED_PORT: 9092 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_LOG_RETENTION_HOURS: 24 volumes: - /var/run/docker.sock:/var/run/docker.sock + healthcheck: + test: zookeeper-shell.sh zookeeper:2181 ls /brokers/ids 2>&1 | grep "Node does not exist" && exit 1 || exit 0 + interval: 20s + timeout: 10s + retries: 5 + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2" #depends_on: # - zookeeper mongo: @@ -46,28 +82,38 @@ services: - netOSM volumes: - mongo_db:/data/db - keystone-db: - image: mariadb:10 + prometheus: + image: prom/prometheus:${PROMETHEUS_TAG:-latest} + hostname: prometheus + ports: + - "${OSM_PROM_PORTS:-9091:9090}" + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro + - prom_db:/prometheus networks: - netOSM - volumes: - - keystone_db:/var/lib/mysql - env_file: - - ./keystone-db.env -# ports: -# - "3306:3306" + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2" keystone: - image: ${DOCKER_USER:-osm}/keystone:${TAG:-latest} + image: ${DOCKER_USER:-opensourcemano}/keystone:${TAG:-6} networks: - netOSM environment: - DB_HOST: keystone-db + DB_HOST: mysql env_file: - ./keystone.env ports: - "${OSM_KEYSTONE_PORTS:-5000:5000}" + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2" nbi: - image: ${DOCKER_USER:-osm}/nbi:${TAG:-latest} + image: ${DOCKER_USER:-opensourcemano}/nbi:${TAG:-6} networks: - netOSM volumes: @@ -79,11 +125,16 @@ services: - ./nbi.env ports: - "${OSM_NBI_PORTS:-9999:9999}" + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2" #depends_on: # - kafka # - mongo lcm: - image: ${DOCKER_USER:-osm}/lcm:${TAG:-latest} + image: ${DOCKER_USER:-opensourcemano}/lcm:${TAG:-6} networks: - netOSM volumes: @@ -94,63 +145,104 @@ services: OSMLCM_MESSAGE_HOST: kafka env_file: - ./lcm.env + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2" #depends_on: # - kafka # - mongo # - ro - ro-db: + mysql: image: mysql:5 networks: - - netOSM + netOSM: + aliases: + - ro-db volumes: - ro_db:/var/lib/mysql env_file: - ./ro-db.env + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2" # ports: # - "3306:3306" ro: - image: ${DOCKER_USER:-osm}/ro:${TAG:-latest} + image: ${DOCKER_USER:-opensourcemano}/ro:${TAG:-6} networks: - netOSM environment: - RO_DB_HOST: ro-db + RO_DB_HOST: mysql env_file: - ./ro.env #depends_on: - # - ro-db + # - mysql + volumes: + - ro:/var/log/osm ports: - "${OSM_RO_PORTS:-9090:9090}" + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2" mon: - image: ${DOCKER_USER:-osm}/mon:${TAG:-latest} + image: ${DOCKER_USER:-opensourcemano}/mon:${TAG:-6} networks: - netOSM volumes: - mon_db:/app/database environment: - BROKER_URI: kafka:9092 - DATABASE: sqlite:///app/database/mon_sqlite.db + OSMMON_MESSAGE_HOST: kafka + OSMMON_MESSAGE_PORT: 9092 env_file: - ./mon.env + ports: + - "${OSM_MON_PORTS:-8662:8662}" #depends_on: # - kafka - ports: - - "8662" + logging: + driver: "json-file" + options: + max-file: 5 + max-size: 10m pol: - image: ${DOCKER_USER:-osm}/pol:${TAG:-latest} + image: ${DOCKER_USER:-opensourcemano}/pol:${TAG:-6} networks: - netOSM + volumes: + - pol_db:/app/database environment: - BROKER_URI: kafka:9092 + OSMPOL_MESSAGE_HOST: kafka + OSMPOL_MESSAGE_PORT: 9092 + env_file: + - ./pol.env #depends_on: # - kafka # - mon + logging: + driver: "json-file" + options: + max-file: 5 + max-size: 10m light-ui: - image: ${DOCKER_USER:-osm}/light-ui:${TAG:-latest} + image: ${DOCKER_USER:-opensourcemano}/light-ui:${TAG:-6} networks: - netOSM environment: OSM_SERVER: nbi #depends_on: # - nbi + env_file: + - ./lwui.env ports: - "${OSM_UI_PORTS:-80:80}" + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "2"