Zack Williams | 41513bf | 2018-07-07 20:08:35 -0700 | [diff] [blame] | 1 | # 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 Slobodrian | 36cd85f | 2017-08-24 11:01:11 -0400 | [diff] [blame] | 14 | version: "3" |
| 15 | services: |
| 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. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 29 | image: "${REGISTRY}${REPOSITORY}voltha-fluentd:${TAG:-latest}" |
David K. Bainbridge | 4e920b7 | 2017-10-12 07:49:14 -0700 | [diff] [blame] | 30 | logging: |
| 31 | driver: "json-file" |
| 32 | options: |
| 33 | max-size: "10m" |
| 34 | max-file: 3 |
Sergio Slobodrian | 36cd85f | 2017-08-24 11:01:11 -0400 | [diff] [blame] | 35 | deploy: |
| 36 | replicas: 1 |
| 37 | restart_policy: |
| 38 | condition: on-failure |
Sergio Slobodrian | 8725ea8 | 2017-08-27 23:47:41 -0400 | [diff] [blame] | 39 | environment: |
| 40 | FLUENTD_CONF: fluent-agg.conf |
Sergio Slobodrian | 36cd85f | 2017-08-24 11:01:11 -0400 | [diff] [blame] | 41 | networks: |
| 42 | - voltha-net |
| 43 | ports: |
| 44 | - "24224" |
| 45 | volumes: |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 46 | - ${VOLTHA_LOGS:-/var/log/voltha/logging_volume}:/fluentd/log |
Sergio Slobodrian | 36cd85f | 2017-08-24 11:01:11 -0400 | [diff] [blame] | 47 | |
| 48 | fluentdstby: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 49 | image: "${REGISTRY}${REPOSITORY}voltha-fluentd:${TAG:-latest}" |
David K. Bainbridge | 4e920b7 | 2017-10-12 07:49:14 -0700 | [diff] [blame] | 50 | logging: |
| 51 | driver: "json-file" |
| 52 | options: |
| 53 | max-size: "10m" |
| 54 | max-file: 3 |
Sergio Slobodrian | 36cd85f | 2017-08-24 11:01:11 -0400 | [diff] [blame] | 55 | deploy: |
| 56 | replicas: 1 |
| 57 | restart_policy: |
| 58 | condition: on-failure |
Sergio Slobodrian | 8725ea8 | 2017-08-27 23:47:41 -0400 | [diff] [blame] | 59 | environment: |
| 60 | FLUENTD_CONF: fluent-agg.conf |
Sergio Slobodrian | 36cd85f | 2017-08-24 11:01:11 -0400 | [diff] [blame] | 61 | networks: |
| 62 | - voltha-net |
| 63 | ports: |
| 64 | - "24224" |
| 65 | volumes: |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 66 | - ${VOLTHA_LOGS:-/var/log/voltha/logging_volume}:/fluentd/log |
Sergio Slobodrian | 36cd85f | 2017-08-24 11:01:11 -0400 | [diff] [blame] | 67 | |
| 68 | networks: |
| 69 | voltha-net: |
| 70 | external: |
| 71 | name: voltha_net |
| 72 | |