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