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 | - --kafka=kafka |
| 134 | - --rest-port=8880 |
| 135 | - --grpc-port=50556 |
| 136 | - --instance-id-is-container-name |
| 137 | - --backend=consul |
| 138 | - --inter-core-subnet=172.29.19.0/24 |
| 139 | - --pon-subnet=172.29.19.0/24 |
| 140 | networks: |
| 141 | - voltha-net |
| 142 | ports: |
| 143 | - "8880:8880" |
| 144 | - "18880:18880" |
| 145 | - "50556:50556" |
| 146 | volumes: |
| 147 | - /var/run/docker.sock:/tmp/docker.sock |
| 148 | |
| 149 | # The OpenFlow Agent support the OpenFlow protocol communication |
| 150 | # between ONOS and VOLTHA. |
| 151 | ofagent: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 152 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 153 | logging: |
| 154 | driver: "json-file" |
| 155 | options: |
| 156 | max-size: "10m" |
| 157 | max-file: 3 |
| 158 | deploy: |
| 159 | replicas: 1 |
| 160 | entrypoint: |
| 161 | - /ofagent/ofagent/main.py |
| 162 | - -v |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 163 | - --consul=vconsul:8500 |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 164 | - --controller=onos:6653 |
| 165 | - --grpc-endpoint=vcore:50556 |
| 166 | - --instance-id-is-container-name |
| 167 | volumes: |
| 168 | - /var/run/docker.sock:/tmp/docker.sock |
| 169 | networks: |
| 170 | - voltha-net |
| 171 | |
| 172 | # The VOLTHA container supports load balancing of request to |
| 173 | # the VOLTHA components as well as surfaces a REST API and maps |
| 174 | # the requests to GPRC |
| 175 | voltha: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 176 | image: "${REGISTRY}${REPOSITORY}voltha-envoy:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 177 | logging: |
| 178 | driver: "json-file" |
| 179 | options: |
| 180 | max-size: "10m" |
| 181 | max-file: 3 |
| 182 | deploy: |
| 183 | replicas: 1 |
| 184 | entrypoint: |
| 185 | - /usr/local/bin/envoyd |
| 186 | - -envoy-cfg-template |
| 187 | - "/envoy/voltha-grpc-proxy.template.json" |
| 188 | - -envoy-config |
| 189 | - "/envoy/voltha-grpc-proxy.json" |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 190 | - -consul-svc-nme |
| 191 | - "vconsul" |
| 192 | - -kv-svc-name |
| 193 | - "vconsul" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 194 | networks: |
| 195 | - voltha-net |
| 196 | ports: |
| 197 | - "50555:50555" |
| 198 | - "8882:8882" |
| 199 | - "8443:8443" |
| 200 | - "8001:8001" |
| 201 | volumes: |
| 202 | - /var/run/docker.sock:/tmp/docker.sock |
| 203 | |
| 204 | # The CLI container provides an CLI to the VOLTHA capabilitiy |
| 205 | # that can be accessed via SSH. |
| 206 | cli: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 207 | image: "${REGISTRY}${REPOSITORY}voltha-cli:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 208 | logging: |
| 209 | driver: "json-file" |
| 210 | options: |
| 211 | max-size: "10m" |
| 212 | max-file: 3 |
| 213 | deploy: |
| 214 | replicas: {{ SWARM_MANAGER_COUNT | default(2) }} |
| 215 | entrypoint: |
| 216 | - /cli/cli/setup.sh |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 217 | - -C vconsul:8500 |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 218 | - -g voltha:50555 |
| 219 | - -s voltha:18880 |
| 220 | - -G |
| 221 | networks: |
| 222 | - voltha-net |
| 223 | ports: |
| 224 | - "5022:22" |
| 225 | |
| 226 | # The Netconf container provides an NETCONF API to be used |
| 227 | # with VOLTHA and maps that to GRPC requests |
| 228 | netconf: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 229 | image: "${REGISTRY}${REPOSITORY}voltha-netconf:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 230 | logging: |
| 231 | driver: "json-file" |
| 232 | options: |
| 233 | max-size: "10m" |
| 234 | max-file: 3 |
| 235 | deploy: |
| 236 | mode: global |
| 237 | environment: |
| 238 | SERVICE_1830_NAME: "netconf-server" |
| 239 | entrypoint: |
| 240 | - /netconf/netconf/main.py |
| 241 | - -v |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 242 | - --consul=vconsul:8500 |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 243 | - --grpc-endpoint=voltha:50555 |
| 244 | - --instance-id-is-container-name |
| 245 | networks: |
| 246 | - voltha-net |
| 247 | ports: |
| 248 | - "830:1830" |
| 249 | volumes: |
| 250 | - /var/run/docker.sock:/tmp/docker.sock |
| 251 | |
| 252 | # The tools container provides a bash command shell to which |
| 253 | # an operator can SSH that has the same network connectivity |
| 254 | # as other VOLTHA containers and is thus a convenient |
| 255 | # troubleshooting tool |
| 256 | tools: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 257 | image: "${REGISTRY}${REPOSITORY}voltha-tools:${TAG:-latest}" |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 258 | logging: |
| 259 | driver: "json-file" |
| 260 | options: |
| 261 | max-size: "10m" |
| 262 | max-file: 3 |
| 263 | deploy: |
| 264 | mode: replicated |
| 265 | replicas: 1 |
| 266 | restart_policy: |
| 267 | condition: on-failure |
| 268 | ports: |
| 269 | - "4022:22" |
| 270 | networks: |
| 271 | - voltha-net |
| 272 | - kafka-net |
| 273 | |
| 274 | networks: |
| 275 | onos: |
| 276 | driver: overlay |
| 277 | driver_opts: |
| 278 | encrypted: "true" |
| 279 | ipam: |
| 280 | driver: default |
| 281 | config: |
| 282 | - subnet: 172.25.0.0/24 |
| 283 | labels: |
| 284 | org.voltha.onos.cluster: "true" |
| 285 | |
| 286 | voltha-net: |
| 287 | external: |
| 288 | name: voltha_net |
| 289 | |
| 290 | kafka-net: |
| 291 | external: |
| 292 | name: kafka_net |