blob: 6b40c4f42ab12926cd94dc72340c0b1bce79e0ee [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",
Richard Jankowski8b277c22017-12-19 09:49:27 -0500260 "-v"
261 ]
262 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800263 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500264 - voltha
265 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800266 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500267 volumes:
268 - "/var/run/docker.sock:/tmp/docker.sock"
269 restart: unless-stopped
270
271 #
272 # Netconf server instance(s)
273 #
274 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800275 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500276 logging:
277 driver: "json-file"
278 options:
279 max-size: "10m"
280 max-file: "3"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500281 privileged: true
282 command: [
283 "/netconf/netconf/main.py",
284 "-v",
285 "--consul=${DOCKER_HOST_IP}:8500",
Richard Jankowski8b277c22017-12-19 09:49:27 -0500286 "--grpc-endpoint=@voltha-grpc",
287 "--instance-id-is-container-name",
288 "-v"
289 ]
290 ports:
291 - "830:1830"
292 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800293 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500294 - voltha
295 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800296 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500297 environment:
298 SERVICE_1830_NAME: "netconf-server"
299 volumes:
300 - "/var/run/docker.sock:/tmp/docker.sock"
301
302 #
303 # Dashboard daemon
304 #
305 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800306 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500307 command: [
308 "/dashd/dashd/main.py",
309 "--kafka=@kafka",
310 "--consul=${DOCKER_HOST_IP}:8500",
311 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8883/api",
312 "--topic=voltha.kpis",
313 "--docker_host=${DOCKER_HOST_IP}"
314 ]
315 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800316 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500317 - kafka
318 - grafana
319 restart: unless-stopped
320
321 #
322 # Nginx service consolidation
323 #
324 nginx:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800325 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500326 ports:
327 - "80:80"
328 environment:
329 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
330 command: [
331 "/nginx_config/start_service.sh"
332 ]
333 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800334 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500335 - grafana
336 - portainer
337 restart: unless-stopped
338
339 #
340 # Docker ui
341 #
342 portainer:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800343 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500344 ports:
345 - "9000:9000"
346 environment:
347 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
348 restart: unless-stopped
349 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
350 volumes:
351 - "/var/run/docker.sock:/var/run/docker.sock"
352
353networks:
354 default:
355 driver: bridge
356 ponmgmt:
357 driver: bridge
358 driver_opts:
359 com.docker.network.bridge.name: "ponmgmt"