blob: 3909ac2550921c3c039fe1087ecd59d46e5c95ec [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.
Sergio Slobodrian61999e52017-04-03 19:09:11 -040014version: '2'
15services:
16 #
17 # Single-node zookeeper service
18 #
19 zookeeper:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080020 image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -040021 ports:
22 - "2181:2181"
23 environment:
24 SERVICE_2181_NAME: "zookeeper"
25 #
26 # Single-node kafka service
27 #
28 kafka:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080029 image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -040030 ports:
31 - "9092: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
Sergio Slobodrian61999e52017-04-03 19:09:11 -040040 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. Bainbridgebba65ff2018-01-19 09:26:09 -080046 image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -040047 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 # Registrator
60 #
61 registrator:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080062 image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -040063 command: [
64 "-ip=${DOCKER_HOST_IP}",
65 "-retry-attempts", "100",
66 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080067 "consul://vconsul:8500"
Sergio Slobodrian61999e52017-04-03 19:09:11 -040068 ]
69 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080070 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -040071 volumes:
72 - "/var/run/docker.sock:/tmp/docker.sock"
73
74 #
75 # Fluentd log server
76 #
77 fluentd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080078 image: "${REGISTRY}${REPOSITORY}voltha-fluentd:${TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -040079 ports:
80 - "24224:24224"
81 volumes:
82 - "/tmp/fluentd:/fluentd/log"
83 environment:
84 SERVICE_24224_NAME: "fluentd-intake"
85
86 #
87 # Graphite-Grafana-statsd service instance
88 # (demo place-holder for external KPI system)
89 #
90 grafana:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080091 image: "${REGISTRY}kamon/grafana_graphite:${GRAPHITE_TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -040092 ports:
93 - "8882:80"
94 - "2003:2003"
95 - "2004:2004"
96 - "8126:8126"
97 - "8125:8125/udp"
98 environment:
99 SERVICE_80_NAME: "grafana-web-ui"
100 SERVICE_2003_NAME: "carbon-plain-text-intake"
101 SERVICE_2004_NAME: "carbon-pickle-intake"
102 SERVICE_8126_NAME: "statsd-tcp-intake"
103 SERVICE_8125_NAME: "statsd-udp-intake"
104
105 #
106 # Shovel (Kafka-graphite-gateway)
107 #
108 shovel:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800109 image: "${REGISTRY}${REPOSITORY}voltha-shovel:${TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400110 command: [
111 "/shovel/shovel/main.py",
112 "--kafka=@kafka",
113 "--consul=${DOCKER_HOST_IP}:8500",
114 "--topic=voltha.kpis",
115 "--host=${DOCKER_HOST_IP}"
116 ]
117 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800118 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400119 - kafka
120 - grafana
121 restart: unless-stopped
122
123 #
124 # Voltha server instance(s)
125 #
126 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800127 image: "${REGISTRY}${REPOSITORY}voltha-voltha:${TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400128 command: [
129 "/voltha/voltha/main.py",
130 "-v",
131 "--consul=${DOCKER_HOST_IP}:8500",
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400132 "--rest-port=8880",
133 "--grpc-port=50555",
134 "--kafka=@kafka",
135 "--instance-id-is-container-name",
136 "--interface=eth1",
137 "-v"
138 ]
139 ports:
140 - 8880
141 - 50555
142 - 18880
143 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800144 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400145 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800146 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400147 environment:
148 SERVICE_8880_NAME: "voltha-health"
149 SERVICE_8880_CHECK_HTTP: "/health"
150 SERVICE_8880_CHECK_INTERVAL: "5s"
151 SERVICE_8880_CHECK_TIMEOUT: "1s"
152 SERVICE_50555_NAME: "voltha-grpc"
153 SERVICE_18880_NAME: "voltha-sim-rest"
154 volumes:
155 - "/var/run/docker.sock:/tmp/docker.sock"
156 networks:
157 - default
158 - ponmgmt
159
160#############################################
161# Item below this line will soon be removed.#
162#############################################
163
164 #
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400165 # ofagent server instance
166 #
167 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800168 image: "${REGISTRY}${REPOSITORY}voltha-ofagent:${TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400169 command: [
170 "/ofagent/ofagent/main.py",
171 "-v",
172 "--consul=${DOCKER_HOST_IP}:8500",
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400173 "--controller=${DOCKER_HOST_IP}:6653",
174 "--grpc-endpoint=@voltha-grpc",
175 "--instance-id-is-container-name",
176 "-v"
177 ]
178 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800179 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400180 - voltha
181 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800182 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400183 volumes:
184 - "/var/run/docker.sock:/tmp/docker.sock"
185 restart: unless-stopped
186
187 #
188 # Netconf server instance(s)
189 #
190 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800191 image: "${REGISTRY}${REPOSITORY}voltha-netconf:${TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400192 privileged: true
193 command: [
194 "/netconf/netconf/main.py",
195 "-v",
196 "--consul=${DOCKER_HOST_IP}:8500",
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400197 "--grpc-endpoint=@voltha-grpc",
198 "--instance-id-is-container-name",
199 "-v"
200 ]
201 ports:
202 - "830:1830"
203 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800204 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400205 - voltha
206 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800207 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400208 environment:
209 SERVICE_1830_NAME: "netconf-server"
210 volumes:
211 - "/var/run/docker.sock:/tmp/docker.sock"
212
213 #
214 # Dashboard daemon
215 #
216 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800217 image: "${REGISTRY}${REPOSITORY}voltha-dashd:${TAG:-latest}"
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400218 command: [
219 "/dashd/dashd/main.py",
220 "--kafka=@kafka",
221 "--consul=${DOCKER_HOST_IP}:8500",
222 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api",
223 "--topic=voltha.kpis",
224 "--docker_host=${DOCKER_HOST_IP}"
225 ]
226 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800227 - vconsul
Sergio Slobodrian61999e52017-04-03 19:09:11 -0400228 - kafka
229 - grafana
230 restart: unless-stopped
231
232networks:
233 default:
234 driver: bridge
235 ponmgmt:
236 driver: bridge
237 driver_opts:
238 com.docker.network.bridge.name: "ponmgmt"