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. |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 14 | # |
| 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 | # |
| 22 | version: "3.2" |
| 23 | services: |
| 24 | ofagent: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 25 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent:${TAG:-latest}" |
David K. Bainbridge | 4e920b7 | 2017-10-12 07:49:14 -0700 | [diff] [blame] | 26 | logging: |
Kyle Farnsworth | 9938d29 | 2017-11-02 15:21:21 -0500 | [diff] [blame] | 27 | driver: "json-file" |
David K. Bainbridge | 4e920b7 | 2017-10-12 07:49:14 -0700 | [diff] [blame] | 28 | options: |
| 29 | max-size: "10m" |
| 30 | max-file: 3 |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 31 | deploy: |
| 32 | replicas: 3 |
| 33 | entrypoint: |
| 34 | - /ofagent/ofagent/main.py |
| 35 | - -v |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 36 | - --consul=vconsul:8500 |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 37 | - --controller=onos:6653 |
| 38 | - --grpc-endpoint=vcore:50556 |
| 39 | - --instance-id-is-container-name |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 40 | volumes: |
| 41 | - /var/run/docker.sock:/tmp/docker.sock |
| 42 | networks: |
| 43 | - voltha-net |
| 44 | |
| 45 | networks: |
| 46 | voltha-net: |
| 47 | external: |
| 48 | name: voltha_net |