alshabib | 3544872 | 2016-12-02 17:22:18 -0800 | [diff] [blame] | 1 | version: '2' |
| 2 | services: |
| 3 | # |
| 4 | # Single-node zookeeper service |
| 5 | # |
| 6 | zookeeper: |
| 7 | image: wurstmeister/zookeeper |
| 8 | ports: |
| 9 | - 2181 |
| 10 | environment: |
| 11 | SERVICE_2181_NAME: "zookeeper" |
| 12 | # |
| 13 | # Single-node kafka service |
| 14 | # |
| 15 | kafka: |
| 16 | image: wurstmeister/kafka |
| 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: |
| 26 | - consul |
| 27 | volumes: |
| 28 | - /var/run/docker.sock:/var/run/docker.sock |
| 29 | # |
| 30 | # Single-node consul agent |
| 31 | # |
| 32 | consul: |
| 33 | image: consul:latest |
| 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 | # Registrator |
| 47 | # |
| 48 | registrator: |
| 49 | image: gliderlabs/registrator:latest |
| 50 | command: [ |
| 51 | "-ip=${DOCKER_HOST_IP}", |
| 52 | "-retry-attempts", "100", |
| 53 | # "-internal", |
| 54 | "consul://consul:8500" |
| 55 | ] |
| 56 | links: |
| 57 | - consul |
| 58 | volumes: |
| 59 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 60 | # |
| 61 | # Fluentd log server |
| 62 | # |
| 63 | fluentd: |
| 64 | image: fluent/fluentd |
| 65 | ports: |
| 66 | - "24224:24224" |
| 67 | volumes: |
| 68 | - "/tmp/fluentd:/fluentd/log" |
| 69 | environment: |
| 70 | SERVICE_24224_NAME: "fluentd-intake" |
| 71 | |
| 72 | # |
| 73 | # Podder service instance |
| 74 | # |
| 75 | podder: |
| 76 | image: cord/podder |
| 77 | volumes: |
| 78 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 79 | restart: unless-stopped |
| 80 | |
| 81 | # |
Zsolt Haraszti | 9b485fb | 2016-12-26 23:11:15 -0800 | [diff] [blame] | 82 | # Graphite-Grafana-statsd service instance |
| 83 | # (demo place-holder for external KPI system) |
| 84 | # |
| 85 | grafana: |
| 86 | image: kamon/grafana_graphite |
| 87 | ports: |
| 88 | - "8882:80" |
| 89 | - "2003:2003" |
| 90 | - "2004:2004" |
| 91 | - "8126:8126" |
| 92 | - "8125:8125/udp" |
| 93 | environment: |
| 94 | SERVICE_80_NAME: "grafana-web-ui" |
| 95 | SERVICE_2003_NAME: "carbon-plain-text-intake" |
| 96 | SERVICE_2004_NAME: "carbon-pickle-intake" |
| 97 | SERVICE_8126_NAME: "statsd-tcp-intake" |
| 98 | SERVICE_8125_NAME: "statsd-udp-intake" |
| 99 | |
| 100 | # |
| 101 | # Shovel (Kafka-graphite-gateway) |
| 102 | # |
| 103 | shovel: |
| 104 | image: cord/shovel |
| 105 | command: [ |
| 106 | "/shovel/shovel/main.py", |
| 107 | "--kafka=@kafka", |
| 108 | "--consul=${DOCKER_HOST_IP}:8500", |
| 109 | "--topic=voltha.kpis", |
| 110 | "--host=${DOCKER_HOST_IP}" |
| 111 | ] |
| 112 | depends_on: |
| 113 | - consul |
| 114 | - kafka |
| 115 | - grafana |
| 116 | |
| 117 | # |
alshabib | 3544872 | 2016-12-02 17:22:18 -0800 | [diff] [blame] | 118 | # Voltha server instance(s) |
| 119 | # |
| 120 | voltha: |
| 121 | image: cord/voltha |
| 122 | command: [ |
| 123 | "/voltha/voltha/main.py", |
| 124 | "-v", |
| 125 | "--consul=${DOCKER_HOST_IP}:8500", |
| 126 | "--fluentd=fluentd:24224", |
| 127 | "--rest-port=8880", |
| 128 | "--grpc-port=50555", |
| 129 | "--kafka=@kafka", |
| 130 | "--instance-id-is-container-name", |
| 131 | "-v" |
| 132 | ] |
| 133 | ports: |
| 134 | - 8880 |
| 135 | - 50555 |
Zsolt Haraszti | 9b485fb | 2016-12-26 23:11:15 -0800 | [diff] [blame] | 136 | - 18880 |
alshabib | 3544872 | 2016-12-02 17:22:18 -0800 | [diff] [blame] | 137 | depends_on: |
| 138 | - consul |
| 139 | - podder |
| 140 | links: |
| 141 | - consul |
| 142 | - fluentd |
| 143 | environment: |
| 144 | SERVICE_8880_NAME: "voltha-health" |
| 145 | SERVICE_8880_CHECK_HTTP: "/health" |
| 146 | SERVICE_8880_CHECK_INTERVAL: "5s" |
| 147 | SERVICE_8880_CHECK_TIMEOUT: "1s" |
| 148 | SERVICE_50555_NAME: "voltha-grpc" |
Zsolt Haraszti | 9b485fb | 2016-12-26 23:11:15 -0800 | [diff] [blame] | 149 | SERVICE_18880_NAME: "voltha-sim-rest" |
alshabib | 3544872 | 2016-12-02 17:22:18 -0800 | [diff] [blame] | 150 | volumes: |
| 151 | - "/var/run/docker.sock:/tmp/docker.sock" |
Zsolt Haraszti | 9b485fb | 2016-12-26 23:11:15 -0800 | [diff] [blame] | 152 | networks: |
| 153 | - default |
| 154 | - ponmgmt |
alshabib | 3544872 | 2016-12-02 17:22:18 -0800 | [diff] [blame] | 155 | |
Zsolt Haraszti | 9b485fb | 2016-12-26 23:11:15 -0800 | [diff] [blame] | 156 | networks: |
| 157 | default: |
| 158 | driver: bridge |
| 159 | ponmgmt: |
| 160 | driver: bridge |