blob: f3585739f2bf0d647d74c551badf14b4780abdbc [file] [log] [blame]
David K. Bainbridge12463052018-01-19 09:26:09 -08001# Copyright 2017 the original author or authors.
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.
14version: "3"
15services:
16
17 # The Fluentd container is part of the data collection
18 # infrastructure.
19 fluentd:
20 image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
21 logging:
22 driver: "json-file"
23 options:
24 max-size: "10m"
25 max-file: 3
26 deploy:
27 mode: replicated
28 replicas: {{ SWARM_MANAGER_COUNT | default(2) }}
29 restart_policy:
30 condition: any
31 environment:
32 SERVICE_24224_NAME: "fluentd-intake"
33 FLUENTD_CONF: fluent.conf
34 WAIT_FOR: "fluentdactv:24224 fluentdstby:24224"
35 WAIT_FOR_TIMEOUT: 0
36 networks:
37 - voltha-net
38 ports:
39 - "24224"
40
41 # Free RADIUS can be used to test VOLTHA's authentication
42 # sequence, i.e., EAPOL from a device behind an OLT to
43 # RADIUS authentication on the back end systems. By default
44 # no instances of Free RADIUS are deployed.
45 freeradius:
46 deploy:
47 replicas: 0
48 image: "${REGISTRY}marcelmaatkamp/freeradius:${RADIUS_TAG:-latest}"
49 logging:
50 driver: "json-file"
51 options:
52 max-size: "10m"
53 max-file: 3
54 ports:
55 - "1812:1812/udp"
56 - "1813:1813"
57 - "18120:18120"
58
59 # CONFIG: When deploying a Free RADIUS instance client and user
60 # information will need to be configured for the service to
61 # operate correctly.
62 #
63 #volumes:
64 # - ${RADIUS_ROOT}/data/clients.conf:/etc/raddb/clients.conf
65 # - ${RADIUS_ROOT}/data/users:/etc/raddb/users
66 networks:
67 - voltha-net
68
69 # The cluster manager container calculates and servers ONOS cluster
70 # meta data via HTTP so that ONOS instances can form an HA cluster.
71 # The cluster manager must run on a manager node so that it can
72 # retrieve service information from manager nodes
73 onos_cluster_manager:
74 image: "${REGISTRY}voltha/unum:${TAG:-latest}"
75 deploy:
76 replicas: 1
77 placement:
78 constraints:
79 - node.role == manager
80 environment:
81 PERIOD: "10s"
82 LOG_LEVEL: "debug"
83 ORCHESTRATION: "swarm://"
84 LABELS: "org.voltha.onos.cluster:true"
85 NETWORK: "org.voltha.onos.cluster:true"
86 ports:
87 - 5411:5411
88 networks:
89 - voltha-net
90 volumes:
91 - /var/run/docker.sock:/var/run/docker.sock
92
93 # ONOS is the SDN controller for the solution and handles AAA,
94 # IGMP proxy, and L2 DHCP requests as well as manages flows
95 # down to the virtual devices (MCAST + OLT flows).
96 # Currently there is a single instance of ONOS as some of the
97 # applications running under ONOS do not support HA.
98 onos:
99 deploy:
100 replicas: 1
101 labels:
102 org.voltha.onos.cluster: "true"
103 image: "${REGISTRY}voltha/onos:${TAG:-latest}"
104 logging:
105 driver: "json-file"
106 options:
107 max-size: "10m"
108 max-file: 3
109 ports:
110 - 8101:8101 # ssh
111 - 6653:6653 # OF
112 - 8181:8181 # UI
113 environment:
114 EXTRA_JAVA_OPTS: "-Donos.cluster.metadata.uri=http://onos_cluster_manager:5411/config/"
115 networks:
116 - voltha-net
117
118 # The VCORE container is the core capabilities of VOLTHA including
119 # interacting with device adapters
120 vcore:
121 image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
122 logging:
123 driver: "json-file"
124 options:
125 max-size: "10m"
126 max-file: 3
127 deploy:
128 replicas: {{ SWARM_MANAGER_COUNT | default(3) }}
129 entrypoint:
130 - voltha/voltha/main.py
131 - -v
132 - --consul=consul:8500
133 - --fluentd=fluentd:24224
134 - --kafka=kafka
135 - --rest-port=8880
136 - --grpc-port=50556
137 - --instance-id-is-container-name
138 - --backend=consul
139 - --inter-core-subnet=172.29.19.0/24
140 - --pon-subnet=172.29.19.0/24
141 networks:
142 - voltha-net
143 ports:
144 - "8880:8880"
145 - "18880:18880"
146 - "50556:50556"
147 volumes:
148 - /var/run/docker.sock:/tmp/docker.sock
149
150 # The OpenFlow Agent support the OpenFlow protocol communication
151 # between ONOS and VOLTHA.
152 ofagent:
153 image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
154 logging:
155 driver: "json-file"
156 options:
157 max-size: "10m"
158 max-file: 3
159 deploy:
160 replicas: 1
161 entrypoint:
162 - /ofagent/ofagent/main.py
163 - -v
164 - --consul=consul:8500
165 - --fluentd=fluentd:24224
166 - --controller=onos:6653
167 - --grpc-endpoint=vcore:50556
168 - --instance-id-is-container-name
169 volumes:
170 - /var/run/docker.sock:/tmp/docker.sock
171 networks:
172 - voltha-net
173
174 # The VOLTHA container supports load balancing of request to
175 # the VOLTHA components as well as surfaces a REST API and maps
176 # the requests to GPRC
177 voltha:
178 image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
179 logging:
180 driver: "json-file"
181 options:
182 max-size: "10m"
183 max-file: 3
184 deploy:
185 replicas: 1
186 entrypoint:
187 - /usr/local/bin/envoyd
188 - -envoy-cfg-template
189 - "/envoy/voltha-grpc-proxy.template.json"
190 - -envoy-config
191 - "/envoy/voltha-grpc-proxy.json"
192 networks:
193 - voltha-net
194 ports:
195 - "50555:50555"
196 - "8882:8882"
197 - "8443:8443"
198 - "8001:8001"
199 volumes:
200 - /var/run/docker.sock:/tmp/docker.sock
201
202 # The CLI container provides an CLI to the VOLTHA capabilitiy
203 # that can be accessed via SSH.
204 cli:
205 image: "${REGISTRY}voltha/cli:${TAG:-latest}"
206 logging:
207 driver: "json-file"
208 options:
209 max-size: "10m"
210 max-file: 3
211 deploy:
212 replicas: {{ SWARM_MANAGER_COUNT | default(2) }}
213 entrypoint:
214 - /cli/cli/setup.sh
215 - -C consul:8500
216 - -g voltha:50555
217 - -s voltha:18880
218 - -G
219 networks:
220 - voltha-net
221 ports:
222 - "5022:22"
223
224 # The Netconf container provides an NETCONF API to be used
225 # with VOLTHA and maps that to GRPC requests
226 netconf:
227 image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
228 logging:
229 driver: "json-file"
230 options:
231 max-size: "10m"
232 max-file: 3
233 deploy:
234 mode: global
235 environment:
236 SERVICE_1830_NAME: "netconf-server"
237 entrypoint:
238 - /netconf/netconf/main.py
239 - -v
240 - --consul=consul:8500
241 - --fluentd=fluentd:24224
242 - --grpc-endpoint=voltha:50555
243 - --instance-id-is-container-name
244 networks:
245 - voltha-net
246 ports:
247 - "830:1830"
248 volumes:
249 - /var/run/docker.sock:/tmp/docker.sock
250
251 # The tools container provides a bash command shell to which
252 # an operator can SSH that has the same network connectivity
253 # as other VOLTHA containers and is thus a convenient
254 # troubleshooting tool
255 tools:
256 image: "${REGISTRY}voltha/tools:${TAG:-latest}"
257 logging:
258 driver: "json-file"
259 options:
260 max-size: "10m"
261 max-file: 3
262 deploy:
263 mode: replicated
264 replicas: 1
265 restart_policy:
266 condition: on-failure
267 ports:
268 - "4022:22"
269 networks:
270 - voltha-net
271 - kafka-net
272
273networks:
274 onos:
275 driver: overlay
276 driver_opts:
277 encrypted: "true"
278 ipam:
279 driver: default
280 config:
281 - subnet: 172.25.0.0/24
282 labels:
283 org.voltha.onos.cluster: "true"
284
285 voltha-net:
286 external:
287 name: voltha_net
288
289 kafka-net:
290 external:
291 name: kafka_net