blob: 0204f4aaa8a45bf8973add71fabdd660a1b5870e [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.
Richard Jankowski8b277c22017-12-19 09:49:27 -050014version: '2'
15services:
16 #
17 # Single-node zookeeper service
18 #
19 zookeeper:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080020 image: "${REGISTRY}wurstmeister/zookeeper:latest"
Richard Jankowski8b277c22017-12-19 09:49:27 -050021 ports:
22 - 2181
23 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"
Richard Jankowski8b277c22017-12-19 09:49:27 -050030 ports:
31 - 9092
32 environment:
33 KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP}
34 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
35 KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
36 KAFKA_HEAP_OPTS: "-Xmx256M -Xms128M"
37 SERVICE_9092_NAME: "kafka"
38 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -080039 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -050040 volumes:
41 - /var/run/docker.sock:/var/run/docker.sock
42 #
43 # 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"
Richard Jankowski8b277c22017-12-19 09:49:27 -050047 command: agent -server -bootstrap -client 0.0.0.0 -ui
48 ports:
49 - "8300:8300"
50 - "8400:8400"
51 - "8500:8500"
52 - "8600:8600/udp"
53 environment:
54 #SERVICE_53_IGNORE: "yes"
55 SERVICE_8300_IGNORE: "yes"
56 SERVICE_8400_IGNORE: "yes"
57 SERVICE_8500_NAME: "consul-rest"
58 #
59 # Single-node etcd server
60 #
61 etcd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080062 image: "quay.io/coreos/etcd:v3.2.9"
Richard Jankowski8b277c22017-12-19 09:49:27 -050063 command: [
64 "etcd",
65 "--name=etcd0",
66 "--advertise-client-urls=http://${DOCKER_HOST_IP}:2379,http://${DOCKER_HOST_IP}:4001",
67 "--listen-client-urls=http://0.0.0.0:2379,http://0.0.0.0:4001",
68 "--initial-advertise-peer-urls=http://${DOCKER_HOST_IP}:2380",
69 "--listen-peer-urls=http://0.0.0.0:2380",
70 "--initial-cluster-token=etcd-cluster-1",
71 "--initial-cluster=etcd0=http://${DOCKER_HOST_IP}:2380",
72 "--initial-cluster-state=new"
73 ]
74 ports:
75 - "2379:2379"
76 - 2380
77 - 4001
78 #
79 # Registrator
80 #
81 registrator:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080082 image: "${REGISTRY}gliderlabs/registrator:latest"
Richard Jankowski8b277c22017-12-19 09:49:27 -050083 command: [
84 "-ip=${DOCKER_HOST_IP}",
85 "-retry-attempts", "100",
86 "-cleanup",
87 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080088 "consul://vconsul:8500"
Richard Jankowski8b277c22017-12-19 09:49:27 -050089 ]
90 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080091 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -050092 volumes:
93 - "/var/run/docker.sock:/tmp/docker.sock"
94
95 #
96 # Fluentd log server
97 #
98 fluentd:
David K. Bainbridge09104892018-01-24 12:27:33 -080099 image: "${REGISTRY}fluent/fluentd:v0.12.42"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500100 ports:
101 - "24224:24224"
102 volumes:
103 - "/tmp/fluentd:/fluentd/log"
104 environment:
105 SERVICE_24224_NAME: "fluentd-intake"
106
107 #
108 # Graphite-Grafana-statsd service instance
109 # (demo place-holder for external KPI system)
110 #
111 grafana:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800112 image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500113 ports:
114 - "8883:80"
115 - "2003:2003"
116 - "2004:2004"
117 - "8126:8126"
118 - "8125:8125/udp"
119 environment:
120 SERVICE_80_NAME: "grafana-web-ui"
121 SERVICE_2003_NAME: "carbon-plain-text-intake"
122 SERVICE_2004_NAME: "carbon-pickle-intake"
123 SERVICE_8126_NAME: "statsd-tcp-intake"
124 SERVICE_8125_NAME: "statsd-udp-intake"
125 GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
126
127 #
128 # Shovel (Kafka-graphite-gateway)
129 #
130 shovel:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800131 image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500132 command: [
133 "/shovel/shovel/main.py",
134 "--kafka=@kafka",
135 "--consul=${DOCKER_HOST_IP}:8500",
136 "--topic=voltha.kpis",
137 "--host=${DOCKER_HOST_IP}"
138 ]
139 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800140 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500141 - kafka
142 - grafana
143 restart: unless-stopped
144
145 #
146 # Voltha server instance(s)
147 #
148 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800149 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500150 logging:
151 driver: "json-file"
152 options:
153 max-size: "10m"
154 max-file: "3"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500155 command: [
156 "/voltha/voltha/main.py",
157 "-v",
158 "--consul=${DOCKER_HOST_IP}:8500",
159 "--etcd=${DOCKER_HOST_IP}:2379",
Richard Jankowski8b277c22017-12-19 09:49:27 -0500160 "--rest-port=8880",
161 "--grpc-port=50556",
162 "--kafka=@kafka",
163 "--instance-id-is-container-name",
164 "--interface=eth1",
165 "--backend=etcd",
166 "-v"
167 ]
168 ports:
169 - 8880
170 - 50556
171 - 18880
172 - "60001:60001"
173 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800174 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500175 - etcd
176 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800177 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500178 - etcd
Richard Jankowski8b277c22017-12-19 09:49:27 -0500179 environment:
180 SERVICE_8880_NAME: "voltha-health"
181 SERVICE_8880_CHECK_HTTP: "/health"
182 SERVICE_8880_CHECK_INTERVAL: "5s"
183 SERVICE_8880_CHECK_TIMEOUT: "1s"
184 SERVICE_18880_NAME: "voltha-sim-rest"
185 SERVICE_HOST_IP: "${DOCKER_HOST_IP}"
186 volumes:
187 - "/var/run/docker.sock:/tmp/docker.sock"
188 networks:
189 - default
190 - ponmgmt
191
192 envoy:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800193 image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500194 entrypoint:
195 - /usr/local/bin/envoyd
196 - -envoy-cfg-template
197 - "/envoy/voltha-grpc-proxy.template.json"
198 - -envoy-config
199 - "/envoy/voltha-grpc-proxy.json"
200 - -kv
201 - "etcd"
202 - -kv-svc-name
203 - "etcd"
204 - -kv-port
205 - "2379"
206
207
208 ports:
209 - "50555:50555"
210 - "8882:8882"
211 - "8443:8443"
212 - "8001:8001"
213 environment:
214 SERVICE_50555_NAME: "voltha-grpc"
215 volumes:
216 - "/var/run/docker.sock:/tmp/docker.sock"
217 networks:
218 - default
219 - ponmgmt
220 links:
221 - voltha:vcore
222 #
223 # Voltha cli container
224 #
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800225 cli:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800226 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500227 command: [
228 "/cli/cli/setup.sh",
229 "-L",
230 "-G"
231 ]
232 environment:
233 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
234 ports:
235 - "5022:22"
236 depends_on:
237 - voltha
238
239#############################################
240# Item below this line will soon be removed.#
241#############################################
242
243 #
244 # ofagent server instance
245 #
246 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800247 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500248 logging:
249 driver: "json-file"
250 options:
251 max-size: "10m"
252 max-file: "3"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500253 command: [
254 "/ofagent/ofagent/main.py",
255 "-v",
256 "--consul=${DOCKER_HOST_IP}:8500",
Richard Jankowski8b277c22017-12-19 09:49:27 -0500257 "--controller=${DOCKER_HOST_IP}:6653",
258 "--grpc-endpoint=@voltha-grpc",
259 "--instance-id-is-container-name",
260 "--enable-tls",
261 "--key-file=/ofagent/pki/voltha.key",
262 "--cert-file=/ofagent/pki/voltha.crt",
263 "-v"
264 ]
265 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800266 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500267 - voltha
268 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800269 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500270 volumes:
271 - "/var/run/docker.sock:/tmp/docker.sock"
272 restart: unless-stopped
273
274 #
275 # Netconf server instance(s)
276 #
277 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800278 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500279 logging:
280 driver: "json-file"
281 options:
282 max-size: "10m"
283 max-file: "3"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500284 privileged: true
285 command: [
286 "/netconf/netconf/main.py",
287 "-v",
288 "--consul=${DOCKER_HOST_IP}:8500",
Richard Jankowski8b277c22017-12-19 09:49:27 -0500289 "--grpc-endpoint=@voltha-grpc",
290 "--instance-id-is-container-name",
291 "-v"
292 ]
293 ports:
294 - "830:1830"
295 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800296 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500297 - voltha
298 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800299 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500300 environment:
301 SERVICE_1830_NAME: "netconf-server"
302 volumes:
303 - "/var/run/docker.sock:/tmp/docker.sock"
304
305 #
306 # Dashboard daemon
307 #
308 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800309 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500310 command: [
311 "/dashd/dashd/main.py",
312 "--kafka=@kafka",
313 "--consul=${DOCKER_HOST_IP}:8500",
314 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8883/api",
315 "--topic=voltha.kpis",
316 "--docker_host=${DOCKER_HOST_IP}"
317 ]
318 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800319 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500320 - kafka
321 - grafana
322 restart: unless-stopped
323
324 #
325 # Nginx service consolidation
326 #
327 nginx:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800328 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500329 ports:
330 - "80:80"
331 environment:
332 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
333 command: [
334 "/nginx_config/start_service.sh"
335 ]
336 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800337 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500338 - grafana
339 - portainer
340 restart: unless-stopped
341
342 #
343 # Docker ui
344 #
345 portainer:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800346 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500347 ports:
348 - "9000:9000"
349 environment:
350 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
351 restart: unless-stopped
352 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
353 volumes:
354 - "/var/run/docker.sock:/var/run/docker.sock"
355
356networks:
357 default:
358 driver: bridge
359 ponmgmt:
360 driver: bridge
361 driver_opts:
362 com.docker.network.bridge.name: "ponmgmt"