blob: d5c466e380d0b79cfb7830bd9f988de4b3d83fa7 [file] [log] [blame]
schowdhury33763f42017-06-09 02:05:42 -07001version: '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"
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. Bainbridge737b74f2018-01-22 12:57:52 -080016 image: "${REGISTRY}wurstmeister/kafka: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:
Jonathan Hart87314cd2018-02-12 17:15:35 -080026 - vconsul
schowdhury33763f42017-06-09 02:05:42 -070027 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}${REPOSITORY}voltha-consul${TAG}"
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. Bainbridge737b74f2018-01-22 12:57:52 -080049 image: "${REGISTRY}gliderlabs/registrator:latest"
schowdhury33763f42017-06-09 02:05:42 -070050 command: [
51 "-ip=${DOCKER_HOST_IP}",
52 "-retry-attempts", "100",
53 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080054 "consul-tls://vconsul:8501"
schowdhury33763f42017-06-09 02:05:42 -070055 ]
56 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080057 - vconsul
schowdhury33763f42017-06-09 02:05:42 -070058 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. Bainbridge09104892018-01-24 12:27:33 -080069 image: "${REGISTRY}fluent/fluentd:v0.12.42"
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. Bainbridge737b74f2018-01-22 12:57:52 -080082 image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
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. Bainbridge737b74f2018-01-22 12:57:52 -0800101 image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
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:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800110 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700111 - kafka
112 - grafana
113 restart: unless-stopped
114
115 #
116 # Voltha server instance(s)
117 #
118 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800119 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500120 logging:
121 driver: "json-file"
122 options:
123 max-size: "10m"
124 max-file: "3"
schowdhury33763f42017-06-09 02:05:42 -0700125 command: [
126 "/voltha/voltha/main.py",
127 "-v",
128 "--consul=${DOCKER_HOST_IP}:8500",
schowdhury33763f42017-06-09 02:05:42 -0700129 "--rest-port=8880",
130 "--grpc-port=50555",
131 "--kafka=@kafka",
132 "--instance-id-is-container-name",
133 "--interface=eth1",
134 "-v"
135 ]
136 ports:
137 - 8880
138 - 50555
139 - 18880
140 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800141 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700142 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800143 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700144 environment:
145 SERVICE_8880_NAME: "voltha-health"
146 SERVICE_8880_CHECK_HTTP: "/health"
147 SERVICE_8880_CHECK_INTERVAL: "5s"
148 SERVICE_8880_CHECK_TIMEOUT: "1s"
149 SERVICE_50555_NAME: "voltha-grpc"
150 SERVICE_18880_NAME: "voltha-sim-rest"
151 volumes:
152 - "/var/run/docker.sock:/tmp/docker.sock"
153 networks:
154 - default
155 - ponmgmt
156
157 #
158 # Voltha cli container
159 #
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800160 cli:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800161 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
Richard Jankowski29dd1982017-06-28 13:30:18 -0400162 command: [
163 "/cli/cli/setup.sh",
164 "-L"
165 ]
schowdhury33763f42017-06-09 02:05:42 -0700166 environment:
167 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
168 ports:
169 - "5022:22"
170 depends_on:
171 - voltha
172
173#############################################
174# Item below this line will soon be removed.#
175#############################################
176
177 #
schowdhury33763f42017-06-09 02:05:42 -0700178 # ofagent server instance
179 #
180 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800181 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500182 logging:
183 driver: "json-file"
184 options:
185 max-size: "10m"
186 max-file: "3"
schowdhury33763f42017-06-09 02:05:42 -0700187 command: [
188 "/ofagent/ofagent/main.py",
189 "-v",
190 "--consul=${DOCKER_HOST_IP}:8500",
schowdhury33763f42017-06-09 02:05:42 -0700191 "--controller=${DOCKER_HOST_IP}:6653",
192 "--grpc-endpoint=@voltha-grpc",
193 "--instance-id-is-container-name",
194 "-v"
195 ]
196 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800197 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700198 - voltha
199 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800200 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700201 volumes:
202 - "/var/run/docker.sock:/tmp/docker.sock"
203 restart: unless-stopped
204
205 #
206 # Netconf server instance(s)
207 #
208 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800209 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500210 logging:
211 driver: "json-file"
212 options:
213 max-size: "10m"
214 max-file: "3"
schowdhury33763f42017-06-09 02:05:42 -0700215 privileged: true
216 command: [
217 "/netconf/netconf/main.py",
218 "-v",
219 "--consul=${DOCKER_HOST_IP}:8500",
schowdhury33763f42017-06-09 02:05:42 -0700220 "--grpc-endpoint=@voltha-grpc",
221 "--instance-id-is-container-name",
222 "-v"
223 ]
224 ports:
225 - "830:1830"
226 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800227 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700228 - voltha
229 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800230 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700231 environment:
232 SERVICE_1830_NAME: "netconf-server"
233 volumes:
234 - "/var/run/docker.sock:/tmp/docker.sock"
235
236 #
237 # Dashboard daemon
238 #
239 dashd:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800240 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
schowdhury33763f42017-06-09 02:05:42 -0700241 command: [
242 "/dashd/dashd/main.py",
243 "--kafka=@kafka",
244 "--consul=${DOCKER_HOST_IP}:8500",
245 "--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api",
246 "--topic=voltha.kpis",
247 "--docker_host=${DOCKER_HOST_IP}"
248 ]
249 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800250 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700251 - kafka
252 - grafana
253 restart: unless-stopped
254
255 #
256 # Nginx service consolidation
257 #
258 nginx:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800259 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
schowdhury33763f42017-06-09 02:05:42 -0700260 ports:
261 - "80:80"
262 environment:
263 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
264 command: [
265 "/nginx_config/start_service.sh"
266 ]
267 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800268 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700269 - grafana
schowdhury33763f42017-06-09 02:05:42 -0700270 - portainer
271 restart: unless-stopped
272 volumes:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800273 - "/vagrant/nginx_config:/nginx_config"
274 #- "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config"
schowdhury33763f42017-06-09 02:05:42 -0700275
276 #
277 # Docker ui
278 #
279 portainer:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800280 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
schowdhury33763f42017-06-09 02:05:42 -0700281 ports:
282 - "9000:9000"
283 environment:
284 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
285 restart: unless-stopped
286 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
287 volumes:
288 - "/var/run/docker.sock:/var/run/docker.sock"
289
290networks:
291 default:
292 driver: bridge
293 ponmgmt:
294 driver: bridge
295 driver_opts:
296 com.docker.network.bridge.name: "ponmgmt"