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 single onos container and freeradius. |
| 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-onos-swarm.yml onos |
| 21 | # |
| 22 | version: "3.2" |
| 23 | services: |
| 24 | freeradius: |
| 25 | deploy: |
| 26 | replicas: 1 |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 27 | image: "${REGISTRY}marcelmaatkamp/freeradius:${RADIUS_TAG:-latest}" |
David K. Bainbridge | 4e920b7 | 2017-10-12 07:49:14 -0700 | [diff] [blame] | 28 | logging: |
| 29 | driver: "json-file" |
| 30 | options: |
| 31 | max-size: "10m" |
| 32 | max-file: 3 |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 33 | ports: |
| 34 | - "1812:1812/udp" |
| 35 | - "1813:1813" |
| 36 | - "18120:18120" |
| 37 | volumes: |
| 38 | - /cord/incubator/voltha/compose/data/clients.conf:/etc/raddb/clients.conf |
| 39 | - /cord/incubator/voltha/compose/data/users:/etc/raddb/users |
| 40 | networks: |
| 41 | - net |
| 42 | - voltha-net |
| 43 | |
David K. Bainbridge | 215e024 | 2017-09-05 23:18:24 -0700 | [diff] [blame] | 44 | onos_cluster_manager: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 45 | image: "${REGISTRY}${REPOSITORY}voltha-unum:${TAG:-latest}" |
David K. Bainbridge | 215e024 | 2017-09-05 23:18:24 -0700 | [diff] [blame] | 46 | deploy: |
| 47 | replicas: 1 |
| 48 | placement: |
| 49 | constraints: |
| 50 | - node.role == manager |
| 51 | environment: |
| 52 | PERIOD: "10s" |
| 53 | LOG_LEVEL: "debug" |
| 54 | ORCHESTRATION: "swarm://" |
| 55 | LABELS: "org.voltha.onos.cluster:true" |
| 56 | NETWORK: "org.voltha.onos.cluster:true" |
| 57 | networks: |
| 58 | - net |
| 59 | - voltha-net |
| 60 | volumes: |
| 61 | - /var/run/docker.sock:/var/run/docker.sock |
| 62 | |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 63 | onos: |
| 64 | deploy: |
David K. Bainbridge | 215e024 | 2017-09-05 23:18:24 -0700 | [diff] [blame] | 65 | replicas: 3 |
| 66 | labels: |
| 67 | org.voltha.onos.cluster: "true" |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 68 | image: "${REGISTRY}${REPOSITORY}voltha-onos:${TAG:-latest}" |
David K. Bainbridge | 4e920b7 | 2017-10-12 07:49:14 -0700 | [diff] [blame] | 69 | logging: |
| 70 | driver: "json-file" |
| 71 | options: |
| 72 | max-size: "10m" |
| 73 | max-file: 3 |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 74 | ports: |
| 75 | - 8101:8101 # ssh |
| 76 | - 6653:6653 # OF |
| 77 | - 8181:8181 # UI |
| 78 | environment: |
David K. Bainbridge | 215e024 | 2017-09-05 23:18:24 -0700 | [diff] [blame] | 79 | EXTRA_JAVA_OPTS: "-Donos.cluster.metadata.uri=http://onos_cluster_manager:5411/config/" |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 80 | networks: |
| 81 | - net |
| 82 | - voltha-net |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 83 | networks: |
| 84 | net: |
| 85 | driver: overlay |
| 86 | driver_opts: |
| 87 | encrypted: "true" |
| 88 | ipam: |
| 89 | driver: default |
| 90 | config: |
| 91 | - subnet: 172.25.0.0/24 |
David K. Bainbridge | 215e024 | 2017-09-05 23:18:24 -0700 | [diff] [blame] | 92 | labels: |
| 93 | org.voltha.onos.cluster: "true" |
Stephane Barbarie | 2940dac | 2017-08-18 14:15:17 -0400 | [diff] [blame] | 94 | |
| 95 | voltha-net: |
| 96 | external: |
| 97 | name: voltha_net |