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 | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 14 | version: '2' |
| 15 | services: |
| 16 | # |
| 17 | # Single-node zookeeper service |
| 18 | # |
| 19 | zookeeper: |
David K. Bainbridge | 4894617 | 2018-01-20 14:33:37 -0800 | [diff] [blame] | 20 | image: "wurstmeister/zookeeper:latest" |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -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 | 4894617 | 2018-01-20 14:33:37 -0800 | [diff] [blame] | 29 | image: "wurstmeister/kafka:latest" |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -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 | fe874ae | 2017-07-14 18:07:27 -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 | 4894617 | 2018-01-20 14:33:37 -0800 | [diff] [blame] | 46 | image: "consul:0.9.2" |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -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 | 4894617 | 2018-01-20 14:33:37 -0800 | [diff] [blame] | 62 | image: "gliderlabs/registrator:latest" |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -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 | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 69 | ] |
| 70 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 71 | - vconsul |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -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 | 4894617 | 2018-01-20 14:33:37 -0800 | [diff] [blame] | 79 | image: "fluent/fluentd:latest" |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -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 | # Voltha server instance(s) |
| 89 | # |
| 90 | voltha: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 91 | image: "${REGISTRY}${REPOSITORY}voltha-voltha:latest" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 92 | logging: |
| 93 | driver: "json-file" |
| 94 | options: |
| 95 | max-size: "10m" |
| 96 | max-file: "3" |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 97 | command: [ |
| 98 | "/voltha/voltha/main.py", |
| 99 | "-v", |
| 100 | "--consul=${DOCKER_HOST_IP}:8500", |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 101 | "--rest-port=8880", |
| 102 | "--grpc-port=50555", |
| 103 | "--kafka=@kafka", |
| 104 | "--instance-id-is-container-name", |
| 105 | "--interface=eth1", |
| 106 | "--backend=consul", |
| 107 | "-v" |
| 108 | ] |
| 109 | ports: |
| 110 | - 8880 |
| 111 | - 50555 |
| 112 | - 18880 |
| 113 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 114 | - vconsul |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 115 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 116 | - vconsul |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 117 | environment: |
| 118 | SERVICE_8880_NAME: "voltha-health" |
| 119 | SERVICE_8880_CHECK_HTTP: "/health" |
| 120 | SERVICE_8880_CHECK_INTERVAL: "5s" |
| 121 | SERVICE_8880_CHECK_TIMEOUT: "1s" |
| 122 | SERVICE_50555_NAME: "voltha-grpc" |
| 123 | SERVICE_18880_NAME: "voltha-sim-rest" |
| 124 | volumes: |
| 125 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 126 | networks: |
| 127 | - default |
| 128 | - ponmgmt |
| 129 | |
| 130 | # |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 131 | # ofagent server instance |
| 132 | # |
| 133 | ofagent: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 134 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent:latest" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 135 | logging: |
| 136 | driver: "json-file" |
| 137 | options: |
| 138 | max-size: "10m" |
| 139 | max-file: "3" |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 140 | command: [ |
| 141 | "/ofagent/ofagent/main.py", |
| 142 | "-v", |
| 143 | "--consul=${DOCKER_HOST_IP}:8500", |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 144 | "--controller=${DOCKER_HOST_IP}:6653", |
| 145 | "--grpc-endpoint=@voltha-grpc", |
| 146 | "--instance-id-is-container-name", |
| 147 | "-v" |
| 148 | ] |
| 149 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 150 | - vconsul |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 151 | - voltha |
| 152 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 153 | - vconsul |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 154 | volumes: |
| 155 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 156 | restart: unless-stopped |
| 157 | |
| 158 | # |
| 159 | # Netconf server instance(s) |
| 160 | # |
| 161 | netconf: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 162 | image: "${REGISTRY}${REPOSITORY}voltha-netconf:latest" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 163 | logging: |
| 164 | driver: "json-file" |
| 165 | options: |
| 166 | max-size: "10m" |
| 167 | max-file: "3" |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 168 | privileged: true |
| 169 | command: [ |
| 170 | "/netconf/netconf/main.py", |
| 171 | "-v", |
| 172 | "--consul=${DOCKER_HOST_IP}:8500", |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 173 | "--grpc-endpoint=@voltha-grpc", |
| 174 | "--instance-id-is-container-name", |
| 175 | "-v" |
| 176 | ] |
| 177 | ports: |
| 178 | - "830:1830" |
| 179 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 180 | - vconsul |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 181 | - voltha |
| 182 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 183 | - vconsul |
khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 184 | environment: |
| 185 | SERVICE_1830_NAME: "netconf-server" |
| 186 | volumes: |
| 187 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 188 | |
| 189 | networks: |
| 190 | default: |
| 191 | driver: bridge |
| 192 | ponmgmt: |
| 193 | driver: bridge |
| 194 | driver_opts: |
| 195 | com.docker.network.bridge.name: "ponmgmt" |