blob: 956031c779c69f14fa77ed67ae3732b92c985f51 [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.
Stephane Barbarie2940dac2017-08-18 14:15:17 -040014#
15# This Docker stackfile deploys a ofagent container on all swarm instances.
16#
17# The stackfile assumes that overlay network 'voltha_net' has already been
18# created. To deploy the stack, issue the command:
19#
20# docker stack deploy -c docker-compose-ofagent-swarm.yml ofagent
21#
22version: "3.2"
23services:
24 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080025 image: "${REGISTRY}${REPOSITORY}voltha-ofagent:${TAG:-latest}"
David K. Bainbridge4e920b72017-10-12 07:49:14 -070026 logging:
Kyle Farnsworth9938d292017-11-02 15:21:21 -050027 driver: "json-file"
David K. Bainbridge4e920b72017-10-12 07:49:14 -070028 options:
29 max-size: "10m"
30 max-file: 3
Stephane Barbarie2940dac2017-08-18 14:15:17 -040031 deploy:
32 replicas: 3
33 entrypoint:
34 - /ofagent/ofagent/main.py
35 - -v
Jonathan Hart87314cd2018-02-12 17:15:35 -080036 - --consul=vconsul:8500
Stephane Barbarie2940dac2017-08-18 14:15:17 -040037 - --controller=onos:6653
38 - --grpc-endpoint=vcore:50556
39 - --instance-id-is-container-name
Stephane Barbarie2940dac2017-08-18 14:15:17 -040040 volumes:
41 - /var/run/docker.sock:/tmp/docker.sock
42 networks:
43 - voltha-net
44
45networks:
46 voltha-net:
47 external:
48 name: voltha_net