blob: d0d10eb798d633387a3030ab2864328aef050efb [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 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#
22version: "3.2"
23services:
24 freeradius:
25 deploy:
26 replicas: 1
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080027 image: "${REGISTRY}marcelmaatkamp/freeradius:${RADIUS_TAG:-latest}"
David K. Bainbridge4e920b72017-10-12 07:49:14 -070028 logging:
29 driver: "json-file"
30 options:
31 max-size: "10m"
32 max-file: 3
Stephane Barbarie2940dac2017-08-18 14:15:17 -040033 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. Bainbridge215e0242017-09-05 23:18:24 -070044 onos_cluster_manager:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080045 image: "${REGISTRY}${REPOSITORY}voltha-unum:${TAG:-latest}"
David K. Bainbridge215e0242017-09-05 23:18:24 -070046 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 Barbarie2940dac2017-08-18 14:15:17 -040063 onos:
64 deploy:
David K. Bainbridge215e0242017-09-05 23:18:24 -070065 replicas: 3
66 labels:
67 org.voltha.onos.cluster: "true"
David K. Bainbridge737b74f2018-01-22 12:57:52 -080068 image: "${REGISTRY}${REPOSITORY}voltha-onos:${TAG:-latest}"
David K. Bainbridge4e920b72017-10-12 07:49:14 -070069 logging:
70 driver: "json-file"
71 options:
72 max-size: "10m"
73 max-file: 3
Stephane Barbarie2940dac2017-08-18 14:15:17 -040074 ports:
75 - 8101:8101 # ssh
76 - 6653:6653 # OF
77 - 8181:8181 # UI
78 environment:
David K. Bainbridge215e0242017-09-05 23:18:24 -070079 EXTRA_JAVA_OPTS: "-Donos.cluster.metadata.uri=http://onos_cluster_manager:5411/config/"
Stephane Barbarie2940dac2017-08-18 14:15:17 -040080 networks:
81 - net
82 - voltha-net
Stephane Barbarie2940dac2017-08-18 14:15:17 -040083networks:
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. Bainbridge215e0242017-09-05 23:18:24 -070092 labels:
93 org.voltha.onos.cluster: "true"
Stephane Barbarie2940dac2017-08-18 14:15:17 -040094
95 voltha-net:
96 external:
97 name: voltha_net