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. |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [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" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [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" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [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 |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [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}${REPOSITORY}voltha-consul${TAG}" |
schowdhury | a260f5b | 2017-06-14 15:54:25 -0700 | [diff] [blame] | 47 | command: agent -server -bootstrap -client 0.0.0.0 -ui |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 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" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 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" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [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-tls://vconsul:8501" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 68 | ] |
| 69 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 70 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 71 | volumes: |
| 72 | - "/var/run/docker.sock:/tmp/docker.sock" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 73 | environment: |
| 74 | CONSUL_CACERT: "/reg/config/voltha-CA-template.pem" |
schowdhury | a260f5b | 2017-06-14 15:54:25 -0700 | [diff] [blame] | 75 | CONSUL_CLIENT_CERT: "/reg/config/voltha-cert-template.crt" |
| 76 | CONSUL_CLIENT_KEY: "/reg/config/voltha-pvt-template.key" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 77 | |
| 78 | # |
| 79 | # Fluentd log server |
| 80 | # |
| 81 | fluentd: |
David K. Bainbridge | 0910489 | 2018-01-24 12:27:33 -0800 | [diff] [blame] | 82 | image: "${REGISTRY}fluent/fluentd:v0.12.42" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 83 | ports: |
| 84 | - "24224:24224" |
| 85 | volumes: |
| 86 | - "/tmp/fluentd:/fluentd/log" |
| 87 | environment: |
| 88 | SERVICE_24224_NAME: "fluentd-intake" |
| 89 | |
| 90 | # |
| 91 | # Graphite-Grafana-statsd service instance |
| 92 | # (demo place-holder for external KPI system) |
| 93 | # |
| 94 | grafana: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 95 | image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 96 | ports: |
| 97 | - "8882:80" |
| 98 | - "2003:2003" |
| 99 | - "2004:2004" |
| 100 | - "8126:8126" |
| 101 | - "8125:8125/udp" |
| 102 | environment: |
| 103 | SERVICE_80_NAME: "grafana-web-ui" |
| 104 | SERVICE_2003_NAME: "carbon-plain-text-intake" |
| 105 | SERVICE_2004_NAME: "carbon-pickle-intake" |
| 106 | SERVICE_8126_NAME: "statsd-tcp-intake" |
| 107 | SERVICE_8125_NAME: "statsd-udp-intake" |
| 108 | GR_SERVER_ROOT_URL: "http://localhost:80/grafana/" |
| 109 | |
| 110 | # |
| 111 | # Shovel (Kafka-graphite-gateway) |
| 112 | # |
| 113 | shovel: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 114 | image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 115 | command: [ |
| 116 | "/shovel/shovel/main.py", |
| 117 | "--kafka=@kafka", |
| 118 | "--consul=${DOCKER_HOST_IP}:8500", |
| 119 | "--topic=voltha.kpis", |
| 120 | "--host=${DOCKER_HOST_IP}" |
| 121 | ] |
| 122 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 123 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 124 | - kafka |
| 125 | - grafana |
| 126 | restart: unless-stopped |
| 127 | |
| 128 | # |
| 129 | # Voltha server instance(s) |
| 130 | # |
| 131 | voltha: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 132 | image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 133 | logging: |
| 134 | driver: "json-file" |
| 135 | options: |
| 136 | max-size: "10m" |
| 137 | max-file: "3" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 138 | command: [ |
| 139 | "/voltha/voltha/main.py", |
| 140 | "-v", |
| 141 | "--consul=${DOCKER_HOST_IP}:8500", |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 142 | "--rest-port=8880", |
| 143 | "--grpc-port=50555", |
| 144 | "--kafka=@kafka", |
| 145 | "--instance-id-is-container-name", |
| 146 | "--interface=eth1", |
| 147 | "-v" |
| 148 | ] |
| 149 | ports: |
| 150 | - 8880 |
| 151 | - 50555 |
| 152 | - 18880 |
| 153 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 154 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 155 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 156 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 157 | environment: |
| 158 | SERVICE_8880_NAME: "voltha-health" |
| 159 | SERVICE_8880_CHECK_HTTP: "/health" |
| 160 | SERVICE_8880_CHECK_INTERVAL: "5s" |
| 161 | SERVICE_8880_CHECK_TIMEOUT: "1s" |
| 162 | SERVICE_50555_NAME: "voltha-grpc" |
| 163 | SERVICE_18880_NAME: "voltha-sim-rest" |
| 164 | volumes: |
| 165 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 166 | networks: |
| 167 | - default |
| 168 | - ponmgmt |
| 169 | |
| 170 | # |
| 171 | # Voltha cli container |
| 172 | # |
David K. Bainbridge | bba65ff | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 173 | cli: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 174 | image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}" |
Richard Jankowski | 29dd198 | 2017-06-28 13:30:18 -0400 | [diff] [blame] | 175 | command: [ |
| 176 | "/cli/cli/setup.sh", |
| 177 | "-L" |
| 178 | ] |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 179 | environment: |
| 180 | DOCKER_HOST_IP: "${DOCKER_HOST_IP}" |
| 181 | ports: |
| 182 | - "5022:22" |
| 183 | depends_on: |
| 184 | - voltha |
| 185 | |
| 186 | ############################################# |
| 187 | # Item below this line will soon be removed.# |
| 188 | ############################################# |
| 189 | |
| 190 | # |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 191 | # ofagent server instance |
| 192 | # |
| 193 | ofagent: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 194 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 195 | logging: |
| 196 | driver: "json-file" |
| 197 | options: |
| 198 | max-size: "10m" |
| 199 | max-file: "3" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 200 | command: [ |
| 201 | "/ofagent/ofagent/main.py", |
| 202 | "-v", |
| 203 | "--consul=${DOCKER_HOST_IP}:8500", |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 204 | "--controller=${DOCKER_HOST_IP}:6653", |
| 205 | "--grpc-endpoint=@voltha-grpc", |
| 206 | "--instance-id-is-container-name", |
| 207 | "-v" |
| 208 | ] |
| 209 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 210 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 211 | - voltha |
| 212 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 213 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 214 | volumes: |
| 215 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 216 | restart: unless-stopped |
| 217 | |
| 218 | # |
| 219 | # Netconf server instance(s) |
| 220 | # |
| 221 | netconf: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 222 | image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}" |
khenaidoo | 50b286d | 2018-03-02 17:44:30 -0500 | [diff] [blame] | 223 | logging: |
| 224 | driver: "json-file" |
| 225 | options: |
| 226 | max-size: "10m" |
| 227 | max-file: "3" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 228 | privileged: true |
| 229 | command: [ |
| 230 | "/netconf/netconf/main.py", |
| 231 | "-v", |
| 232 | "--consul=${DOCKER_HOST_IP}:8500", |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 233 | "--grpc-endpoint=@voltha-grpc", |
| 234 | "--instance-id-is-container-name", |
| 235 | "-v" |
| 236 | ] |
| 237 | ports: |
| 238 | - "830:1830" |
| 239 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 240 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 241 | - voltha |
| 242 | links: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 243 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 244 | environment: |
| 245 | SERVICE_1830_NAME: "netconf-server" |
| 246 | volumes: |
| 247 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 248 | |
| 249 | # |
| 250 | # Dashboard daemon |
| 251 | # |
| 252 | dashd: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 253 | image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 254 | command: [ |
| 255 | "/dashd/dashd/main.py", |
| 256 | "--kafka=@kafka", |
| 257 | "--consul=${DOCKER_HOST_IP}:8500", |
| 258 | "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api", |
| 259 | "--topic=voltha.kpis", |
| 260 | "--docker_host=${DOCKER_HOST_IP}" |
| 261 | ] |
| 262 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 263 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 264 | - kafka |
| 265 | - grafana |
| 266 | restart: unless-stopped |
| 267 | |
| 268 | # |
| 269 | # Nginx service consolidation |
| 270 | # |
| 271 | nginx: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 272 | image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 273 | ports: |
| 274 | - "80:80" |
| 275 | environment: |
| 276 | CONSUL_ADDR: "${DOCKER_HOST_IP}:8500" |
| 277 | command: [ |
| 278 | "/nginx_config/start_service.sh" |
| 279 | ] |
| 280 | depends_on: |
Jonathan Hart | 87314cd | 2018-02-12 17:15:35 -0800 | [diff] [blame] | 281 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 282 | - grafana |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 283 | - portainer |
| 284 | restart: unless-stopped |
| 285 | volumes: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 286 | - "/vagrant/nginx_config:/nginx_config" |
| 287 | #- "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 288 | |
| 289 | # |
| 290 | # Docker ui |
| 291 | # |
| 292 | portainer: |
David K. Bainbridge | 737b74f | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 293 | image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 294 | ports: |
| 295 | - "9000:9000" |
| 296 | environment: |
| 297 | CONSUL_ADDR: "${DOCKER_HOST_IP}:8500" |
| 298 | restart: unless-stopped |
| 299 | entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"] |
| 300 | volumes: |
| 301 | - "/var/run/docker.sock:/var/run/docker.sock" |
| 302 | |
| 303 | networks: |
| 304 | default: |
| 305 | driver: bridge |
| 306 | ponmgmt: |
| 307 | driver: bridge |
| 308 | driver_opts: |
| 309 | com.docker.network.bridge.name: "ponmgmt" |