blob: aff19ca0a8633ba67460b2ec6bf175413204f827 [file] [log] [blame]
schowdhury33763f42017-06-09 02:05:42 -07001version: '2'
2services:
3 #
4 # Single-node zookeeper service
5 #
6 zookeeper:
David K. Bainbridge12463052018-01-19 09:26:09 -08007 image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -07008 ports:
9 - 2181
10 environment:
11 SERVICE_2181_NAME: "zookeeper"
12 #
13 # Single-node kafka service
14 #
15 kafka:
David K. Bainbridge12463052018-01-19 09:26:09 -080016 image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -070017 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. Bainbridge12463052018-01-19 09:26:09 -080033 image: "${REGISTRY}voltha/consul:${CONSUL_TAG:-0.9.2}"
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:
David K. Bainbridge12463052018-01-19 09:26:09 -080049 image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
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:
David K. Bainbridge12463052018-01-19 09:26:09 -080069 image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -070070 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:
David K. Bainbridge12463052018-01-19 09:26:09 -080082 image: "${REGISTRY}voltha/grafana:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -070083 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:
David K. Bainbridge12463052018-01-19 09:26:09 -0800101 image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -0700102 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:
David K. Bainbridge12463052018-01-19 09:26:09 -0800119 image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -0700120 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 #
David K. Bainbridge12463052018-01-19 09:26:09 -0800157 cli:
158 image: "${REGISTRY}voltha/cli:${TAG:-latest}"
Richard Jankowski29dd1982017-06-28 13:30:18 -0400159 command: [
160 "/cli/cli/setup.sh",
161 "-L"
162 ]
schowdhury33763f42017-06-09 02:05:42 -0700163 environment:
164 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
165 ports:
166 - "5022:22"
167 depends_on:
168 - voltha
169
170#############################################
171# Item below this line will soon be removed.#
172#############################################
173
174 #
schowdhury33763f42017-06-09 02:05:42 -0700175 # ofagent server instance
176 #
177 ofagent:
David K. Bainbridge12463052018-01-19 09:26:09 -0800178 image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -0700179 command: [
180 "/ofagent/ofagent/main.py",
181 "-v",
182 "--consul=${DOCKER_HOST_IP}:8500",
183 "--fluentd=fluentd:24224",
184 "--controller=${DOCKER_HOST_IP}:6653",
185 "--grpc-endpoint=@voltha-grpc",
186 "--instance-id-is-container-name",
187 "-v"
188 ]
189 depends_on:
190 - consul
191 - voltha
192 links:
193 - consul
194 - fluentd
195 volumes:
196 - "/var/run/docker.sock:/tmp/docker.sock"
197 restart: unless-stopped
198
199 #
200 # Netconf server instance(s)
201 #
202 netconf:
David K. Bainbridge12463052018-01-19 09:26:09 -0800203 image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -0700204 privileged: true
205 command: [
206 "/netconf/netconf/main.py",
207 "-v",
208 "--consul=${DOCKER_HOST_IP}:8500",
209 "--fluentd=fluentd:24224",
210 "--grpc-endpoint=@voltha-grpc",
211 "--instance-id-is-container-name",
212 "-v"
213 ]
214 ports:
215 - "830:1830"
216 depends_on:
217 - consul
218 - voltha
219 links:
220 - consul
221 - fluentd
222 environment:
223 SERVICE_1830_NAME: "netconf-server"
224 volumes:
225 - "/var/run/docker.sock:/tmp/docker.sock"
226
227 #
228 # Dashboard daemon
229 #
230 dashd:
David K. Bainbridge12463052018-01-19 09:26:09 -0800231 image: "${REGISTRY}voltha/dashd:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -0700232 command: [
233 "/dashd/dashd/main.py",
234 "--kafka=@kafka",
235 "--consul=${DOCKER_HOST_IP}:8500",
236 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api",
237 "--topic=voltha.kpis",
238 "--docker_host=${DOCKER_HOST_IP}"
239 ]
240 depends_on:
241 - consul
242 - kafka
243 - grafana
244 restart: unless-stopped
245
246 #
247 # Nginx service consolidation
248 #
249 nginx:
David K. Bainbridge12463052018-01-19 09:26:09 -0800250 image: "${REGISTRY}voltha/nginx:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -0700251 ports:
252 - "80:80"
253 environment:
254 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
255 command: [
256 "/nginx_config/start_service.sh"
257 ]
258 depends_on:
259 - consul
260 - grafana
schowdhury33763f42017-06-09 02:05:42 -0700261 - portainer
262 restart: unless-stopped
263 volumes:
schowdhurya260f5b2017-06-14 15:54:25 -0700264 - "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config"
schowdhury33763f42017-06-09 02:05:42 -0700265
266 #
267 # Docker ui
268 #
269 portainer:
David K. Bainbridge12463052018-01-19 09:26:09 -0800270 image: "${REGISTRY}voltha/portainer:${TAG:-latest}"
schowdhury33763f42017-06-09 02:05:42 -0700271 ports:
272 - "9000:9000"
273 environment:
274 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
275 restart: unless-stopped
276 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
277 volumes:
278 - "/var/run/docker.sock:/var/run/docker.sock"
279
280networks:
281 default:
282 driver: bridge
283 ponmgmt:
284 driver: bridge
285 driver_opts:
286 com.docker.network.bridge.name: "ponmgmt"