blob: 0ca70fd5c91f3b29d660090dab77b6ed44b45d7e [file] [log] [blame]
Zsolt Harasztif2da1d02016-09-13 23:21:35 -07001version: '2'
2services:
3 #
khenb95fe9a2016-10-05 11:15:25 -07004 # Single-node zookeeper service
5 #
6 zookeeper:
David K. Bainbridge737b74f2018-01-22 12:57:52 -08007 image: "${REGISTRY}wurstmeister/zookeeper:latest"
khenb95fe9a2016-10-05 11:15:25 -07008 ports:
Khen Nursimuluda11dd72016-10-05 17:42:36 -07009 - 2181
khenb95fe9a2016-10-05 11:15:25 -070010 environment:
11 SERVICE_2181_NAME: "zookeeper"
12 #
13 # Single-node kafka service
14 #
15 kafka:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080016 image: "${REGISTRY}wurstmeister/kafka:latest"
khenb95fe9a2016-10-05 11:15:25 -070017 ports:
Khen Nursimuluda11dd72016-10-05 17:42:36 -070018 - 9092
khenb95fe9a2016-10-05 11:15:25 -070019 environment:
20 KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP}
21 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
22 KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
Khen Nursimulu34e7ebb2016-11-10 13:38:44 -080023 KAFKA_HEAP_OPTS: "-Xmx256M -Xms128M"
khenb95fe9a2016-10-05 11:15:25 -070024 SERVICE_9092_NAME: "kafka"
25 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -080026 - vconsul
khenb95fe9a2016-10-05 11:15:25 -070027 volumes:
28 - /var/run/docker.sock:/var/run/docker.sock
29 #
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070030 # Single-node consul agent
31 #
Jonathan Hart87314cd2018-02-12 17:15:35 -080032 vconsul:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080033 image: "${REGISTRY}consul:0.9.2"
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070034 command: agent -server -bootstrap -client 0.0.0.0 -ui
35 ports:
36 - "8300:8300"
37 - "8400:8400"
38 - "8500:8500"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070039 - "8600:8600/udp"
Zsolt Haraszti3d552922016-09-14 22:26:34 -070040 environment:
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070041 #SERVICE_53_IGNORE: "yes"
Zsolt Haraszti3d552922016-09-14 22:26:34 -070042 SERVICE_8300_IGNORE: "yes"
43 SERVICE_8400_IGNORE: "yes"
44 SERVICE_8500_NAME: "consul-rest"
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070045 #
46 # Registrator
47 #
48 registrator:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080049 image: "${REGISTRY}gliderlabs/registrator:latest"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070050 command: [
51 "-ip=${DOCKER_HOST_IP}",
52 "-retry-attempts", "100",
khenaidoo032d3302017-06-09 14:50:04 -040053 "-cleanup",
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070054 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080055 "consul://vconsul:8500"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070056 ]
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070057 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080058 - vconsul
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070059 volumes:
60 - "/var/run/docker.sock:/tmp/docker.sock"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080061
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070062 #
63 # Fluentd log server
64 #
65 fluentd:
David K. Bainbridge09104892018-01-24 12:27:33 -080066 image: "${REGISTRY}fluent/fluentd:v0.12.42"
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070067 ports:
68 - "24224:24224"
69 volumes:
70 - "/tmp/fluentd:/fluentd/log"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070071 environment:
72 SERVICE_24224_NAME: "fluentd-intake"
alshabib7941d402016-11-08 00:11:20 +010073
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070074 #
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080075 # Graphite-Grafana-statsd service instance
76 # (demo place-holder for external KPI system)
77 #
78 grafana:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080079 image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080080 ports:
Sergio Slobodrian4f14a742017-08-23 21:53:10 -040081 - "8883:80"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080082 - "2003:2003"
83 - "2004:2004"
84 - "8126:8126"
85 - "8125:8125/udp"
86 environment:
87 SERVICE_80_NAME: "grafana-web-ui"
88 SERVICE_2003_NAME: "carbon-plain-text-intake"
89 SERVICE_2004_NAME: "carbon-pickle-intake"
90 SERVICE_8126_NAME: "statsd-tcp-intake"
91 SERVICE_8125_NAME: "statsd-udp-intake"
Sergio Slobodrianba491582017-04-24 15:49:00 -040092 GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080093
94 #
95 # Shovel (Kafka-graphite-gateway)
96 #
97 shovel:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080098 image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080099 command: [
100 "/shovel/shovel/main.py",
101 "--kafka=@kafka",
102 "--consul=${DOCKER_HOST_IP}:8500",
Zsolt Haraszti1b7c0362016-12-12 09:45:47 -0800103 "--topic=voltha.kpis",
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -0800104 "--host=${DOCKER_HOST_IP}"
105 ]
106 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800107 - vconsul
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -0800108 - kafka
109 - grafana
alshabibb634d902017-01-16 13:10:17 -0600110 restart: unless-stopped
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -0800111
112 #
Zsolt Haraszti86be6f12016-09-27 09:56:49 -0700113 # Voltha server instance(s)
Zsolt Harasztif2da1d02016-09-13 23:21:35 -0700114 #
115 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800116 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500117 logging:
118 driver: "json-file"
119 options:
120 max-size: "10m"
121 max-file: "3"
122# Use the fluentd driver to push logs to fluentd instead
123# driver: "fluentd"
124# options:
125# fluentd-address: ${DOCKER_HOST_IP}:24224
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700126 command: [
Zsolt Haraszti1edb8282016-11-08 10:57:19 -0800127 "/voltha/voltha/main.py",
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700128 "-v",
khenb95fe9a2016-10-05 11:15:25 -0700129 "--consul=${DOCKER_HOST_IP}:8500",
Zsolt Harasztie060a7d2016-09-16 11:08:24 -0700130 "--rest-port=8880",
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400131 "--grpc-port=50556",
khenb95fe9a2016-10-05 11:15:25 -0700132 "--kafka=@kafka",
Zsolt Harasztie060a7d2016-09-16 11:08:24 -0700133 "--instance-id-is-container-name",
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800134 "--interface=eth1",
khenaidoo032d3302017-06-09 14:50:04 -0400135 "--backend=consul",
Zsolt Harasztie060a7d2016-09-16 11:08:24 -0700136 "-v"
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700137 ]
138 ports:
139 - 8880
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400140 - 50556
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800141 - 18880
rshettye4bd2ed2017-07-19 16:38:11 +0530142 - "60001:60001"
Zsolt Harasztif2da1d02016-09-13 23:21:35 -0700143 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800144 - vconsul
Zsolt Harasztif2da1d02016-09-13 23:21:35 -0700145 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800146 - vconsul
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700147 environment:
Zsolt Haraszti45363352016-09-27 10:32:18 -0700148 SERVICE_8880_NAME: "voltha-health"
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700149 SERVICE_8880_CHECK_HTTP: "/health"
150 SERVICE_8880_CHECK_INTERVAL: "5s"
151 SERVICE_8880_CHECK_TIMEOUT: "1s"
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800152 SERVICE_18880_NAME: "voltha-sim-rest"
Rajeswara Rao8af144c2017-08-18 14:01:06 +0530153 SERVICE_HOST_IP: "${DOCKER_HOST_IP}"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -0700154 volumes:
155 - "/var/run/docker.sock:/tmp/docker.sock"
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800156 networks:
157 - default
158 - ponmgmt
alshabib7941d402016-11-08 00:11:20 +0100159
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400160 envoy:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800161 image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}"
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400162 entrypoint:
163 - /usr/local/bin/envoyd
164 - -envoy-cfg-template
165 - "/envoy/voltha-grpc-proxy.template.json"
166 - -envoy-config
167 - "/envoy/voltha-grpc-proxy.json"
Jonathan Hart87314cd2018-02-12 17:15:35 -0800168 - -consul-svc-nme
169 - "vconsul"
170 - -kv-svc-name
171 - "vconsul"
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400172 ports:
173 - "50555:50555"
174 - "8882:8882"
175 - "8443:8443"
176 - "8001:8001"
177 environment:
178 SERVICE_50555_NAME: "voltha-grpc"
179 volumes:
180 - "/var/run/docker.sock:/tmp/docker.sock"
181 networks:
182 - default
183 - ponmgmt
184 links:
185 - voltha:vcore
Sergio Slobodrianab11c642017-04-24 07:16:58 -0400186 #
187 # Voltha cli container
188 #
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800189 cli:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800190 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
Richard Jankowski29dd1982017-06-28 13:30:18 -0400191 command: [
192 "/cli/cli/setup.sh",
khenaidoo108f05c2017-07-06 11:15:29 -0400193 "-L",
Jonathan Hart87314cd2018-02-12 17:15:35 -0800194 "-C vconsul:8500",
khenaidoo108f05c2017-07-06 11:15:29 -0400195 "-G"
Richard Jankowski29dd1982017-06-28 13:30:18 -0400196 ]
Sergio Slobodrianab11c642017-04-24 07:16:58 -0400197 environment:
198 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
199 ports:
200 - "5022:22"
201 depends_on:
202 - voltha
203
alshabib7941d402016-11-08 00:11:20 +0100204#############################################
205# Item below this line will soon be removed.#
206#############################################
207
Zsolt Harasztif2da1d02016-09-13 23:21:35 -0700208 #
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400209 # ofagent server instance
210 #
211 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800212 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500213 logging:
214 driver: "json-file"
215 options:
216 max-size: "10m"
217 max-file: "3"
218# Use the fluentd driver to push logs to fluentd instead
219# driver: "fluentd"
220# options:
221# fluentd-address: ${DOCKER_HOST_IP}:24224
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400222 command: [
Zsolt Haraszti1edb8282016-11-08 10:57:19 -0800223 "/ofagent/ofagent/main.py",
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400224 "-v",
225 "--consul=${DOCKER_HOST_IP}:8500",
Zsolt Harasztiee5c4c82017-01-09 14:37:57 -0800226 "--controller=${DOCKER_HOST_IP}:6653",
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400227 "--grpc-endpoint=@voltha-grpc",
228 "--instance-id-is-container-name",
Girishf6eeaea2017-11-13 10:53:57 +0530229 "--enable-tls",
230 "--key-file=/ofagent/pki/voltha.key",
231 "--cert-file=/ofagent/pki/voltha.crt",
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400232 "-v"
233 ]
234 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800235 - vconsul
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400236 - voltha
237 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800238 - vconsul
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400239 volumes:
240 - "/var/run/docker.sock:/tmp/docker.sock"
alshabib06b449c2017-01-15 17:33:16 -0600241 restart: unless-stopped
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500242
243 #
244 # Netconf server instance(s)
245 #
246 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800247 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500248 logging:
249 driver: "json-file"
250 options:
251 max-size: "10m"
252 max-file: "3"
253# Use the fluentd driver to push logs to fluentd instead
254# driver: "fluentd"
255# options:
256# fluentd-address: ${DOCKER_HOST_IP}:24224
Khen Nursimulub4e71472017-01-06 18:05:47 -0500257 privileged: true
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500258 command: [
259 "/netconf/netconf/main.py",
260 "-v",
261 "--consul=${DOCKER_HOST_IP}:8500",
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500262 "--grpc-endpoint=@voltha-grpc",
263 "--instance-id-is-container-name",
264 "-v"
265 ]
266 ports:
Khen Nursimulub4e71472017-01-06 18:05:47 -0500267 - "830:1830"
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500268 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800269 - vconsul
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500270 - voltha
271 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800272 - vconsul
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500273 environment:
274 SERVICE_1830_NAME: "netconf-server"
275 volumes:
276 - "/var/run/docker.sock:/tmp/docker.sock"
277
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400278 #
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400279 # Dashboard daemon
280 #
281 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800282 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400283 command: [
284 "/dashd/dashd/main.py",
285 "--kafka=@kafka",
286 "--consul=${DOCKER_HOST_IP}:8500",
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400287 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8883/api",
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400288 "--topic=voltha.kpis",
289 "--docker_host=${DOCKER_HOST_IP}"
290 ]
291 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800292 - vconsul
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400293 - kafka
294 - grafana
295 restart: unless-stopped
296
297 #
298 # Nginx service consolidation
299 #
300 nginx:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800301 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400302 ports:
303 - "80:80"
304 environment:
305 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
306 command: [
307 "/nginx_config/start_service.sh"
308 ]
309 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800310 - vconsul
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400311 - grafana
Sergio Slobodriand9ec6002017-04-25 08:09:11 -0400312 - portainer
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400313 restart: unless-stopped
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400314
315 #
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400316 # Docker ui
317 #
318 portainer:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800319 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400320 ports:
321 - "9000:9000"
322 environment:
323 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400324 restart: unless-stopped
Sergio Slobodriand9ec6002017-04-25 08:09:11 -0400325 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400326 volumes:
327 - "/var/run/docker.sock:/var/run/docker.sock"
328
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800329networks:
330 default:
331 driver: bridge
332 ponmgmt:
333 driver: bridge
334 driver_opts:
335 com.docker.network.bridge.name: "ponmgmt"