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. |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 14 | version: '2' |
| 15 | services: |
| 16 | # |
| 17 | # Single-node zookeeper service |
| 18 | # |
| 19 | zookeeper: |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 20 | image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 21 | ports: |
| 22 | - "2181:2181" |
| 23 | environment: |
| 24 | SERVICE_2181_NAME: "zookeeper" |
| 25 | # |
| 26 | # Single-node kafka service |
| 27 | # |
| 28 | kafka: |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 29 | image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 30 | ports: |
| 31 | - "9092: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 |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -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 | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 46 | image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -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 | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 62 | image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 63 | command: [ |
| 64 | "-ip=${DOCKER_HOST_IP}", |
| 65 | "-retry-attempts", "100", |
| 66 | # "-internal", |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 67 | "consul://vconsul:8500" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 68 | ] |
| 69 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 70 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 71 | volumes: |
| 72 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 73 | |
| 74 | # |
| 75 | # Fluentd log server |
| 76 | # |
| 77 | fluentd: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 78 | image: "${REGISTRY}${REPOSITORY}voltha-fluentd:${TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 79 | ports: |
| 80 | - "24224:24224" |
| 81 | volumes: |
| 82 | - "/tmp/fluentd:/fluentd/log" |
| 83 | environment: |
| 84 | SERVICE_24224_NAME: "fluentd-intake" |
| 85 | |
| 86 | # |
| 87 | # Graphite-Grafana-statsd service instance |
| 88 | # (demo place-holder for external KPI system) |
| 89 | # |
| 90 | grafana: |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 91 | image: "${REGISTRY}kamon/grafana_graphite:${GRAPHITE_TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 92 | ports: |
| 93 | - "8882:80" |
| 94 | - "2003:2003" |
| 95 | - "2004:2004" |
| 96 | - "8126:8126" |
| 97 | - "8125:8125/udp" |
| 98 | environment: |
| 99 | SERVICE_80_NAME: "grafana-web-ui" |
| 100 | SERVICE_2003_NAME: "carbon-plain-text-intake" |
| 101 | SERVICE_2004_NAME: "carbon-pickle-intake" |
| 102 | SERVICE_8126_NAME: "statsd-tcp-intake" |
| 103 | SERVICE_8125_NAME: "statsd-udp-intake" |
| 104 | |
| 105 | # |
| 106 | # Shovel (Kafka-graphite-gateway) |
| 107 | # |
| 108 | shovel: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 109 | image: "${REGISTRY}${REPOSITORY}voltha-shovel:${TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 110 | command: [ |
| 111 | "/shovel/shovel/main.py", |
| 112 | "--kafka=@kafka", |
| 113 | "--consul=${DOCKER_HOST_IP}:8500", |
| 114 | "--topic=voltha.kpis", |
| 115 | "--host=${DOCKER_HOST_IP}" |
| 116 | ] |
| 117 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 118 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 119 | - kafka |
| 120 | - grafana |
| 121 | restart: unless-stopped |
| 122 | |
| 123 | # |
| 124 | # Voltha server instance(s) |
| 125 | # |
| 126 | voltha: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 127 | image: "${REGISTRY}${REPOSITORY}voltha-voltha:${TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 128 | command: [ |
| 129 | "/voltha/voltha/main.py", |
| 130 | "-v", |
| 131 | "--consul=${DOCKER_HOST_IP}:8500", |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 132 | "--rest-port=8880", |
| 133 | "--grpc-port=50555", |
| 134 | "--kafka=@kafka", |
| 135 | "--instance-id-is-container-name", |
| 136 | "--interface=eth1", |
| 137 | "-v" |
| 138 | ] |
| 139 | ports: |
| 140 | - 8880 |
| 141 | - 50555 |
| 142 | - 18880 |
| 143 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 144 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 145 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 146 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 147 | environment: |
| 148 | SERVICE_8880_NAME: "voltha-health" |
| 149 | SERVICE_8880_CHECK_HTTP: "/health" |
| 150 | SERVICE_8880_CHECK_INTERVAL: "5s" |
| 151 | SERVICE_8880_CHECK_TIMEOUT: "1s" |
| 152 | SERVICE_50555_NAME: "voltha-grpc" |
| 153 | SERVICE_18880_NAME: "voltha-sim-rest" |
| 154 | volumes: |
| 155 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 156 | networks: |
| 157 | - default |
| 158 | - ponmgmt |
| 159 | |
| 160 | ############################################# |
| 161 | # Item below this line will soon be removed.# |
| 162 | ############################################# |
| 163 | |
| 164 | # |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 165 | # ofagent server instance |
| 166 | # |
| 167 | ofagent: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 168 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent:${TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 169 | command: [ |
| 170 | "/ofagent/ofagent/main.py", |
| 171 | "-v", |
| 172 | "--consul=${DOCKER_HOST_IP}:8500", |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 173 | "--controller=${DOCKER_HOST_IP}:6653", |
| 174 | "--grpc-endpoint=@voltha-grpc", |
| 175 | "--instance-id-is-container-name", |
| 176 | "-v" |
| 177 | ] |
| 178 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 179 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 180 | - voltha |
| 181 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 182 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 183 | volumes: |
| 184 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 185 | restart: unless-stopped |
| 186 | |
| 187 | # |
| 188 | # Netconf server instance(s) |
| 189 | # |
| 190 | netconf: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 191 | image: "${REGISTRY}${REPOSITORY}voltha-netconf:${TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 192 | privileged: true |
| 193 | command: [ |
| 194 | "/netconf/netconf/main.py", |
| 195 | "-v", |
| 196 | "--consul=${DOCKER_HOST_IP}:8500", |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 197 | "--grpc-endpoint=@voltha-grpc", |
| 198 | "--instance-id-is-container-name", |
| 199 | "-v" |
| 200 | ] |
| 201 | ports: |
| 202 | - "830:1830" |
| 203 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 204 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 205 | - voltha |
| 206 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 207 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 208 | environment: |
| 209 | SERVICE_1830_NAME: "netconf-server" |
| 210 | volumes: |
| 211 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 212 | |
| 213 | # |
| 214 | # Dashboard daemon |
| 215 | # |
| 216 | dashd: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 217 | image: "${REGISTRY}${REPOSITORY}voltha-dashd:${TAG:-latest}" |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 218 | command: [ |
| 219 | "/dashd/dashd/main.py", |
| 220 | "--kafka=@kafka", |
| 221 | "--consul=${DOCKER_HOST_IP}:8500", |
| 222 | "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api", |
| 223 | "--topic=voltha.kpis", |
| 224 | "--docker_host=${DOCKER_HOST_IP}" |
| 225 | ] |
| 226 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 227 | - vconsul |
Sergio Slobodrian | 61999e5 | 2017-04-03 19:09:11 -0400 | [diff] [blame] | 228 | - kafka |
| 229 | - grafana |
| 230 | restart: unless-stopped |
| 231 | |
| 232 | networks: |
| 233 | default: |
| 234 | driver: bridge |
| 235 | ponmgmt: |
| 236 | driver: bridge |
| 237 | driver_opts: |
| 238 | com.docker.network.bridge.name: "ponmgmt" |