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. |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 14 | version: '2' |
| 15 | services: |
| 16 | # |
| 17 | # Single-node zookeeper service |
| 18 | # |
| 19 | zookeeper: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 20 | image: "${REGISTRY}wurstmeister/zookeeper:latest" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 21 | ports: |
| 22 | - 2181 |
| 23 | environment: |
| 24 | SERVICE_2181_NAME: "zookeeper" |
| 25 | # |
| 26 | # Single-node kafka service |
| 27 | # |
| 28 | kafka: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 29 | image: "${REGISTRY}wurstmeister/kafka:latest" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 30 | ports: |
| 31 | - 9092 |
| 32 | environment: |
| 33 | KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP} |
| 34 | KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 |
| 35 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' |
| 36 | KAFKA_HEAP_OPTS: "-Xmx256M -Xms128M" |
| 37 | SERVICE_9092_NAME: "kafka" |
| 38 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 39 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 40 | volumes: |
| 41 | - /var/run/docker.sock:/var/run/docker.sock |
| 42 | # |
| 43 | # Single-node consul agent |
| 44 | # |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 45 | vconsul: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 46 | image: "${REGISTRY}consul:0.9.2" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 47 | command: agent -server -bootstrap -client 0.0.0.0 -ui |
| 48 | ports: |
| 49 | - "8300:8300" |
| 50 | - "8400:8400" |
| 51 | - "8500:8500" |
| 52 | - "8600:8600/udp" |
| 53 | environment: |
| 54 | #SERVICE_53_IGNORE: "yes" |
| 55 | SERVICE_8300_IGNORE: "yes" |
| 56 | SERVICE_8400_IGNORE: "yes" |
| 57 | SERVICE_8500_NAME: "consul-rest" |
| 58 | # |
| 59 | # Registrator |
| 60 | # |
| 61 | registrator: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 62 | image: "${REGISTRY}gliderlabs/registrator:latest" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 63 | command: [ |
| 64 | "-ip=${DOCKER_HOST_IP}", |
| 65 | "-retry-attempts", "100", |
| 66 | "-cleanup", |
| 67 | # "-internal", |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 68 | "consul://vconsul:8500" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 69 | ] |
| 70 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 71 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 72 | volumes: |
| 73 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 74 | |
| 75 | # |
| 76 | # Fluentd log server |
| 77 | # |
| 78 | fluentd: |
David K. Bainbridge | 0910489 | 2018-01-24 12:27:33 -0800 | [diff] [blame] | 79 | image: "${REGISTRY}fluent/fluentd:v0.12.42" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 80 | ports: |
| 81 | - "24224:24224" |
| 82 | volumes: |
| 83 | - "/tmp/fluentd:/fluentd/log" |
| 84 | environment: |
| 85 | SERVICE_24224_NAME: "fluentd-intake" |
| 86 | |
| 87 | # |
| 88 | # Graphite-Grafana-statsd service instance |
| 89 | # (demo place-holder for external KPI system) |
| 90 | # |
| 91 | grafana: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 92 | image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 93 | ports: |
| 94 | - "8883:80" |
| 95 | - "2003:2003" |
| 96 | - "2004:2004" |
| 97 | - "8126:8126" |
| 98 | - "8125:8125/udp" |
| 99 | environment: |
| 100 | SERVICE_80_NAME: "grafana-web-ui" |
| 101 | SERVICE_2003_NAME: "carbon-plain-text-intake" |
| 102 | SERVICE_2004_NAME: "carbon-pickle-intake" |
| 103 | SERVICE_8126_NAME: "statsd-tcp-intake" |
| 104 | SERVICE_8125_NAME: "statsd-udp-intake" |
| 105 | GR_SERVER_ROOT_URL: "http://localhost:80/grafana/" |
| 106 | |
| 107 | # |
| 108 | # Shovel (Kafka-graphite-gateway) |
| 109 | # |
| 110 | shovel: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 111 | image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 112 | command: [ |
| 113 | "/shovel/shovel/main.py", |
| 114 | "--kafka=@kafka", |
| 115 | "--consul=${DOCKER_HOST_IP}:8500", |
| 116 | "--topic=voltha.kpis", |
| 117 | "--host=${DOCKER_HOST_IP}" |
| 118 | ] |
| 119 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 120 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 121 | - kafka |
| 122 | - grafana |
| 123 | restart: unless-stopped |
| 124 | |
| 125 | # |
| 126 | # Voltha server instance(s) |
| 127 | # |
| 128 | voltha: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 129 | image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 130 | logging: |
| 131 | driver: "json-file" |
| 132 | options: |
| 133 | max-size: "10m" |
| 134 | max-file: "3" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 135 | command: [ |
| 136 | "/voltha/voltha/main.py", |
| 137 | "-v", |
| 138 | "--consul=${DOCKER_HOST_IP}:8500", |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 139 | "--rest-port=8880", |
| 140 | "--grpc-port=50556", |
| 141 | "--kafka=@kafka", |
| 142 | "--instance-id-is-container-name", |
| 143 | "--interface=eth1", |
| 144 | "--backend=consul", |
| 145 | "-v" |
| 146 | ] |
| 147 | ports: |
| 148 | - 8880 |
| 149 | - 50556 |
| 150 | - 18880 |
| 151 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 152 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 153 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 154 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 155 | environment: |
| 156 | SERVICE_8880_NAME: "voltha-health" |
| 157 | SERVICE_8880_CHECK_HTTP: "/health" |
| 158 | SERVICE_8880_CHECK_INTERVAL: "5s" |
| 159 | SERVICE_8880_CHECK_TIMEOUT: "1s" |
| 160 | SERVICE_18880_NAME: "voltha-sim-rest" |
| 161 | SERVICE_HOST_IP: "${DOCKER_HOST_IP}" |
| 162 | SERVICE_50556_NAME: "vcore-grpc" |
| 163 | volumes: |
| 164 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 165 | networks: |
| 166 | - default |
| 167 | - ponmgmt |
| 168 | |
| 169 | envoy: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 170 | image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 171 | entrypoint: |
| 172 | - /usr/local/bin/envoyd |
| 173 | - -envoy-cfg-template |
| 174 | - "/envoy/voltha-grpc-proxy.template.json" |
| 175 | - -envoy-config |
| 176 | - "/envoy/voltha-grpc-proxy.json" |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 177 | - -consul-svc-nme |
| 178 | - "vconsul" |
| 179 | - -kv-svc-name |
| 180 | - "vconsul" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 181 | ports: |
| 182 | - "50555:50555" |
| 183 | - "8882:8882" |
| 184 | - "8443:8443" |
| 185 | - "8001:8001" |
| 186 | environment: |
| 187 | SERVICE_50555_NAME: "voltha-grpc" |
| 188 | volumes: |
| 189 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 190 | networks: |
| 191 | - default |
| 192 | - ponmgmt |
| 193 | links: |
| 194 | - voltha:vcore |
| 195 | # |
| 196 | # Voltha cli container |
| 197 | # |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 198 | cli: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 199 | image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 200 | command: [ |
| 201 | "/cli/cli/setup.sh", |
| 202 | "-L", |
| 203 | "-G" |
| 204 | ] |
| 205 | environment: |
| 206 | DOCKER_HOST_IP: "${DOCKER_HOST_IP}" |
| 207 | ports: |
| 208 | - "5022:22" |
| 209 | depends_on: |
| 210 | - voltha |
| 211 | |
| 212 | ############################################# |
| 213 | # Item below this line will soon be removed.# |
| 214 | ############################################# |
| 215 | |
| 216 | # |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 217 | # ofagent server instance |
| 218 | # |
| 219 | ofagent: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 220 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 221 | logging: |
| 222 | driver: "json-file" |
| 223 | options: |
| 224 | max-size: "10m" |
| 225 | max-file: "3" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 226 | command: [ |
| 227 | "/ofagent/ofagent/main.py", |
| 228 | "-v", |
| 229 | "--consul=${DOCKER_HOST_IP}:8500", |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 230 | "--controller=${DOCKER_HOST_IP}:6653", |
| 231 | "--grpc-endpoint=@voltha-grpc", |
| 232 | "--instance-id-is-container-name", |
| 233 | "-v" |
| 234 | ] |
| 235 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 236 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 237 | - voltha |
| 238 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 239 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 240 | volumes: |
| 241 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 242 | restart: unless-stopped |
| 243 | |
| 244 | # |
| 245 | # Netconf server instance(s) |
| 246 | # |
| 247 | netconf: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 248 | image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 249 | logging: |
| 250 | driver: "json-file" |
| 251 | options: |
| 252 | max-size: "10m" |
| 253 | max-file: "3" |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 254 | privileged: true |
| 255 | command: [ |
| 256 | "/netconf/netconf/main.py", |
| 257 | "-v", |
| 258 | "--consul=${DOCKER_HOST_IP}:8500", |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 259 | "--grpc-endpoint=@voltha-grpc", |
| 260 | "--instance-id-is-container-name", |
| 261 | "-v" |
| 262 | ] |
| 263 | ports: |
| 264 | - "830:1830" |
| 265 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 266 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 267 | - voltha |
| 268 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 269 | - vconsul |
khenaidoo | 3d3f99a | 2017-10-10 15:53:42 -0400 | [diff] [blame] | 270 | environment: |
| 271 | SERVICE_1830_NAME: "netconf-server" |
| 272 | volumes: |
| 273 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 274 | |
| 275 | |
| 276 | networks: |
| 277 | default: |
| 278 | driver: bridge |
| 279 | ponmgmt: |
| 280 | driver: bridge |
| 281 | driver_opts: |
| 282 | com.docker.network.bridge.name: "ponmgmt" |