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. |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [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" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [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" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [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 |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [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" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [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 | # Single-node etcd server |
| 60 | # |
| 61 | etcd: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 62 | image: "quay.io/coreos/etcd:v3.2.9" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 63 | command: [ |
| 64 | "etcd", |
| 65 | "--name=etcd0", |
| 66 | "--advertise-client-urls=http://${DOCKER_HOST_IP}:2379,http://${DOCKER_HOST_IP}:4001", |
| 67 | "--listen-client-urls=http://0.0.0.0:2379,http://0.0.0.0:4001", |
| 68 | "--initial-advertise-peer-urls=http://${DOCKER_HOST_IP}:2380", |
| 69 | "--listen-peer-urls=http://0.0.0.0:2380", |
| 70 | "--initial-cluster-token=etcd-cluster-1", |
| 71 | "--initial-cluster=etcd0=http://${DOCKER_HOST_IP}:2380", |
| 72 | "--initial-cluster-state=new" |
| 73 | ] |
| 74 | ports: |
| 75 | - "2379:2379" |
| 76 | - 2380 |
| 77 | - 4001 |
| 78 | # |
| 79 | # Registrator |
| 80 | # |
| 81 | registrator: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 82 | image: "${REGISTRY}gliderlabs/registrator:latest" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 83 | command: [ |
| 84 | "-ip=${DOCKER_HOST_IP}", |
| 85 | "-retry-attempts", "100", |
| 86 | "-cleanup", |
| 87 | # "-internal", |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 88 | "consul://vconsul:8500" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 89 | ] |
| 90 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 91 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 92 | volumes: |
| 93 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 94 | |
| 95 | # |
| 96 | # Fluentd log server |
| 97 | # |
| 98 | fluentd: |
David K. Bainbridge | 0910489 | 2018-01-24 12:27:33 -0800 | [diff] [blame] | 99 | image: "${REGISTRY}fluent/fluentd:v0.12.42" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 100 | ports: |
| 101 | - "24224:24224" |
| 102 | volumes: |
| 103 | - "/tmp/fluentd:/fluentd/log" |
| 104 | environment: |
| 105 | SERVICE_24224_NAME: "fluentd-intake" |
| 106 | |
| 107 | # |
| 108 | # Graphite-Grafana-statsd service instance |
| 109 | # (demo place-holder for external KPI system) |
| 110 | # |
| 111 | grafana: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 112 | image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 113 | ports: |
| 114 | - "8883:80" |
| 115 | - "2003:2003" |
| 116 | - "2004:2004" |
| 117 | - "8126:8126" |
| 118 | - "8125:8125/udp" |
| 119 | environment: |
| 120 | SERVICE_80_NAME: "grafana-web-ui" |
| 121 | SERVICE_2003_NAME: "carbon-plain-text-intake" |
| 122 | SERVICE_2004_NAME: "carbon-pickle-intake" |
| 123 | SERVICE_8126_NAME: "statsd-tcp-intake" |
| 124 | SERVICE_8125_NAME: "statsd-udp-intake" |
| 125 | GR_SERVER_ROOT_URL: "http://localhost:80/grafana/" |
| 126 | |
| 127 | # |
| 128 | # Shovel (Kafka-graphite-gateway) |
| 129 | # |
| 130 | shovel: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 131 | image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 132 | command: [ |
| 133 | "/shovel/shovel/main.py", |
| 134 | "--kafka=@kafka", |
| 135 | "--consul=${DOCKER_HOST_IP}:8500", |
| 136 | "--topic=voltha.kpis", |
| 137 | "--host=${DOCKER_HOST_IP}" |
| 138 | ] |
| 139 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 140 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 141 | - kafka |
| 142 | - grafana |
| 143 | restart: unless-stopped |
| 144 | |
| 145 | # |
| 146 | # Voltha server instance(s) |
| 147 | # |
| 148 | voltha: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 149 | image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 150 | logging: |
| 151 | driver: "json-file" |
| 152 | options: |
| 153 | max-size: "10m" |
| 154 | max-file: "3" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 155 | command: [ |
| 156 | "/voltha/voltha/main.py", |
| 157 | "-v", |
| 158 | "--consul=${DOCKER_HOST_IP}:8500", |
| 159 | "--etcd=${DOCKER_HOST_IP}:2379", |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 160 | "--rest-port=8880", |
| 161 | "--grpc-port=50556", |
| 162 | "--kafka=@kafka", |
| 163 | "--instance-id-is-container-name", |
| 164 | "--interface=eth1", |
| 165 | "--backend=etcd", |
| 166 | "-v" |
| 167 | ] |
| 168 | ports: |
| 169 | - 8880 |
| 170 | - 50556 |
| 171 | - 18880 |
| 172 | - "60001:60001" |
| 173 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 174 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 175 | - etcd |
| 176 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 177 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 178 | - etcd |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 179 | environment: |
| 180 | SERVICE_8880_NAME: "voltha-health" |
| 181 | SERVICE_8880_CHECK_HTTP: "/health" |
| 182 | SERVICE_8880_CHECK_INTERVAL: "5s" |
| 183 | SERVICE_8880_CHECK_TIMEOUT: "1s" |
| 184 | SERVICE_18880_NAME: "voltha-sim-rest" |
| 185 | SERVICE_HOST_IP: "${DOCKER_HOST_IP}" |
| 186 | volumes: |
| 187 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 188 | networks: |
| 189 | - default |
| 190 | - ponmgmt |
| 191 | |
| 192 | envoy: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 193 | image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 194 | entrypoint: |
| 195 | - /usr/local/bin/envoyd |
| 196 | - -envoy-cfg-template |
| 197 | - "/envoy/voltha-grpc-proxy.template.json" |
| 198 | - -envoy-config |
| 199 | - "/envoy/voltha-grpc-proxy.json" |
| 200 | - -kv |
| 201 | - "etcd" |
| 202 | - -kv-svc-name |
| 203 | - "etcd" |
| 204 | - -kv-port |
| 205 | - "2379" |
| 206 | |
| 207 | |
| 208 | ports: |
| 209 | - "50555:50555" |
| 210 | - "8882:8882" |
| 211 | - "8443:8443" |
| 212 | - "8001:8001" |
| 213 | environment: |
| 214 | SERVICE_50555_NAME: "voltha-grpc" |
| 215 | volumes: |
| 216 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 217 | networks: |
| 218 | - default |
| 219 | - ponmgmt |
| 220 | links: |
| 221 | - voltha:vcore |
| 222 | # |
| 223 | # Voltha cli container |
| 224 | # |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 225 | cli: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 226 | image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 227 | command: [ |
| 228 | "/cli/cli/setup.sh", |
| 229 | "-L", |
| 230 | "-G" |
| 231 | ] |
| 232 | environment: |
| 233 | DOCKER_HOST_IP: "${DOCKER_HOST_IP}" |
| 234 | ports: |
| 235 | - "5022:22" |
| 236 | depends_on: |
| 237 | - voltha |
| 238 | |
| 239 | ############################################# |
| 240 | # Item below this line will soon be removed.# |
| 241 | ############################################# |
| 242 | |
| 243 | # |
| 244 | # ofagent server instance |
| 245 | # |
| 246 | ofagent: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 247 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 248 | logging: |
| 249 | driver: "json-file" |
| 250 | options: |
| 251 | max-size: "10m" |
| 252 | max-file: "3" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 253 | command: [ |
| 254 | "/ofagent/ofagent/main.py", |
| 255 | "-v", |
| 256 | "--consul=${DOCKER_HOST_IP}:8500", |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 257 | "--controller=${DOCKER_HOST_IP}:6653", |
| 258 | "--grpc-endpoint=@voltha-grpc", |
| 259 | "--instance-id-is-container-name", |
| 260 | "--enable-tls", |
| 261 | "--key-file=/ofagent/pki/voltha.key", |
| 262 | "--cert-file=/ofagent/pki/voltha.crt", |
| 263 | "-v" |
| 264 | ] |
| 265 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 266 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 267 | - voltha |
| 268 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 269 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 270 | volumes: |
| 271 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 272 | restart: unless-stopped |
| 273 | |
| 274 | # |
| 275 | # Netconf server instance(s) |
| 276 | # |
| 277 | netconf: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 278 | image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 279 | logging: |
| 280 | driver: "json-file" |
| 281 | options: |
| 282 | max-size: "10m" |
| 283 | max-file: "3" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 284 | privileged: true |
| 285 | command: [ |
| 286 | "/netconf/netconf/main.py", |
| 287 | "-v", |
| 288 | "--consul=${DOCKER_HOST_IP}:8500", |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 289 | "--grpc-endpoint=@voltha-grpc", |
| 290 | "--instance-id-is-container-name", |
| 291 | "-v" |
| 292 | ] |
| 293 | ports: |
| 294 | - "830:1830" |
| 295 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 296 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 297 | - voltha |
| 298 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 299 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 300 | environment: |
| 301 | SERVICE_1830_NAME: "netconf-server" |
| 302 | volumes: |
| 303 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 304 | |
| 305 | # |
| 306 | # Dashboard daemon |
| 307 | # |
| 308 | dashd: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 309 | image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 310 | command: [ |
| 311 | "/dashd/dashd/main.py", |
| 312 | "--kafka=@kafka", |
| 313 | "--consul=${DOCKER_HOST_IP}:8500", |
| 314 | "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8883/api", |
| 315 | "--topic=voltha.kpis", |
| 316 | "--docker_host=${DOCKER_HOST_IP}" |
| 317 | ] |
| 318 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 319 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 320 | - kafka |
| 321 | - grafana |
| 322 | restart: unless-stopped |
| 323 | |
| 324 | # |
| 325 | # Nginx service consolidation |
| 326 | # |
| 327 | nginx: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 328 | image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 329 | ports: |
| 330 | - "80:80" |
| 331 | environment: |
| 332 | CONSUL_ADDR: "${DOCKER_HOST_IP}:8500" |
| 333 | command: [ |
| 334 | "/nginx_config/start_service.sh" |
| 335 | ] |
| 336 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 337 | - vconsul |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 338 | - grafana |
| 339 | - portainer |
| 340 | restart: unless-stopped |
| 341 | |
| 342 | # |
| 343 | # Docker ui |
| 344 | # |
| 345 | portainer: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 346 | image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}" |
Richard Jankowski | 8b277c2 | 2017-12-19 09:49:27 -0500 | [diff] [blame] | 347 | ports: |
| 348 | - "9000:9000" |
| 349 | environment: |
| 350 | CONSUL_ADDR: "${DOCKER_HOST_IP}:8500" |
| 351 | restart: unless-stopped |
| 352 | entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"] |
| 353 | volumes: |
| 354 | - "/var/run/docker.sock:/var/run/docker.sock" |
| 355 | |
| 356 | networks: |
| 357 | default: |
| 358 | driver: bridge |
| 359 | ponmgmt: |
| 360 | driver: bridge |
| 361 | driver_opts: |
| 362 | com.docker.network.bridge.name: "ponmgmt" |