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 | 3d5b22d | 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 | 3d5b22d | 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 | d67db4a | 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 | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 32 | vconsul: |
David K. Bainbridge | 3d5b22d | 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 | 3d5b22d | 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 | d67db4a | 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 | d67db4a | 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 | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 69 | image: "${REGISTRY}${REPOSITORY}voltha-fluentd${TAG}" |
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 | 3d5b22d | 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 | 3d5b22d | 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 | d67db4a | 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 | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 119 | image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 120 | command: [ |
| 121 | "/voltha/voltha/main.py", |
| 122 | "-v", |
| 123 | "--consul=${DOCKER_HOST_IP}:8500", |
| 124 | "--fluentd=fluentd:24224", |
| 125 | "--rest-port=8880", |
| 126 | "--grpc-port=50555", |
| 127 | "--kafka=@kafka", |
| 128 | "--instance-id-is-container-name", |
| 129 | "--interface=eth1", |
| 130 | "-v" |
| 131 | ] |
| 132 | ports: |
| 133 | - 8880 |
| 134 | - 50555 |
| 135 | - 18880 |
| 136 | depends_on: |
Jonathan Hart | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 137 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 138 | links: |
Jonathan Hart | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 139 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 140 | - fluentd |
| 141 | environment: |
| 142 | SERVICE_8880_NAME: "voltha-health" |
| 143 | SERVICE_8880_CHECK_HTTP: "/health" |
| 144 | SERVICE_8880_CHECK_INTERVAL: "5s" |
| 145 | SERVICE_8880_CHECK_TIMEOUT: "1s" |
| 146 | SERVICE_50555_NAME: "voltha-grpc" |
| 147 | SERVICE_18880_NAME: "voltha-sim-rest" |
| 148 | volumes: |
| 149 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 150 | networks: |
| 151 | - default |
| 152 | - ponmgmt |
| 153 | |
| 154 | # |
| 155 | # Voltha cli container |
| 156 | # |
David K. Bainbridge | 1246305 | 2018-01-19 09:26:09 -0800 | [diff] [blame] | 157 | cli: |
David K. Bainbridge | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 158 | image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}" |
Richard Jankowski | 29dd198 | 2017-06-28 13:30:18 -0400 | [diff] [blame] | 159 | command: [ |
| 160 | "/cli/cli/setup.sh", |
| 161 | "-L" |
| 162 | ] |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 163 | environment: |
| 164 | DOCKER_HOST_IP: "${DOCKER_HOST_IP}" |
| 165 | ports: |
| 166 | - "5022:22" |
| 167 | depends_on: |
| 168 | - voltha |
| 169 | |
| 170 | ############################################# |
| 171 | # Item below this line will soon be removed.# |
| 172 | ############################################# |
| 173 | |
| 174 | # |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 175 | # ofagent server instance |
| 176 | # |
| 177 | ofagent: |
David K. Bainbridge | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 178 | image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 179 | command: [ |
| 180 | "/ofagent/ofagent/main.py", |
| 181 | "-v", |
| 182 | "--consul=${DOCKER_HOST_IP}:8500", |
| 183 | "--fluentd=fluentd:24224", |
| 184 | "--controller=${DOCKER_HOST_IP}:6653", |
| 185 | "--grpc-endpoint=@voltha-grpc", |
| 186 | "--instance-id-is-container-name", |
| 187 | "-v" |
| 188 | ] |
| 189 | depends_on: |
Jonathan Hart | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 190 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 191 | - voltha |
| 192 | links: |
Jonathan Hart | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 193 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 194 | - fluentd |
| 195 | volumes: |
| 196 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 197 | restart: unless-stopped |
| 198 | |
| 199 | # |
| 200 | # Netconf server instance(s) |
| 201 | # |
| 202 | netconf: |
David K. Bainbridge | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 203 | image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 204 | privileged: true |
| 205 | command: [ |
| 206 | "/netconf/netconf/main.py", |
| 207 | "-v", |
| 208 | "--consul=${DOCKER_HOST_IP}:8500", |
| 209 | "--fluentd=fluentd:24224", |
| 210 | "--grpc-endpoint=@voltha-grpc", |
| 211 | "--instance-id-is-container-name", |
| 212 | "-v" |
| 213 | ] |
| 214 | ports: |
| 215 | - "830:1830" |
| 216 | depends_on: |
Jonathan Hart | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 217 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 218 | - voltha |
| 219 | links: |
Jonathan Hart | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 220 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 221 | - fluentd |
| 222 | environment: |
| 223 | SERVICE_1830_NAME: "netconf-server" |
| 224 | volumes: |
| 225 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 226 | |
| 227 | # |
| 228 | # Dashboard daemon |
| 229 | # |
| 230 | dashd: |
David K. Bainbridge | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 231 | image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 232 | command: [ |
| 233 | "/dashd/dashd/main.py", |
| 234 | "--kafka=@kafka", |
| 235 | "--consul=${DOCKER_HOST_IP}:8500", |
| 236 | "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api", |
| 237 | "--topic=voltha.kpis", |
| 238 | "--docker_host=${DOCKER_HOST_IP}" |
| 239 | ] |
| 240 | depends_on: |
Jonathan Hart | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 241 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 242 | - kafka |
| 243 | - grafana |
| 244 | restart: unless-stopped |
| 245 | |
| 246 | # |
| 247 | # Nginx service consolidation |
| 248 | # |
| 249 | nginx: |
David K. Bainbridge | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 250 | image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 251 | ports: |
| 252 | - "80:80" |
| 253 | environment: |
| 254 | CONSUL_ADDR: "${DOCKER_HOST_IP}:8500" |
| 255 | command: [ |
| 256 | "/nginx_config/start_service.sh" |
| 257 | ] |
| 258 | depends_on: |
Jonathan Hart | d67db4a | 2018-02-12 17:15:35 -0800 | [diff] [blame^] | 259 | - vconsul |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 260 | - grafana |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 261 | - portainer |
| 262 | restart: unless-stopped |
| 263 | volumes: |
David K. Bainbridge | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 264 | - "/vagrant/nginx_config:/nginx_config" |
| 265 | #- "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 266 | |
| 267 | # |
| 268 | # Docker ui |
| 269 | # |
| 270 | portainer: |
David K. Bainbridge | 3d5b22d | 2018-01-22 12:57:52 -0800 | [diff] [blame] | 271 | image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}" |
schowdhury | 33763f4 | 2017-06-09 02:05:42 -0700 | [diff] [blame] | 272 | ports: |
| 273 | - "9000:9000" |
| 274 | environment: |
| 275 | CONSUL_ADDR: "${DOCKER_HOST_IP}:8500" |
| 276 | restart: unless-stopped |
| 277 | entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"] |
| 278 | volumes: |
| 279 | - "/var/run/docker.sock:/var/run/docker.sock" |
| 280 | |
| 281 | networks: |
| 282 | default: |
| 283 | driver: bridge |
| 284 | ponmgmt: |
| 285 | driver: bridge |
| 286 | driver_opts: |
| 287 | com.docker.network.bridge.name: "ponmgmt" |