blob: 44e217c4669dc3ce15ef85b57b9a3f0823295175 [file] [log] [blame]
Richard Jankowski068bddb2017-12-19 09:49:27 -05001version: '2'
2services:
3 #
4 # Single-node zookeeper service
5 #
6 zookeeper:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -08007 image: "${REGISTRY}wurstmeister/zookeeper:latest"
Richard Jankowski068bddb2017-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. Bainbridge3d5b22d2018-01-22 12:57:52 -080016 image: "${REGISTRY}wurstmeister/kafka:latest"
Richard Jankowski068bddb2017-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 Hartd67db4a2018-02-12 17:15:35 -080026 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -050027 volumes:
28 - /var/run/docker.sock:/var/run/docker.sock
29 #
30 # Single-node consul agent
31 #
Jonathan Hartd67db4a2018-02-12 17:15:35 -080032 vconsul:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -080033 image: "${REGISTRY}consul:0.9.2"
Richard Jankowski068bddb2017-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. Bainbridge3d5b22d2018-01-22 12:57:52 -080049 image: "quay.io/coreos/etcd:v3.2.9"
Richard Jankowski068bddb2017-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. Bainbridge3d5b22d2018-01-22 12:57:52 -080069 image: "${REGISTRY}gliderlabs/registrator:latest"
Richard Jankowski068bddb2017-12-19 09:49:27 -050070 command: [
71 "-ip=${DOCKER_HOST_IP}",
72 "-retry-attempts", "100",
73 "-cleanup",
74 # "-internal",
Jonathan Hartd67db4a2018-02-12 17:15:35 -080075 "consul://vconsul:8500"
Richard Jankowski068bddb2017-12-19 09:49:27 -050076 ]
77 links:
Jonathan Hartd67db4a2018-02-12 17:15:35 -080078 - vconsul
Richard Jankowski068bddb2017-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. Bainbridge3d5b22d2018-01-22 12:57:52 -080086 image: "${REGISTRY}${REPOSITORY}voltha-fluentd${TAG}"
Richard Jankowski068bddb2017-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. Bainbridge3d5b22d2018-01-22 12:57:52 -080099 image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
Richard Jankowski068bddb2017-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. Bainbridge3d5b22d2018-01-22 12:57:52 -0800118 image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
Richard Jankowski068bddb2017-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 Hartd67db4a2018-02-12 17:15:35 -0800127 - vconsul
Richard Jankowski068bddb2017-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. Bainbridge3d5b22d2018-01-22 12:57:52 -0800136 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
Richard Jankowski068bddb2017-12-19 09:49:27 -0500137 command: [
138 "/voltha/voltha/main.py",
139 "-v",
140 "--consul=${DOCKER_HOST_IP}:8500",
141 "--etcd=${DOCKER_HOST_IP}:2379",
142 "--fluentd=fluentd:24224",
143 "--rest-port=8880",
144 "--grpc-port=50556",
145 "--kafka=@kafka",
146 "--instance-id-is-container-name",
147 "--interface=eth1",
148 "--backend=etcd",
149 "-v"
150 ]
151 ports:
152 - 8880
153 - 50556
154 - 18880
155 - "60001:60001"
156 depends_on:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800157 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -0500158 - etcd
159 links:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800160 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -0500161 - etcd
162 - fluentd
163 environment:
164 SERVICE_8880_NAME: "voltha-health"
165 SERVICE_8880_CHECK_HTTP: "/health"
166 SERVICE_8880_CHECK_INTERVAL: "5s"
167 SERVICE_8880_CHECK_TIMEOUT: "1s"
168 SERVICE_18880_NAME: "voltha-sim-rest"
169 SERVICE_HOST_IP: "${DOCKER_HOST_IP}"
170 volumes:
171 - "/var/run/docker.sock:/tmp/docker.sock"
172 networks:
173 - default
174 - ponmgmt
175
176 envoy:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800177 image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}"
Richard Jankowski068bddb2017-12-19 09:49:27 -0500178 entrypoint:
179 - /usr/local/bin/envoyd
180 - -envoy-cfg-template
181 - "/envoy/voltha-grpc-proxy.template.json"
182 - -envoy-config
183 - "/envoy/voltha-grpc-proxy.json"
184 - -kv
185 - "etcd"
186 - -kv-svc-name
187 - "etcd"
188 - -kv-port
189 - "2379"
190
191
192 ports:
193 - "50555:50555"
194 - "8882:8882"
195 - "8443:8443"
196 - "8001:8001"
197 environment:
198 SERVICE_50555_NAME: "voltha-grpc"
199 volumes:
200 - "/var/run/docker.sock:/tmp/docker.sock"
201 networks:
202 - default
203 - ponmgmt
204 links:
205 - voltha:vcore
206 #
207 # Voltha cli container
208 #
David K. Bainbridge12463052018-01-19 09:26:09 -0800209 cli:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800210 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
Richard Jankowski068bddb2017-12-19 09:49:27 -0500211 command: [
212 "/cli/cli/setup.sh",
213 "-L",
214 "-G"
215 ]
216 environment:
217 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
218 ports:
219 - "5022:22"
220 depends_on:
221 - voltha
222
223#############################################
224# Item below this line will soon be removed.#
225#############################################
226
227 #
228 # ofagent server instance
229 #
230 ofagent:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800231 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
Richard Jankowski068bddb2017-12-19 09:49:27 -0500232 command: [
233 "/ofagent/ofagent/main.py",
234 "-v",
235 "--consul=${DOCKER_HOST_IP}:8500",
236 "--fluentd=fluentd:24224",
237 "--controller=${DOCKER_HOST_IP}:6653",
238 "--grpc-endpoint=@voltha-grpc",
239 "--instance-id-is-container-name",
240 "--enable-tls",
241 "--key-file=/ofagent/pki/voltha.key",
242 "--cert-file=/ofagent/pki/voltha.crt",
243 "-v"
244 ]
245 depends_on:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800246 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -0500247 - voltha
248 links:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800249 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -0500250 - fluentd
251 volumes:
252 - "/var/run/docker.sock:/tmp/docker.sock"
253 restart: unless-stopped
254
255 #
256 # Netconf server instance(s)
257 #
258 netconf:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800259 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
Richard Jankowski068bddb2017-12-19 09:49:27 -0500260 privileged: true
261 command: [
262 "/netconf/netconf/main.py",
263 "-v",
264 "--consul=${DOCKER_HOST_IP}:8500",
265 "--fluentd=fluentd:24224",
266 "--grpc-endpoint=@voltha-grpc",
267 "--instance-id-is-container-name",
268 "-v"
269 ]
270 ports:
271 - "830:1830"
272 depends_on:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800273 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -0500274 - voltha
275 links:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800276 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -0500277 - fluentd
278 environment:
279 SERVICE_1830_NAME: "netconf-server"
280 volumes:
281 - "/var/run/docker.sock:/tmp/docker.sock"
282
283 #
284 # Dashboard daemon
285 #
286 dashd:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800287 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
Richard Jankowski068bddb2017-12-19 09:49:27 -0500288 command: [
289 "/dashd/dashd/main.py",
290 "--kafka=@kafka",
291 "--consul=${DOCKER_HOST_IP}:8500",
292 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8883/api",
293 "--topic=voltha.kpis",
294 "--docker_host=${DOCKER_HOST_IP}"
295 ]
296 depends_on:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800297 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -0500298 - kafka
299 - grafana
300 restart: unless-stopped
301
302 #
303 # Nginx service consolidation
304 #
305 nginx:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800306 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
Richard Jankowski068bddb2017-12-19 09:49:27 -0500307 ports:
308 - "80:80"
309 environment:
310 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
311 command: [
312 "/nginx_config/start_service.sh"
313 ]
314 depends_on:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800315 - vconsul
Richard Jankowski068bddb2017-12-19 09:49:27 -0500316 - grafana
317 - portainer
318 restart: unless-stopped
319
320 #
321 # Docker ui
322 #
323 portainer:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800324 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
Richard Jankowski068bddb2017-12-19 09:49:27 -0500325 ports:
326 - "9000:9000"
327 environment:
328 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
329 restart: unless-stopped
330 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
331 volumes:
332 - "/var/run/docker.sock:/var/run/docker.sock"
333
334networks:
335 default:
336 driver: bridge
337 ponmgmt:
338 driver: bridge
339 driver_opts:
340 com.docker.network.bridge.name: "ponmgmt"