blob: d6c4c257a9d805b8daa77b65d951e4917a43eddd [file] [log] [blame]
schowdhury33763f42017-06-09 02:05:42 -07001version: '2'
2services:
3 #
4 # Single-node zookeeper service
5 #
6 zookeeper:
7 image: wurstmeister/zookeeper
8 ports:
9 - 2181
10 environment:
11 SERVICE_2181_NAME: "zookeeper"
12 #
13 # Single-node kafka service
14 #
15 kafka:
16 image: wurstmeister/kafka
17 ports:
18 - 9092
19 environment:
20 KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP}
21 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
22 KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
23 KAFKA_HEAP_OPTS: "-Xmx256M -Xms128M"
24 SERVICE_9092_NAME: "kafka"
25 depends_on:
26 - consul
27 volumes:
28 - /var/run/docker.sock:/var/run/docker.sock
29 #
30 # Single-node consul agent
31 #
32 consul:
schowdhury40739212017-06-12 07:40:31 -070033 image: voltha/consul
schowdhurya260f5b2017-06-14 15:54:25 -070034 command: agent -server -bootstrap -client 0.0.0.0 -ui
schowdhury33763f42017-06-09 02:05:42 -070035 ports:
36 - "8300:8300"
37 - "8400:8400"
38 - "8500:8500"
39 - "8600:8600/udp"
40 environment:
41 #SERVICE_53_IGNORE: "yes"
42 SERVICE_8300_IGNORE: "yes"
43 SERVICE_8400_IGNORE: "yes"
44 SERVICE_8500_NAME: "consul-rest"
schowdhury33763f42017-06-09 02:05:42 -070045 #
46 # Registrator
47 #
48 registrator:
schowdhury40739212017-06-12 07:40:31 -070049 image: voltha/registrator
schowdhury33763f42017-06-09 02:05:42 -070050 command: [
51 "-ip=${DOCKER_HOST_IP}",
52 "-retry-attempts", "100",
53 # "-internal",
schowdhurya260f5b2017-06-14 15:54:25 -070054 "consul-tls://consul:8501"
schowdhury33763f42017-06-09 02:05:42 -070055 ]
56 links:
57 - consul
58 volumes:
59 - "/var/run/docker.sock:/tmp/docker.sock"
schowdhury33763f42017-06-09 02:05:42 -070060 environment:
61 CONSUL_CACERT: "/reg/config/voltha-CA-template.pem"
schowdhurya260f5b2017-06-14 15:54:25 -070062 CONSUL_CLIENT_CERT: "/reg/config/voltha-cert-template.crt"
63 CONSUL_CLIENT_KEY: "/reg/config/voltha-pvt-template.key"
schowdhury33763f42017-06-09 02:05:42 -070064
65 #
66 # Fluentd log server
67 #
68 fluentd:
69 image: fluent/fluentd
70 ports:
71 - "24224:24224"
72 volumes:
73 - "/tmp/fluentd:/fluentd/log"
74 environment:
75 SERVICE_24224_NAME: "fluentd-intake"
76
77 #
78 # Graphite-Grafana-statsd service instance
79 # (demo place-holder for external KPI system)
80 #
81 grafana:
82 image: voltha/grafana
83 ports:
84 - "8882:80"
85 - "2003:2003"
86 - "2004:2004"
87 - "8126:8126"
88 - "8125:8125/udp"
89 environment:
90 SERVICE_80_NAME: "grafana-web-ui"
91 SERVICE_2003_NAME: "carbon-plain-text-intake"
92 SERVICE_2004_NAME: "carbon-pickle-intake"
93 SERVICE_8126_NAME: "statsd-tcp-intake"
94 SERVICE_8125_NAME: "statsd-udp-intake"
95 GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
96
97 #
98 # Shovel (Kafka-graphite-gateway)
99 #
100 shovel:
101 image: cord/shovel
102 command: [
103 "/shovel/shovel/main.py",
104 "--kafka=@kafka",
105 "--consul=${DOCKER_HOST_IP}:8500",
106 "--topic=voltha.kpis",
107 "--host=${DOCKER_HOST_IP}"
108 ]
109 depends_on:
110 - consul
111 - kafka
112 - grafana
113 restart: unless-stopped
114
115 #
116 # Voltha server instance(s)
117 #
118 voltha:
119 image: cord/voltha
120 command: [
121 "/voltha/voltha/main.py",
122 "-v",
123 "--consul=${DOCKER_HOST_IP}:8500",
124 "--fluentd=fluentd:24224",
125 "--rest-port=8880",
126 "--grpc-port=50555",
127 "--kafka=@kafka",
128 "--instance-id-is-container-name",
129 "--interface=eth1",
130 "-v"
131 ]
132 ports:
133 - 8880
134 - 50555
135 - 18880
136 depends_on:
137 - consul
138 links:
139 - consul
140 - fluentd
141 environment:
142 SERVICE_8880_NAME: "voltha-health"
143 SERVICE_8880_CHECK_HTTP: "/health"
144 SERVICE_8880_CHECK_INTERVAL: "5s"
145 SERVICE_8880_CHECK_TIMEOUT: "1s"
146 SERVICE_50555_NAME: "voltha-grpc"
147 SERVICE_18880_NAME: "voltha-sim-rest"
148 volumes:
149 - "/var/run/docker.sock:/tmp/docker.sock"
150 networks:
151 - default
152 - ponmgmt
153
154 #
155 # Voltha cli container
156 #
157 vcli:
158 image: cord/vcli
159 environment:
160 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
161 ports:
162 - "5022:22"
163 depends_on:
164 - voltha
165
166#############################################
167# Item below this line will soon be removed.#
168#############################################
169
170 #
171 # Chameleon server instance(s)
172 #
173 chameleon:
174 image: cord/chameleon
175 command: [
176 "/chameleon/chameleon/main.py",
177 "-v",
178 "--consul=consul:8500",
179 "--fluentd=fluentd:24224",
180 "--rest-port=8881",
181 "--grpc-endpoint=@voltha-grpc",
182 "--instance-id-is-container-name",
183 "-v"
184 ]
185 ports:
186 - 8881
187 depends_on:
188 - consul
189 - voltha
190 links:
191 - consul
192 - fluentd
193 environment:
194 SERVICE_8881_NAME: "chameleon-rest"
195 volumes:
196 - "/var/run/docker.sock:/tmp/docker.sock"
197 #
198 # ofagent server instance
199 #
200 ofagent:
201 image: cord/ofagent
202 command: [
203 "/ofagent/ofagent/main.py",
204 "-v",
205 "--consul=${DOCKER_HOST_IP}:8500",
206 "--fluentd=fluentd:24224",
207 "--controller=${DOCKER_HOST_IP}:6653",
208 "--grpc-endpoint=@voltha-grpc",
209 "--instance-id-is-container-name",
210 "-v"
211 ]
212 depends_on:
213 - consul
214 - voltha
215 links:
216 - consul
217 - fluentd
218 volumes:
219 - "/var/run/docker.sock:/tmp/docker.sock"
220 restart: unless-stopped
221
222 #
223 # Netconf server instance(s)
224 #
225 netconf:
226 image: cord/netconf
227 privileged: true
228 command: [
229 "/netconf/netconf/main.py",
230 "-v",
231 "--consul=${DOCKER_HOST_IP}:8500",
232 "--fluentd=fluentd:24224",
233 "--grpc-endpoint=@voltha-grpc",
234 "--instance-id-is-container-name",
235 "-v"
236 ]
237 ports:
238 - "830:1830"
239 depends_on:
240 - consul
241 - voltha
242 links:
243 - consul
244 - fluentd
245 environment:
246 SERVICE_1830_NAME: "netconf-server"
247 volumes:
248 - "/var/run/docker.sock:/tmp/docker.sock"
249
250 #
251 # Dashboard daemon
252 #
253 dashd:
254 image: cord/dashd
255 command: [
256 "/dashd/dashd/main.py",
257 "--kafka=@kafka",
258 "--consul=${DOCKER_HOST_IP}:8500",
259 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api",
260 "--topic=voltha.kpis",
261 "--docker_host=${DOCKER_HOST_IP}"
262 ]
263 depends_on:
264 - consul
265 - kafka
266 - grafana
267 restart: unless-stopped
268
269 #
270 # Nginx service consolidation
271 #
272 nginx:
273 image: voltha/nginx
274 ports:
275 - "80:80"
276 environment:
277 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
278 command: [
279 "/nginx_config/start_service.sh"
280 ]
281 depends_on:
282 - consul
283 - grafana
284 - chameleon
285 - portainer
286 restart: unless-stopped
287 volumes:
schowdhurya260f5b2017-06-14 15:54:25 -0700288 - "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config"
schowdhury33763f42017-06-09 02:05:42 -0700289
290 #
291 # Docker ui
292 #
293 portainer:
294 image: voltha/portainer
295 ports:
296 - "9000:9000"
297 environment:
298 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
299 restart: unless-stopped
300 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
301 volumes:
302 - "/var/run/docker.sock:/var/run/docker.sock"
303
304networks:
305 default:
306 driver: bridge
307 ponmgmt:
308 driver: bridge
309 driver_opts:
310 com.docker.network.bridge.name: "ponmgmt"