David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 1 | # 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. |
| 14 | version: "3" |
| 15 | services: |
| 16 | |
| 17 | # The Fluentd container is part of the data collection |
| 18 | # infrastructure. |
| 19 | fluentd: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 20 | image: "${REGISTRY}${REPOSITORY}voltha-fluentd:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 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: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 74 | image: "${REGISTRY}${REPOSITORY}voltha-unum:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 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" |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 103 | image: "${REGISTRY}${REPOSITORY}voltha-onos:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 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: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 121 | image: "${REGISTRY}${REPOSITORY}voltha-voltha:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 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 |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 132 | - --consul=vconsul:8500 |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 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: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 153 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 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 |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 164 | - --consul=vconsul:8500 |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 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: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 178 | image: "${REGISTRY}${REPOSITORY}voltha-envoy:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 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" |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 192 | - -consul-svc-nme |
| 193 | - "vconsul" |
| 194 | - -kv-svc-name |
| 195 | - "vconsul" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 196 | networks: |
| 197 | - voltha-net |
| 198 | ports: |
| 199 | - "50555:50555" |
| 200 | - "8882:8882" |
| 201 | - "8443:8443" |
| 202 | - "8001:8001" |
| 203 | volumes: |
| 204 | - /var/run/docker.sock:/tmp/docker.sock |
| 205 | |
| 206 | # The CLI container provides an CLI to the VOLTHA capabilitiy |
| 207 | # that can be accessed via SSH. |
| 208 | cli: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 209 | image: "${REGISTRY}${REPOSITORY}voltha-cli:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 210 | logging: |
| 211 | driver: "json-file" |
| 212 | options: |
| 213 | max-size: "10m" |
| 214 | max-file: 3 |
| 215 | deploy: |
| 216 | replicas: {{ SWARM_MANAGER_COUNT | default(2) }} |
| 217 | entrypoint: |
| 218 | - /cli/cli/setup.sh |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 219 | - -C vconsul:8500 |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 220 | - -g voltha:50555 |
| 221 | - -s voltha:18880 |
| 222 | - -G |
| 223 | networks: |
| 224 | - voltha-net |
| 225 | ports: |
| 226 | - "5022:22" |
| 227 | |
| 228 | # The Netconf container provides an NETCONF API to be used |
| 229 | # with VOLTHA and maps that to GRPC requests |
| 230 | netconf: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 231 | image: "${REGISTRY}${REPOSITORY}voltha-netconf:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 232 | logging: |
| 233 | driver: "json-file" |
| 234 | options: |
| 235 | max-size: "10m" |
| 236 | max-file: 3 |
| 237 | deploy: |
| 238 | mode: global |
| 239 | environment: |
| 240 | SERVICE_1830_NAME: "netconf-server" |
| 241 | entrypoint: |
| 242 | - /netconf/netconf/main.py |
| 243 | - -v |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 244 | - --consul=vconsul:8500 |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 245 | - --fluentd=fluentd:24224 |
| 246 | - --grpc-endpoint=voltha:50555 |
| 247 | - --instance-id-is-container-name |
| 248 | networks: |
| 249 | - voltha-net |
| 250 | ports: |
| 251 | - "830:1830" |
| 252 | volumes: |
| 253 | - /var/run/docker.sock:/tmp/docker.sock |
| 254 | |
| 255 | # The tools container provides a bash command shell to which |
| 256 | # an operator can SSH that has the same network connectivity |
| 257 | # as other VOLTHA containers and is thus a convenient |
| 258 | # troubleshooting tool |
| 259 | tools: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 260 | image: "${REGISTRY}${REPOSITORY}voltha-tools:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 261 | logging: |
| 262 | driver: "json-file" |
| 263 | options: |
| 264 | max-size: "10m" |
| 265 | max-file: 3 |
| 266 | deploy: |
| 267 | mode: replicated |
| 268 | replicas: 1 |
| 269 | restart_policy: |
| 270 | condition: on-failure |
| 271 | ports: |
| 272 | - "4022:22" |
| 273 | networks: |
| 274 | - voltha-net |
| 275 | - kafka-net |
| 276 | |
| 277 | networks: |
| 278 | onos: |
| 279 | driver: overlay |
| 280 | driver_opts: |
| 281 | encrypted: "true" |
| 282 | ipam: |
| 283 | driver: default |
| 284 | config: |
| 285 | - subnet: 172.25.0.0/24 |
| 286 | labels: |
| 287 | org.voltha.onos.cluster: "true" |
| 288 | |
| 289 | voltha-net: |
| 290 | external: |
| 291 | name: voltha_net |
| 292 | |
| 293 | kafka-net: |
| 294 | external: |
| 295 | name: kafka_net |