blob: d88517abdd1d76aaa1f9d679ceb18f012dcf7862 [file] [log] [blame]
khenaidoo2a8c6332017-10-10 15:23:49 -04001version: '2'
2services:
3 #
4 # Single-node zookeeper service
5 #
6 zookeeper:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -08007 image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -04008 ports:
9 - 2181
10 environment:
11 SERVICE_2181_NAME: "zookeeper"
12 #
13 # Single-node kafka service
14 #
15 kafka:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080016 image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -040017 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:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080033 image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
khenaidoo2a8c6332017-10-10 15:23:49 -040034 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 # Registrator
47 #
48 registrator:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080049 image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -040050 command: [
51 "-ip=${DOCKER_HOST_IP}",
52 "-retry-attempts", "100",
53 "-cleanup",
54 # "-internal",
55 "consul://consul:8500"
56 ]
57 links:
58 - consul
59 volumes:
60 - "/var/run/docker.sock:/tmp/docker.sock"
61
62 #
63 # Fluentd log server
64 #
65 fluentd:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080066 image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -040067 ports:
68 - "24224:24224"
69 volumes:
70 - "/tmp/fluentd:/fluentd/log"
71 environment:
72 SERVICE_24224_NAME: "fluentd-intake"
73
74 #
75 # Graphite-Grafana-statsd service instance
76 # (demo place-holder for external KPI system)
77 #
78 grafana:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080079 image: "${REGISTRY}voltha/grafana:${TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -040080 ports:
81 - "8883:80"
82 - "2003:2003"
83 - "2004:2004"
84 - "8126:8126"
85 - "8125:8125/udp"
86 environment:
87 SERVICE_80_NAME: "grafana-web-ui"
88 SERVICE_2003_NAME: "carbon-plain-text-intake"
89 SERVICE_2004_NAME: "carbon-pickle-intake"
90 SERVICE_8126_NAME: "statsd-tcp-intake"
91 SERVICE_8125_NAME: "statsd-udp-intake"
92 GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
93
94 #
95 # Shovel (Kafka-graphite-gateway)
96 #
97 shovel:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -080098 image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -040099 command: [
100 "/shovel/shovel/main.py",
101 "--kafka=@kafka",
102 "--consul=${DOCKER_HOST_IP}:8500",
103 "--topic=voltha.kpis",
104 "--host=${DOCKER_HOST_IP}"
105 ]
106 depends_on:
107 - consul
108 - kafka
109 - grafana
110 restart: unless-stopped
111
112 #
113 # Voltha server instance(s)
114 #
115 voltha:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800116 image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -0400117 command: [
118 "/voltha/voltha/main.py",
119 "-v",
120 "--consul=${DOCKER_HOST_IP}:8500",
121 "--fluentd=fluentd:24224",
122 "--rest-port=8880",
123 "--grpc-port=50556",
124 "--kafka=@kafka",
125 "--instance-id-is-container-name",
126 "--interface=eth1",
127 "--backend=consul",
128 "-v"
129 ]
130 ports:
131 - 8880
132 - 50556
133 - 18880
134 depends_on:
135 - consul
136 links:
137 - consul
138 - fluentd
139 environment:
140 SERVICE_8880_NAME: "voltha-health"
141 SERVICE_8880_CHECK_HTTP: "/health"
142 SERVICE_8880_CHECK_INTERVAL: "5s"
143 SERVICE_8880_CHECK_TIMEOUT: "1s"
144 SERVICE_18880_NAME: "voltha-sim-rest"
145 SERVICE_HOST_IP: "${DOCKER_HOST_IP}"
146 SERVICE_50556_NAME: "vcore-grpc"
147 volumes:
148 - "/var/run/docker.sock:/tmp/docker.sock"
149 networks:
150 - default
151 - ponmgmt
152
153 envoy:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800154 image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -0400155 entrypoint:
156 - /usr/local/bin/envoyd
157 - -envoy-cfg-template
158 - "/envoy/voltha-grpc-proxy.template.json"
159 - -envoy-config
160 - "/envoy/voltha-grpc-proxy.json"
161 ports:
162 - "50555:50555"
163 - "8882:8882"
164 - "8443:8443"
165 - "8001:8001"
166 environment:
167 SERVICE_50555_NAME: "voltha-grpc"
168 volumes:
169 - "/var/run/docker.sock:/tmp/docker.sock"
170 networks:
171 - default
172 - ponmgmt
173 links:
174 - voltha:vcore
175 #
176 # Voltha cli container
177 #
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800178 cli:
179 image: "${REGISTRY}voltha/cli:${TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -0400180 command: [
181 "/cli/cli/setup.sh",
182 "-L",
183 "-G"
184 ]
185 environment:
186 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
187 ports:
188 - "5022:22"
189 depends_on:
190 - voltha
191
192#############################################
193# Item below this line will soon be removed.#
194#############################################
195
196 #
khenaidoo2a8c6332017-10-10 15:23:49 -0400197 # ofagent server instance
198 #
199 ofagent:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800200 image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -0400201 command: [
202 "/ofagent/ofagent/main.py",
203 "-v",
204 "--consul=${DOCKER_HOST_IP}:8500",
205 "--fluentd=fluentd:24224",
206 "--controller=${DOCKER_HOST_IP}:6653",
207 "--grpc-endpoint=@voltha-grpc",
208 "--instance-id-is-container-name",
209 "-v"
210 ]
211 depends_on:
212 - consul
213 - voltha
214 links:
215 - consul
216 - fluentd
217 volumes:
218 - "/var/run/docker.sock:/tmp/docker.sock"
219 restart: unless-stopped
220
221 #
222 # Netconf server instance(s)
223 #
224 netconf:
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800225 image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
khenaidoo2a8c6332017-10-10 15:23:49 -0400226 privileged: true
227 command: [
228 "/netconf/netconf/main.py",
229 "-v",
230 "--consul=${DOCKER_HOST_IP}:8500",
231 "--fluentd=fluentd:24224",
232 "--grpc-endpoint=@voltha-grpc",
233 "--instance-id-is-container-name",
234 "-v"
235 ]
236 ports:
237 - "830:1830"
238 depends_on:
239 - consul
240 - voltha
241 links:
242 - consul
243 - fluentd
244 environment:
245 SERVICE_1830_NAME: "netconf-server"
246 volumes:
247 - "/var/run/docker.sock:/tmp/docker.sock"
248
249
250
251networks:
252 default:
253 driver: bridge
254 ponmgmt:
255 driver: bridge
256 driver_opts:
257 com.docker.network.bridge.name: "ponmgmt"