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. |
Richard Jankowski | d123206 | 2017-07-17 14:10:23 -0400 | [diff] [blame] | 14 | # |
Richard Jankowski | 60a08d7 | 2017-07-18 16:12:26 -0400 | [diff] [blame] | 15 | # This stackfile deploys dashd and shovel services to a docker swarm. |
Richard Jankowski | d123206 | 2017-07-17 14:10:23 -0400 | [diff] [blame] | 16 | # |
Richard Jankowski | 60a08d7 | 2017-07-18 16:12:26 -0400 | [diff] [blame] | 17 | # Each of these services depends on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 18 | # - vconsul (service) |
Richard Jankowski | d123206 | 2017-07-17 14:10:23 -0400 | [diff] [blame] | 19 | # - kafka (service) |
| 20 | # - grafana (service) |
| 21 | # - voltha_net (overlay network) |
| 22 | # |
| 23 | # To deploy the stack, issue the command: |
| 24 | # |
| 25 | # docker stack deploy -c docker-compose-stats-swarm.yml stats |
| 26 | # |
| 27 | |
| 28 | version: "3" |
| 29 | services: |
| 30 | dashd: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 31 | image: "${REGISTRY}${REPOSITORY}voltha-dashd:${TAG:-latest}" |
David K. Bainbridge | 4e920b7 | 2017-10-12 07:49:14 -0700 | [diff] [blame] | 32 | logging: |
| 33 | driver: "json-file" |
| 34 | options: |
| 35 | max-size: "10m" |
| 36 | max-file: 3 |
Richard Jankowski | d123206 | 2017-07-17 14:10:23 -0400 | [diff] [blame] | 37 | deploy: |
| 38 | replicas: 1 |
| 39 | entrypoint: |
| 40 | - /dashd/dashd/main.py |
| 41 | - --kafka=kafka |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 42 | - --consul=vconsul:8500 |
Richard Jankowski | d123206 | 2017-07-17 14:10:23 -0400 | [diff] [blame] | 43 | - --grafana_url=http://admin:admin@grafana:80/api |
| 44 | - --topic=voltha.kpis |
| 45 | - --docker_host=${DOCKER_HOST_IP} |
| 46 | networks: |
| 47 | - voltha-net |
Richard Jankowski | 60a08d7 | 2017-07-18 16:12:26 -0400 | [diff] [blame] | 48 | |
| 49 | shovel: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 50 | image: "${REGISTRY}${REPOSITORY}voltha-shovel:${TAG:-latest}" |
David K. Bainbridge | 4e920b7 | 2017-10-12 07:49:14 -0700 | [diff] [blame] | 51 | logging: |
| 52 | driver: "json-file" |
| 53 | options: |
| 54 | max-size: "10m" |
| 55 | max-file: 3 |
Richard Jankowski | 60a08d7 | 2017-07-18 16:12:26 -0400 | [diff] [blame] | 56 | deploy: |
| 57 | replicas: 1 |
| 58 | entrypoint: |
| 59 | - /shovel/shovel/main.py |
| 60 | - --kafka=kafka |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 61 | - --consul=vconsul:8500 |
Richard Jankowski | 60a08d7 | 2017-07-18 16:12:26 -0400 | [diff] [blame] | 62 | - --topic=voltha.kpis |
| 63 | - --host=grafana |
| 64 | networks: |
| 65 | - voltha-net |
| 66 | |
Richard Jankowski | d123206 | 2017-07-17 14:10:23 -0400 | [diff] [blame] | 67 | networks: |
| 68 | voltha-net: |
| 69 | external: |
| 70 | name: voltha_net |
| 71 | |