blob: 37f8237fab3daaee8924f41fc51e4af7c2890c30 [file] [log] [blame]
Richard Jankowski8b277c22017-12-19 09:49:27 -05001version: '2'
2services:
3 #
4 # Single-node zookeeper service
5 #
6 zookeeper:
David K. Bainbridge737b74f2018-01-22 12:57:52 -08007 image: "${REGISTRY}wurstmeister/zookeeper:latest"
Richard Jankowski8b277c22017-12-19 09:49:27 -05008 ports:
9 - 2181
10 environment:
11 SERVICE_2181_NAME: "zookeeper"
12 #
13 # Single-node kafka service
14 #
15 kafka:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080016 image: "${REGISTRY}wurstmeister/kafka:latest"
Richard Jankowski8b277c22017-12-19 09:49:27 -050017 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:
Jonathan Hart87314cd2018-02-12 17:15:35 -080026 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -050027 volumes:
28 - /var/run/docker.sock:/var/run/docker.sock
29 #
30 # Single-node consul agent
31 #
Jonathan Hart87314cd2018-02-12 17:15:35 -080032 vconsul:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080033 image: "${REGISTRY}consul:0.9.2"
Richard Jankowski8b277c22017-12-19 09:49:27 -050034 command: agent -server -bootstrap -client 0.0.0.0 -ui
35 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"
45 #
46 # Single-node etcd server
47 #
48 etcd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080049 image: "quay.io/coreos/etcd:v3.2.9"
Richard Jankowski8b277c22017-12-19 09:49:27 -050050 command: [
51 "etcd",
52 "--name=etcd0",
53 "--advertise-client-urls=http://${DOCKER_HOST_IP}:2379,http://${DOCKER_HOST_IP}:4001",
54 "--listen-client-urls=http://0.0.0.0:2379,http://0.0.0.0:4001",
55 "--initial-advertise-peer-urls=http://${DOCKER_HOST_IP}:2380",
56 "--listen-peer-urls=http://0.0.0.0:2380",
57 "--initial-cluster-token=etcd-cluster-1",
58 "--initial-cluster=etcd0=http://${DOCKER_HOST_IP}:2380",
59 "--initial-cluster-state=new"
60 ]
61 ports:
62 - "2379:2379"
63 - 2380
64 - 4001
65 #
66 # Registrator
67 #
68 registrator:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080069 image: "${REGISTRY}gliderlabs/registrator:latest"
Richard Jankowski8b277c22017-12-19 09:49:27 -050070 command: [
71 "-ip=${DOCKER_HOST_IP}",
72 "-retry-attempts", "100",
73 "-cleanup",
74 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080075 "consul://vconsul:8500"
Richard Jankowski8b277c22017-12-19 09:49:27 -050076 ]
77 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080078 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -050079 volumes:
80 - "/var/run/docker.sock:/tmp/docker.sock"
81
82 #
83 # Fluentd log server
84 #
85 fluentd:
David K. Bainbridge09104892018-01-24 12:27:33 -080086 image: "${REGISTRY}fluent/fluentd:v0.12.42"
Richard Jankowski8b277c22017-12-19 09:49:27 -050087 ports:
88 - "24224:24224"
89 volumes:
90 - "/tmp/fluentd:/fluentd/log"
91 environment:
92 SERVICE_24224_NAME: "fluentd-intake"
93
94 #
95 # Graphite-Grafana-statsd service instance
96 # (demo place-holder for external KPI system)
97 #
98 grafana:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080099 image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500100 ports:
101 - "8883:80"
102 - "2003:2003"
103 - "2004:2004"
104 - "8126:8126"
105 - "8125:8125/udp"
106 environment:
107 SERVICE_80_NAME: "grafana-web-ui"
108 SERVICE_2003_NAME: "carbon-plain-text-intake"
109 SERVICE_2004_NAME: "carbon-pickle-intake"
110 SERVICE_8126_NAME: "statsd-tcp-intake"
111 SERVICE_8125_NAME: "statsd-udp-intake"
112 GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
113
114 #
115 # Shovel (Kafka-graphite-gateway)
116 #
117 shovel:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800118 image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500119 command: [
120 "/shovel/shovel/main.py",
121 "--kafka=@kafka",
122 "--consul=${DOCKER_HOST_IP}:8500",
123 "--topic=voltha.kpis",
124 "--host=${DOCKER_HOST_IP}"
125 ]
126 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800127 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500128 - kafka
129 - grafana
130 restart: unless-stopped
131
132 #
133 # Voltha server instance(s)
134 #
135 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800136 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500137 logging:
138 driver: "json-file"
139 options:
140 max-size: "10m"
141 max-file: "3"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500142 command: [
143 "/voltha/voltha/main.py",
144 "-v",
145 "--consul=${DOCKER_HOST_IP}:8500",
146 "--etcd=${DOCKER_HOST_IP}:2379",
Richard Jankowski8b277c22017-12-19 09:49:27 -0500147 "--rest-port=8880",
148 "--grpc-port=50556",
149 "--kafka=@kafka",
150 "--instance-id-is-container-name",
151 "--interface=eth1",
152 "--backend=etcd",
153 "-v"
154 ]
155 ports:
156 - 8880
157 - 50556
158 - 18880
159 - "60001:60001"
160 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800161 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500162 - etcd
163 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800164 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500165 - etcd
Richard Jankowski8b277c22017-12-19 09:49:27 -0500166 environment:
167 SERVICE_8880_NAME: "voltha-health"
168 SERVICE_8880_CHECK_HTTP: "/health"
169 SERVICE_8880_CHECK_INTERVAL: "5s"
170 SERVICE_8880_CHECK_TIMEOUT: "1s"
171 SERVICE_18880_NAME: "voltha-sim-rest"
172 SERVICE_HOST_IP: "${DOCKER_HOST_IP}"
173 volumes:
174 - "/var/run/docker.sock:/tmp/docker.sock"
175 networks:
176 - default
177 - ponmgmt
178
179 envoy:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800180 image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500181 entrypoint:
182 - /usr/local/bin/envoyd
183 - -envoy-cfg-template
184 - "/envoy/voltha-grpc-proxy.template.json"
185 - -envoy-config
186 - "/envoy/voltha-grpc-proxy.json"
187 - -kv
188 - "etcd"
189 - -kv-svc-name
190 - "etcd"
191 - -kv-port
192 - "2379"
193
194
195 ports:
196 - "50555:50555"
197 - "8882:8882"
198 - "8443:8443"
199 - "8001:8001"
200 environment:
201 SERVICE_50555_NAME: "voltha-grpc"
202 volumes:
203 - "/var/run/docker.sock:/tmp/docker.sock"
204 networks:
205 - default
206 - ponmgmt
207 links:
208 - voltha:vcore
209 #
210 # Voltha cli container
211 #
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800212 cli:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800213 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500214 command: [
215 "/cli/cli/setup.sh",
216 "-L",
217 "-G"
218 ]
219 environment:
220 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
221 ports:
222 - "5022:22"
223 depends_on:
224 - voltha
225
226#############################################
227# Item below this line will soon be removed.#
228#############################################
229
230 #
231 # ofagent server instance
232 #
233 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800234 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500235 logging:
236 driver: "json-file"
237 options:
238 max-size: "10m"
239 max-file: "3"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500240 command: [
241 "/ofagent/ofagent/main.py",
242 "-v",
243 "--consul=${DOCKER_HOST_IP}:8500",
Richard Jankowski8b277c22017-12-19 09:49:27 -0500244 "--controller=${DOCKER_HOST_IP}:6653",
245 "--grpc-endpoint=@voltha-grpc",
246 "--instance-id-is-container-name",
247 "--enable-tls",
248 "--key-file=/ofagent/pki/voltha.key",
249 "--cert-file=/ofagent/pki/voltha.crt",
250 "-v"
251 ]
252 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800253 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500254 - voltha
255 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800256 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500257 volumes:
258 - "/var/run/docker.sock:/tmp/docker.sock"
259 restart: unless-stopped
260
261 #
262 # Netconf server instance(s)
263 #
264 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800265 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500266 logging:
267 driver: "json-file"
268 options:
269 max-size: "10m"
270 max-file: "3"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500271 privileged: true
272 command: [
273 "/netconf/netconf/main.py",
274 "-v",
275 "--consul=${DOCKER_HOST_IP}:8500",
Richard Jankowski8b277c22017-12-19 09:49:27 -0500276 "--grpc-endpoint=@voltha-grpc",
277 "--instance-id-is-container-name",
278 "-v"
279 ]
280 ports:
281 - "830:1830"
282 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800283 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500284 - voltha
285 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800286 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500287 environment:
288 SERVICE_1830_NAME: "netconf-server"
289 volumes:
290 - "/var/run/docker.sock:/tmp/docker.sock"
291
292 #
293 # Dashboard daemon
294 #
295 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800296 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500297 command: [
298 "/dashd/dashd/main.py",
299 "--kafka=@kafka",
300 "--consul=${DOCKER_HOST_IP}:8500",
301 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8883/api",
302 "--topic=voltha.kpis",
303 "--docker_host=${DOCKER_HOST_IP}"
304 ]
305 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800306 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500307 - kafka
308 - grafana
309 restart: unless-stopped
310
311 #
312 # Nginx service consolidation
313 #
314 nginx:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800315 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500316 ports:
317 - "80:80"
318 environment:
319 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
320 command: [
321 "/nginx_config/start_service.sh"
322 ]
323 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800324 - vconsul
Richard Jankowski8b277c22017-12-19 09:49:27 -0500325 - grafana
326 - portainer
327 restart: unless-stopped
328
329 #
330 # Docker ui
331 #
332 portainer:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800333 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
Richard Jankowski8b277c22017-12-19 09:49:27 -0500334 ports:
335 - "9000:9000"
336 environment:
337 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
338 restart: unless-stopped
339 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
340 volumes:
341 - "/var/run/docker.sock:/var/run/docker.sock"
342
343networks:
344 default:
345 driver: bridge
346 ponmgmt:
347 driver: bridge
348 driver_opts:
349 com.docker.network.bridge.name: "ponmgmt"