blob: f35375f0e83bf8013a6b887c886c5d1640997007 [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.
Richard Jankowskid1232062017-07-17 14:10:23 -040014#
Richard Jankowski60a08d72017-07-18 16:12:26 -040015# This stackfile deploys dashd and shovel services to a docker swarm.
Richard Jankowskid1232062017-07-17 14:10:23 -040016#
Richard Jankowski60a08d72017-07-18 16:12:26 -040017# Each of these services depends on:
Jonathan Hart87314cd2018-02-12 17:15:35 -080018# - vconsul (service)
Richard Jankowskid1232062017-07-17 14:10:23 -040019# - 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
28version: "3"
29services:
30 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080031 image: "${REGISTRY}${REPOSITORY}voltha-dashd:${TAG:-latest}"
David K. Bainbridge4e920b72017-10-12 07:49:14 -070032 logging:
33 driver: "json-file"
34 options:
35 max-size: "10m"
36 max-file: 3
Richard Jankowskid1232062017-07-17 14:10:23 -040037 deploy:
38 replicas: 1
39 entrypoint:
40 - /dashd/dashd/main.py
41 - --kafka=kafka
Jonathan Hart87314cd2018-02-12 17:15:35 -080042 - --consul=vconsul:8500
Richard Jankowskid1232062017-07-17 14:10:23 -040043 - --grafana_url=http://admin:admin@grafana:80/api
44 - --topic=voltha.kpis
45 - --docker_host=${DOCKER_HOST_IP}
46 networks:
47 - voltha-net
Richard Jankowski60a08d72017-07-18 16:12:26 -040048
49 shovel:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080050 image: "${REGISTRY}${REPOSITORY}voltha-shovel:${TAG:-latest}"
David K. Bainbridge4e920b72017-10-12 07:49:14 -070051 logging:
52 driver: "json-file"
53 options:
54 max-size: "10m"
55 max-file: 3
Richard Jankowski60a08d72017-07-18 16:12:26 -040056 deploy:
57 replicas: 1
58 entrypoint:
59 - /shovel/shovel/main.py
60 - --kafka=kafka
Jonathan Hart87314cd2018-02-12 17:15:35 -080061 - --consul=vconsul:8500
Richard Jankowski60a08d72017-07-18 16:12:26 -040062 - --topic=voltha.kpis
63 - --host=grafana
64 networks:
65 - voltha-net
66
Richard Jankowskid1232062017-07-17 14:10:23 -040067networks:
68 voltha-net:
69 external:
70 name: voltha_net
71