blob: b46e0bda3ff1c91c8cecf620c52572aa88d02675 [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.
schowdhury33763f42017-06-09 02:05:42 -070014version: '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"
schowdhury33763f42017-06-09 02:05:42 -070021 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"
schowdhury33763f42017-06-09 02:05:42 -070030 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
schowdhury33763f42017-06-09 02:05:42 -070040 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}${REPOSITORY}voltha-consul${TAG}"
schowdhurya260f5b2017-06-14 15:54:25 -070047 command: agent -server -bootstrap -client 0.0.0.0 -ui
schowdhury33763f42017-06-09 02:05:42 -070048 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"
schowdhury33763f42017-06-09 02:05:42 -070058 #
59 # Registrator
60 #
61 registrator:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080062 image: "${REGISTRY}gliderlabs/registrator:latest"
schowdhury33763f42017-06-09 02:05:42 -070063 command: [
64 "-ip=${DOCKER_HOST_IP}",
65 "-retry-attempts", "100",
66 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080067 "consul-tls://vconsul:8501"
schowdhury33763f42017-06-09 02:05:42 -070068 ]
69 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080070 - vconsul
schowdhury33763f42017-06-09 02:05:42 -070071 volumes:
72 - "/var/run/docker.sock:/tmp/docker.sock"
schowdhury33763f42017-06-09 02:05:42 -070073 environment:
74 CONSUL_CACERT: "/reg/config/voltha-CA-template.pem"
schowdhurya260f5b2017-06-14 15:54:25 -070075 CONSUL_CLIENT_CERT: "/reg/config/voltha-cert-template.crt"
76 CONSUL_CLIENT_KEY: "/reg/config/voltha-pvt-template.key"
schowdhury33763f42017-06-09 02:05:42 -070077
78 #
79 # Fluentd log server
80 #
81 fluentd:
David K. Bainbridge09104892018-01-24 12:27:33 -080082 image: "${REGISTRY}fluent/fluentd:v0.12.42"
schowdhury33763f42017-06-09 02:05:42 -070083 ports:
84 - "24224:24224"
85 volumes:
86 - "/tmp/fluentd:/fluentd/log"
87 environment:
88 SERVICE_24224_NAME: "fluentd-intake"
89
90 #
91 # Graphite-Grafana-statsd service instance
92 # (demo place-holder for external KPI system)
93 #
94 grafana:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080095 image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
schowdhury33763f42017-06-09 02:05:42 -070096 ports:
97 - "8882:80"
98 - "2003:2003"
99 - "2004:2004"
100 - "8126:8126"
101 - "8125:8125/udp"
102 environment:
103 SERVICE_80_NAME: "grafana-web-ui"
104 SERVICE_2003_NAME: "carbon-plain-text-intake"
105 SERVICE_2004_NAME: "carbon-pickle-intake"
106 SERVICE_8126_NAME: "statsd-tcp-intake"
107 SERVICE_8125_NAME: "statsd-udp-intake"
108 GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
109
110 #
111 # Shovel (Kafka-graphite-gateway)
112 #
113 shovel:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800114 image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
schowdhury33763f42017-06-09 02:05:42 -0700115 command: [
116 "/shovel/shovel/main.py",
117 "--kafka=@kafka",
118 "--consul=${DOCKER_HOST_IP}:8500",
119 "--topic=voltha.kpis",
120 "--host=${DOCKER_HOST_IP}"
121 ]
122 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800123 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700124 - kafka
125 - grafana
126 restart: unless-stopped
127
128 #
129 # Voltha server instance(s)
130 #
131 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800132 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500133 logging:
134 driver: "json-file"
135 options:
136 max-size: "10m"
137 max-file: "3"
schowdhury33763f42017-06-09 02:05:42 -0700138 command: [
139 "/voltha/voltha/main.py",
140 "-v",
141 "--consul=${DOCKER_HOST_IP}:8500",
schowdhury33763f42017-06-09 02:05:42 -0700142 "--rest-port=8880",
143 "--grpc-port=50555",
144 "--kafka=@kafka",
145 "--instance-id-is-container-name",
146 "--interface=eth1",
147 "-v"
148 ]
149 ports:
150 - 8880
151 - 50555
152 - 18880
153 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800154 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700155 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800156 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700157 environment:
158 SERVICE_8880_NAME: "voltha-health"
159 SERVICE_8880_CHECK_HTTP: "/health"
160 SERVICE_8880_CHECK_INTERVAL: "5s"
161 SERVICE_8880_CHECK_TIMEOUT: "1s"
162 SERVICE_50555_NAME: "voltha-grpc"
163 SERVICE_18880_NAME: "voltha-sim-rest"
164 volumes:
165 - "/var/run/docker.sock:/tmp/docker.sock"
166 networks:
167 - default
168 - ponmgmt
169
170 #
171 # Voltha cli container
172 #
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800173 cli:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800174 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
Richard Jankowski29dd1982017-06-28 13:30:18 -0400175 command: [
176 "/cli/cli/setup.sh",
177 "-L"
178 ]
schowdhury33763f42017-06-09 02:05:42 -0700179 environment:
180 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
181 ports:
182 - "5022:22"
183 depends_on:
184 - voltha
185
186#############################################
187# Item below this line will soon be removed.#
188#############################################
189
190 #
schowdhury33763f42017-06-09 02:05:42 -0700191 # ofagent server instance
192 #
193 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800194 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500195 logging:
196 driver: "json-file"
197 options:
198 max-size: "10m"
199 max-file: "3"
schowdhury33763f42017-06-09 02:05:42 -0700200 command: [
201 "/ofagent/ofagent/main.py",
202 "-v",
203 "--consul=${DOCKER_HOST_IP}:8500",
schowdhury33763f42017-06-09 02:05:42 -0700204 "--controller=${DOCKER_HOST_IP}:6653",
205 "--grpc-endpoint=@voltha-grpc",
206 "--instance-id-is-container-name",
207 "-v"
208 ]
209 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800210 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700211 - voltha
212 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800213 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700214 volumes:
215 - "/var/run/docker.sock:/tmp/docker.sock"
216 restart: unless-stopped
217
218 #
219 # Netconf server instance(s)
220 #
221 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800222 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500223 logging:
224 driver: "json-file"
225 options:
226 max-size: "10m"
227 max-file: "3"
schowdhury33763f42017-06-09 02:05:42 -0700228 privileged: true
229 command: [
230 "/netconf/netconf/main.py",
231 "-v",
232 "--consul=${DOCKER_HOST_IP}:8500",
schowdhury33763f42017-06-09 02:05:42 -0700233 "--grpc-endpoint=@voltha-grpc",
234 "--instance-id-is-container-name",
235 "-v"
236 ]
237 ports:
238 - "830:1830"
239 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800240 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700241 - voltha
242 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800243 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700244 environment:
245 SERVICE_1830_NAME: "netconf-server"
246 volumes:
247 - "/var/run/docker.sock:/tmp/docker.sock"
248
249 #
250 # Dashboard daemon
251 #
252 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800253 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
schowdhury33763f42017-06-09 02:05:42 -0700254 command: [
255 "/dashd/dashd/main.py",
256 "--kafka=@kafka",
257 "--consul=${DOCKER_HOST_IP}:8500",
258 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api",
259 "--topic=voltha.kpis",
260 "--docker_host=${DOCKER_HOST_IP}"
261 ]
262 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800263 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700264 - kafka
265 - grafana
266 restart: unless-stopped
267
268 #
269 # Nginx service consolidation
270 #
271 nginx:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800272 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
schowdhury33763f42017-06-09 02:05:42 -0700273 ports:
274 - "80:80"
275 environment:
276 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
277 command: [
278 "/nginx_config/start_service.sh"
279 ]
280 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800281 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700282 - grafana
schowdhury33763f42017-06-09 02:05:42 -0700283 - portainer
284 restart: unless-stopped
285 volumes:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800286 - "/vagrant/nginx_config:/nginx_config"
287 #- "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config"
schowdhury33763f42017-06-09 02:05:42 -0700288
289 #
290 # Docker ui
291 #
292 portainer:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800293 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
schowdhury33763f42017-06-09 02:05:42 -0700294 ports:
295 - "9000:9000"
296 environment:
297 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
298 restart: unless-stopped
299 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
300 volumes:
301 - "/var/run/docker.sock:/var/run/docker.sock"
302
303networks:
304 default:
305 driver: bridge
306 ponmgmt:
307 driver: bridge
308 driver_opts:
309 com.docker.network.bridge.name: "ponmgmt"