blob: faafd1010567bc86a4ee1d602386eefdbf353572 [file] [log] [blame]
schowdhury33763f42017-06-09 02:05:42 -07001version: '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"
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. Bainbridge3d5b22d2018-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 Hartd67db4a2018-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 Hartd67db4a2018-02-12 17:15:35 -080032 vconsul:
David K. Bainbridge3d5b22d2018-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. Bainbridge3d5b22d2018-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 Hartd67db4a2018-02-12 17:15:35 -080054 "consul-tls://vconsul:8501"
schowdhury33763f42017-06-09 02:05:42 -070055 ]
56 links:
Jonathan Hartd67db4a2018-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. Bainbridge3d5b22d2018-01-22 12:57:52 -080069 image: "${REGISTRY}${REPOSITORY}voltha-fluentd${TAG}"
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. Bainbridge3d5b22d2018-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. Bainbridge3d5b22d2018-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 Hartd67db4a2018-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. Bainbridge3d5b22d2018-01-22 12:57:52 -0800119 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
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:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800137 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700138 links:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800139 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700140 - 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:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800158 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
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. Bainbridge3d5b22d2018-01-22 12:57:52 -0800178 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
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:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800190 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700191 - voltha
192 links:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800193 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700194 - 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. Bainbridge3d5b22d2018-01-22 12:57:52 -0800203 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
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:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800217 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700218 - voltha
219 links:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800220 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700221 - 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. Bainbridge3d5b22d2018-01-22 12:57:52 -0800231 image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
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:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800241 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700242 - kafka
243 - grafana
244 restart: unless-stopped
245
246 #
247 # Nginx service consolidation
248 #
249 nginx:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800250 image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
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:
Jonathan Hartd67db4a2018-02-12 17:15:35 -0800259 - vconsul
schowdhury33763f42017-06-09 02:05:42 -0700260 - grafana
schowdhury33763f42017-06-09 02:05:42 -0700261 - portainer
262 restart: unless-stopped
263 volumes:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800264 - "/vagrant/nginx_config:/nginx_config"
265 #- "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config"
schowdhury33763f42017-06-09 02:05:42 -0700266
267 #
268 # Docker ui
269 #
270 portainer:
David K. Bainbridge3d5b22d2018-01-22 12:57:52 -0800271 image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
schowdhury33763f42017-06-09 02:05:42 -0700272 ports:
273 - "9000:9000"
274 environment:
275 CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
276 restart: unless-stopped
277 entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
278 volumes:
279 - "/var/run/docker.sock:/var/run/docker.sock"
280
281networks:
282 default:
283 driver: bridge
284 ponmgmt:
285 driver: bridge
286 driver_opts:
287 com.docker.network.bridge.name: "ponmgmt"