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