blob: 55c3774950aab2466625ba02593470f2cabbe6d7 [file] [log] [blame]
Zack Williams41513bf2018-07-07 20:08:35 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Sergio Slobodrian36cd85f2017-08-24 11:01:11 -040014version: "3"
15services:
16
17#
18# Deploying a Fluentd cluster using this file assumes that overlay network 'voltha_net'
19# has already been created. To deploy the fluentd cluster, issue the command:
20#
21# docker stack deploy -c docker-compose-fluentd-cluster.yml fluentd
22#
23# This spins up two Fluentd Forwarders and one each Fluentd Aggregator-Active, Fluentd Aggregator-Standby.
24# The forwards listens for voltha components logs on port 23224 and sends them towards Fluentd Aggregator.
25# Fluentd Aggregator writes them to their host mounted disk
26#
27
28 fluentdactv:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080029 image: "${REGISTRY}${REPOSITORY}voltha-fluentd:${TAG:-latest}"
David K. Bainbridge4e920b72017-10-12 07:49:14 -070030 logging:
31 driver: "json-file"
32 options:
33 max-size: "10m"
34 max-file: 3
Sergio Slobodrian36cd85f2017-08-24 11:01:11 -040035 deploy:
36 replicas: 1
37 restart_policy:
38 condition: on-failure
Sergio Slobodrian8725ea82017-08-27 23:47:41 -040039 environment:
40 FLUENTD_CONF: fluent-agg.conf
Sergio Slobodrian36cd85f2017-08-24 11:01:11 -040041 networks:
42 - voltha-net
43 ports:
44 - "24224"
45 volumes:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080046 - ${VOLTHA_LOGS:-/var/log/voltha/logging_volume}:/fluentd/log
Sergio Slobodrian36cd85f2017-08-24 11:01:11 -040047
48 fluentdstby:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080049 image: "${REGISTRY}${REPOSITORY}voltha-fluentd:${TAG:-latest}"
David K. Bainbridge4e920b72017-10-12 07:49:14 -070050 logging:
51 driver: "json-file"
52 options:
53 max-size: "10m"
54 max-file: 3
Sergio Slobodrian36cd85f2017-08-24 11:01:11 -040055 deploy:
56 replicas: 1
57 restart_policy:
58 condition: on-failure
Sergio Slobodrian8725ea82017-08-27 23:47:41 -040059 environment:
60 FLUENTD_CONF: fluent-agg.conf
Sergio Slobodrian36cd85f2017-08-24 11:01:11 -040061 networks:
62 - voltha-net
63 ports:
64 - "24224"
65 volumes:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080066 - ${VOLTHA_LOGS:-/var/log/voltha/logging_volume}:/fluentd/log
Sergio Slobodrian36cd85f2017-08-24 11:01:11 -040067
68networks:
69 voltha-net:
70 external:
71 name: voltha_net
72