blob: e47aec59a35a02015d2b7c19597fe301fcf73e7b [file] [log] [blame]
Zack Williams41513bf2018-07-07 20:08:35 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070014version: '2'
15services:
16 #
khenb95fe9a2016-10-05 11:15:25 -070017 # Single-node zookeeper service
18 #
19 zookeeper:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080020 image: "${REGISTRY}wurstmeister/zookeeper:latest"
khenb95fe9a2016-10-05 11:15:25 -070021 ports:
Khen Nursimuluda11dd72016-10-05 17:42:36 -070022 - 2181
khenb95fe9a2016-10-05 11:15:25 -070023 environment:
24 SERVICE_2181_NAME: "zookeeper"
25 #
26 # Single-node kafka service
27 #
28 kafka:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080029 image: "${REGISTRY}wurstmeister/kafka:latest"
khenb95fe9a2016-10-05 11:15:25 -070030 ports:
Khen Nursimuluda11dd72016-10-05 17:42:36 -070031 - 9092
khenb95fe9a2016-10-05 11:15:25 -070032 environment:
33 KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP}
34 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
35 KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
Khen Nursimulu34e7ebb2016-11-10 13:38:44 -080036 KAFKA_HEAP_OPTS: "-Xmx256M -Xms128M"
khenb95fe9a2016-10-05 11:15:25 -070037 SERVICE_9092_NAME: "kafka"
38 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -080039 - vconsul
khenb95fe9a2016-10-05 11:15:25 -070040 volumes:
41 - /var/run/docker.sock:/var/run/docker.sock
42 #
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070043 # Single-node consul agent
44 #
Jonathan Hart87314cd2018-02-12 17:15:35 -080045 vconsul:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080046 image: "${REGISTRY}consul:0.9.2"
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070047 command: agent -server -bootstrap -client 0.0.0.0 -ui
48 ports:
49 - "8300:8300"
50 - "8400:8400"
51 - "8500:8500"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070052 - "8600:8600/udp"
Zsolt Haraszti3d552922016-09-14 22:26:34 -070053 environment:
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070054 #SERVICE_53_IGNORE: "yes"
Zsolt Haraszti3d552922016-09-14 22:26:34 -070055 SERVICE_8300_IGNORE: "yes"
56 SERVICE_8400_IGNORE: "yes"
57 SERVICE_8500_NAME: "consul-rest"
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070058 #
59 # Registrator
60 #
61 registrator:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080062 image: "${REGISTRY}gliderlabs/registrator:latest"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070063 command: [
64 "-ip=${DOCKER_HOST_IP}",
65 "-retry-attempts", "100",
khenaidoo032d3302017-06-09 14:50:04 -040066 "-cleanup",
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070067 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080068 "consul://vconsul:8500"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070069 ]
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070070 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080071 - vconsul
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070072 volumes:
73 - "/var/run/docker.sock:/tmp/docker.sock"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080074
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070075 #
76 # Fluentd log server
77 #
78 fluentd:
David K. Bainbridge09104892018-01-24 12:27:33 -080079 image: "${REGISTRY}fluent/fluentd:v0.12.42"
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070080 ports:
81 - "24224:24224"
82 volumes:
83 - "/tmp/fluentd:/fluentd/log"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -070084 environment:
85 SERVICE_24224_NAME: "fluentd-intake"
alshabib7941d402016-11-08 00:11:20 +010086
Zsolt Harasztif2da1d02016-09-13 23:21:35 -070087 #
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080088 # Graphite-Grafana-statsd service instance
89 # (demo place-holder for external KPI system)
90 #
91 grafana:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080092 image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080093 ports:
Sergio Slobodrian4f14a742017-08-23 21:53:10 -040094 - "8883:80"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -080095 - "2003:2003"
96 - "2004:2004"
97 - "8126:8126"
98 - "8125:8125/udp"
99 environment:
100 SERVICE_80_NAME: "grafana-web-ui"
101 SERVICE_2003_NAME: "carbon-plain-text-intake"
102 SERVICE_2004_NAME: "carbon-pickle-intake"
103 SERVICE_8126_NAME: "statsd-tcp-intake"
104 SERVICE_8125_NAME: "statsd-udp-intake"
Sergio Slobodrianba491582017-04-24 15:49:00 -0400105 GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -0800106
107 #
108 # Shovel (Kafka-graphite-gateway)
109 #
110 shovel:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800111 image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -0800112 command: [
113 "/shovel/shovel/main.py",
114 "--kafka=@kafka",
115 "--consul=${DOCKER_HOST_IP}:8500",
Zsolt Haraszti1b7c0362016-12-12 09:45:47 -0800116 "--topic=voltha.kpis",
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -0800117 "--host=${DOCKER_HOST_IP}"
118 ]
119 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800120 - vconsul
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -0800121 - kafka
122 - grafana
alshabibb634d902017-01-16 13:10:17 -0600123 restart: unless-stopped
Zsolt Harasztiaa4626e2016-12-08 16:53:06 -0800124
125 #
Zsolt Haraszti86be6f12016-09-27 09:56:49 -0700126 # Voltha server instance(s)
Zsolt Harasztif2da1d02016-09-13 23:21:35 -0700127 #
128 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800129 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500130 logging:
131 driver: "json-file"
132 options:
133 max-size: "10m"
134 max-file: "3"
135# Use the fluentd driver to push logs to fluentd instead
136# driver: "fluentd"
137# options:
138# fluentd-address: ${DOCKER_HOST_IP}:24224
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700139 command: [
Zsolt Haraszti1edb8282016-11-08 10:57:19 -0800140 "/voltha/voltha/main.py",
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700141 "-v",
khenb95fe9a2016-10-05 11:15:25 -0700142 "--consul=${DOCKER_HOST_IP}:8500",
Zsolt Harasztie060a7d2016-09-16 11:08:24 -0700143 "--rest-port=8880",
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400144 "--grpc-port=50556",
khenb95fe9a2016-10-05 11:15:25 -0700145 "--kafka=@kafka",
Zsolt Harasztie060a7d2016-09-16 11:08:24 -0700146 "--instance-id-is-container-name",
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800147 "--interface=eth1",
khenaidoo032d3302017-06-09 14:50:04 -0400148 "--backend=consul",
Zsolt Harasztie060a7d2016-09-16 11:08:24 -0700149 "-v"
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700150 ]
151 ports:
152 - 8880
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400153 - 50556
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800154 - 18880
rshettye4bd2ed2017-07-19 16:38:11 +0530155 - "60001:60001"
Zsolt Harasztif2da1d02016-09-13 23:21:35 -0700156 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800157 - vconsul
Zsolt Harasztif2da1d02016-09-13 23:21:35 -0700158 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800159 - vconsul
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700160 environment:
Zsolt Haraszti45363352016-09-27 10:32:18 -0700161 SERVICE_8880_NAME: "voltha-health"
Zsolt Haraszti3d552922016-09-14 22:26:34 -0700162 SERVICE_8880_CHECK_HTTP: "/health"
163 SERVICE_8880_CHECK_INTERVAL: "5s"
164 SERVICE_8880_CHECK_TIMEOUT: "1s"
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800165 SERVICE_18880_NAME: "voltha-sim-rest"
Rajeswara Rao8af144c2017-08-18 14:01:06 +0530166 SERVICE_HOST_IP: "${DOCKER_HOST_IP}"
Zsolt Harasztie060a7d2016-09-16 11:08:24 -0700167 volumes:
168 - "/var/run/docker.sock:/tmp/docker.sock"
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800169 networks:
170 - default
171 - ponmgmt
alshabib7941d402016-11-08 00:11:20 +0100172
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400173 envoy:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800174 image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}"
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400175 entrypoint:
176 - /usr/local/bin/envoyd
177 - -envoy-cfg-template
178 - "/envoy/voltha-grpc-proxy.template.json"
179 - -envoy-config
180 - "/envoy/voltha-grpc-proxy.json"
Jonathan Hart87314cd2018-02-12 17:15:35 -0800181 - -consul-svc-nme
182 - "vconsul"
183 - -kv-svc-name
184 - "vconsul"
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400185 ports:
186 - "50555:50555"
187 - "8882:8882"
188 - "8443:8443"
189 - "8001:8001"
190 environment:
191 SERVICE_50555_NAME: "voltha-grpc"
192 volumes:
193 - "/var/run/docker.sock:/tmp/docker.sock"
194 networks:
195 - default
196 - ponmgmt
197 links:
198 - voltha:vcore
Sergio Slobodrianab11c642017-04-24 07:16:58 -0400199 #
200 # Voltha cli container
201 #
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800202 cli:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800203 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
Richard Jankowski29dd1982017-06-28 13:30:18 -0400204 command: [
205 "/cli/cli/setup.sh",
khenaidoo108f05c2017-07-06 11:15:29 -0400206 "-L",
Jonathan Hart87314cd2018-02-12 17:15:35 -0800207 "-C vconsul:8500",
khenaidoo108f05c2017-07-06 11:15:29 -0400208 "-G"
Richard Jankowski29dd1982017-06-28 13:30:18 -0400209 ]
Sergio Slobodrianab11c642017-04-24 07:16:58 -0400210 environment:
211 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
212 ports:
213 - "5022:22"
214 depends_on:
215 - voltha
216
alshabib7941d402016-11-08 00:11:20 +0100217#############################################
218# Item below this line will soon be removed.#
219#############################################
220
Zsolt Harasztif2da1d02016-09-13 23:21:35 -0700221 #
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400222 # ofagent server instance
223 #
224 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800225 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500226 logging:
227 driver: "json-file"
228 options:
229 max-size: "10m"
230 max-file: "3"
231# Use the fluentd driver to push logs to fluentd instead
232# driver: "fluentd"
233# options:
234# fluentd-address: ${DOCKER_HOST_IP}:24224
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400235 command: [
Zsolt Haraszti1edb8282016-11-08 10:57:19 -0800236 "/ofagent/ofagent/main.py",
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400237 "-v",
238 "--consul=${DOCKER_HOST_IP}:8500",
Zsolt Harasztiee5c4c82017-01-09 14:37:57 -0800239 "--controller=${DOCKER_HOST_IP}:6653",
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400240 "--grpc-endpoint=@voltha-grpc",
241 "--instance-id-is-container-name",
242 "-v"
243 ]
244 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800245 - vconsul
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400246 - voltha
247 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800248 - vconsul
Khen Nursimulu68b9be32016-10-25 11:57:04 -0400249 volumes:
250 - "/var/run/docker.sock:/tmp/docker.sock"
alshabib06b449c2017-01-15 17:33:16 -0600251 restart: unless-stopped
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500252
253 #
254 # Netconf server instance(s)
255 #
256 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800257 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500258 logging:
259 driver: "json-file"
260 options:
261 max-size: "10m"
262 max-file: "3"
263# Use the fluentd driver to push logs to fluentd instead
264# driver: "fluentd"
265# options:
266# fluentd-address: ${DOCKER_HOST_IP}:24224
Khen Nursimulub4e71472017-01-06 18:05:47 -0500267 privileged: true
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500268 command: [
269 "/netconf/netconf/main.py",
270 "-v",
271 "--consul=${DOCKER_HOST_IP}:8500",
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500272 "--grpc-endpoint=@voltha-grpc",
273 "--instance-id-is-container-name",
274 "-v"
275 ]
276 ports:
Khen Nursimulub4e71472017-01-06 18:05:47 -0500277 - "830:1830"
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500278 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800279 - vconsul
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500280 - voltha
281 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800282 - vconsul
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -0500283 environment:
284 SERVICE_1830_NAME: "netconf-server"
285 volumes:
286 - "/var/run/docker.sock:/tmp/docker.sock"
287
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400288 #
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400289 # Dashboard daemon
290 #
291 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800292 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400293 command: [
294 "/dashd/dashd/main.py",
295 "--kafka=@kafka",
296 "--consul=${DOCKER_HOST_IP}:8500",
Sergio Slobodrian4f14a742017-08-23 21:53:10 -0400297 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8883/api",
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400298 "--topic=voltha.kpis",
299 "--docker_host=${DOCKER_HOST_IP}"
300 ]
301 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800302 - vconsul
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400303 - kafka
304 - grafana
305 restart: unless-stopped
306
307 #
308 # Nginx service consolidation
309 #
310 nginx:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800311 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400312 ports:
313 - "80:80"
314 environment:
315 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
316 command: [
317 "/nginx_config/start_service.sh"
318 ]
319 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800320 - vconsul
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400321 - grafana
Sergio Slobodriand9ec6002017-04-25 08:09:11 -0400322 - portainer
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400323 restart: unless-stopped
Sergio Slobodrianff52e1b2017-04-24 12:39:08 -0400324
325 #
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400326 # Docker ui
327 #
328 portainer:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800329 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400330 ports:
331 - "9000:9000"
332 environment:
333 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400334 restart: unless-stopped
Sergio Slobodriand9ec6002017-04-25 08:09:11 -0400335 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
Sergio Slobodrian4d307102017-04-24 10:19:00 -0400336 volumes:
337 - "/var/run/docker.sock:/var/run/docker.sock"
338
Zsolt Haraszti9b485fb2016-12-26 23:11:15 -0800339networks:
340 default:
341 driver: bridge
342 ponmgmt:
343 driver: bridge
344 driver_opts:
345 com.docker.network.bridge.name: "ponmgmt"