blob: 8ca7c13727f2eb9d3e290ac1f08cd999a73347de [file] [log] [blame]
Zack Williams41513bf2018-07-07 20:08:35 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
khenaidoo2a8c6332017-10-10 15:23:49 -040014version: '2'
15services:
16 #
17 # Single-node zookeeper service
18 #
19 zookeeper:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080020 image: "${REGISTRY}wurstmeister/zookeeper:latest"
khenaidoo2a8c6332017-10-10 15:23:49 -040021 ports:
22 - 2181
23 environment:
24 SERVICE_2181_NAME: "zookeeper"
25 #
26 # Single-node kafka service
27 #
28 kafka:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080029 image: "${REGISTRY}wurstmeister/kafka:latest"
khenaidoo2a8c6332017-10-10 15:23:49 -040030 ports:
31 - 9092
32 environment:
33 KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP}
34 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
35 KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
36 KAFKA_HEAP_OPTS: "-Xmx256M -Xms128M"
37 SERVICE_9092_NAME: "kafka"
38 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -080039 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -040040 volumes:
41 - /var/run/docker.sock:/var/run/docker.sock
42 #
43 # Single-node consul agent
44 #
Jonathan Hart87314cd2018-02-12 17:15:35 -080045 vconsul:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080046 image: "${REGISTRY}consul:0.9.2"
khenaidoo2a8c6332017-10-10 15:23:49 -040047 command: agent -server -bootstrap -client 0.0.0.0 -ui
48 ports:
49 - "8300:8300"
50 - "8400:8400"
51 - "8500:8500"
52 - "8600:8600/udp"
53 environment:
54 #SERVICE_53_IGNORE: "yes"
55 SERVICE_8300_IGNORE: "yes"
56 SERVICE_8400_IGNORE: "yes"
57 SERVICE_8500_NAME: "consul-rest"
58 #
59 # Registrator
60 #
61 registrator:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080062 image: "${REGISTRY}gliderlabs/registrator:latest"
khenaidoo2a8c6332017-10-10 15:23:49 -040063 command: [
64 "-ip=${DOCKER_HOST_IP}",
65 "-retry-attempts", "100",
66 "-cleanup",
67 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080068 "consul://vconsul:8500"
khenaidoo2a8c6332017-10-10 15:23:49 -040069 ]
70 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080071 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -040072 volumes:
73 - "/var/run/docker.sock:/tmp/docker.sock"
74
75 #
76 # Fluentd log server
77 #
78 fluentd:
David K. Bainbridge09104892018-01-24 12:27:33 -080079 image: "${REGISTRY}fluent/fluentd:v0.12.42"
khenaidoo2a8c6332017-10-10 15:23:49 -040080 ports:
81 - "24224:24224"
82 volumes:
83 - "/tmp/fluentd:/fluentd/log"
84 environment:
85 SERVICE_24224_NAME: "fluentd-intake"
86
87 #
88 # Graphite-Grafana-statsd service instance
89 # (demo place-holder for external KPI system)
90 #
91 grafana:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080092 image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
khenaidoo2a8c6332017-10-10 15:23:49 -040093 ports:
94 - "8883:80"
95 - "2003:2003"
96 - "2004:2004"
97 - "8126:8126"
98 - "8125:8125/udp"
99 environment:
100 SERVICE_80_NAME: "grafana-web-ui"
101 SERVICE_2003_NAME: "carbon-plain-text-intake"
102 SERVICE_2004_NAME: "carbon-pickle-intake"
103 SERVICE_8126_NAME: "statsd-tcp-intake"
104 SERVICE_8125_NAME: "statsd-udp-intake"
105 GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
106
107 #
108 # Shovel (Kafka-graphite-gateway)
109 #
110 shovel:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800111 image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
khenaidoo2a8c6332017-10-10 15:23:49 -0400112 command: [
113 "/shovel/shovel/main.py",
114 "--kafka=@kafka",
115 "--consul=${DOCKER_HOST_IP}:8500",
116 "--topic=voltha.kpis",
117 "--host=${DOCKER_HOST_IP}"
118 ]
119 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800120 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -0400121 - kafka
122 - grafana
123 restart: unless-stopped
124
125 #
126 # Voltha server instance(s)
127 #
128 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800129 image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500130 logging:
131 driver: "json-file"
132 options:
133 max-size: "10m"
134 max-file: "3"
khenaidoo2a8c6332017-10-10 15:23:49 -0400135 command: [
136 "/voltha/voltha/main.py",
137 "-v",
138 "--consul=${DOCKER_HOST_IP}:8500",
khenaidoo2a8c6332017-10-10 15:23:49 -0400139 "--rest-port=8880",
140 "--grpc-port=50556",
141 "--kafka=@kafka",
142 "--instance-id-is-container-name",
143 "--interface=eth1",
144 "--backend=consul",
145 "-v"
146 ]
147 ports:
148 - 8880
149 - 50556
150 - 18880
151 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800152 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -0400153 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800154 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -0400155 environment:
156 SERVICE_8880_NAME: "voltha-health"
157 SERVICE_8880_CHECK_HTTP: "/health"
158 SERVICE_8880_CHECK_INTERVAL: "5s"
159 SERVICE_8880_CHECK_TIMEOUT: "1s"
160 SERVICE_18880_NAME: "voltha-sim-rest"
161 SERVICE_HOST_IP: "${DOCKER_HOST_IP}"
162 SERVICE_50556_NAME: "vcore-grpc"
163 volumes:
164 - "/var/run/docker.sock:/tmp/docker.sock"
165 networks:
166 - default
167 - ponmgmt
168
169 envoy:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800170 image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}"
khenaidoo2a8c6332017-10-10 15:23:49 -0400171 entrypoint:
172 - /usr/local/bin/envoyd
173 - -envoy-cfg-template
174 - "/envoy/voltha-grpc-proxy.template.json"
175 - -envoy-config
176 - "/envoy/voltha-grpc-proxy.json"
Jonathan Hart87314cd2018-02-12 17:15:35 -0800177 - -consul-svc-nme
178 - "vconsul"
179 - -kv-svc-name
180 - "vconsul"
khenaidoo2a8c6332017-10-10 15:23:49 -0400181 ports:
182 - "50555:50555"
183 - "8882:8882"
184 - "8443:8443"
185 - "8001:8001"
186 environment:
187 SERVICE_50555_NAME: "voltha-grpc"
188 volumes:
189 - "/var/run/docker.sock:/tmp/docker.sock"
190 networks:
191 - default
192 - ponmgmt
193 links:
194 - voltha:vcore
195 #
196 # Voltha cli container
197 #
David K. Bainbridgebba65ff2018-01-19 09:26:09 -0800198 cli:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800199 image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
khenaidoo2a8c6332017-10-10 15:23:49 -0400200 command: [
201 "/cli/cli/setup.sh",
202 "-L",
203 "-G"
204 ]
205 environment:
206 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
207 ports:
208 - "5022:22"
209 depends_on:
210 - voltha
211
212#############################################
213# Item below this line will soon be removed.#
214#############################################
215
216 #
khenaidoo2a8c6332017-10-10 15:23:49 -0400217 # ofagent server instance
218 #
219 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800220 image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500221 logging:
222 driver: "json-file"
223 options:
224 max-size: "10m"
225 max-file: "3"
khenaidoo2a8c6332017-10-10 15:23:49 -0400226 command: [
227 "/ofagent/ofagent/main.py",
228 "-v",
229 "--consul=${DOCKER_HOST_IP}:8500",
khenaidoo2a8c6332017-10-10 15:23:49 -0400230 "--controller=${DOCKER_HOST_IP}:6653",
231 "--grpc-endpoint=@voltha-grpc",
232 "--instance-id-is-container-name",
233 "-v"
234 ]
235 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800236 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -0400237 - voltha
238 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800239 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -0400240 volumes:
241 - "/var/run/docker.sock:/tmp/docker.sock"
242 restart: unless-stopped
243
244 #
245 # Netconf server instance(s)
246 #
247 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800248 image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
khenaidoo50b286d2018-03-02 17:44:30 -0500249 logging:
250 driver: "json-file"
251 options:
252 max-size: "10m"
253 max-file: "3"
khenaidoo2a8c6332017-10-10 15:23:49 -0400254 privileged: true
255 command: [
256 "/netconf/netconf/main.py",
257 "-v",
258 "--consul=${DOCKER_HOST_IP}:8500",
khenaidoo2a8c6332017-10-10 15:23:49 -0400259 "--grpc-endpoint=@voltha-grpc",
260 "--instance-id-is-container-name",
261 "-v"
262 ]
263 ports:
264 - "830:1830"
265 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800266 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -0400267 - voltha
268 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800269 - vconsul
khenaidoo2a8c6332017-10-10 15:23:49 -0400270 environment:
271 SERVICE_1830_NAME: "netconf-server"
272 volumes:
273 - "/var/run/docker.sock:/tmp/docker.sock"
274
275
276
277networks:
278 default:
279 driver: bridge
280 ponmgmt:
281 driver: bridge
282 driver_opts:
283 com.docker.network.bridge.name: "ponmgmt"