blob: f26d27fb27ce585f31aa336d170adc81c5328e09 [file] [log] [blame]
serkant.uluderya79c9a042019-03-14 15:24:48 -07001---
2# Copyright 2018 the original author or authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16version: '2'
17
18networks:
19 default:
20 driver: bridge
21
22services:
23
24 zookeeper:
25 image: "wurstmeister/zookeeper:latest"
26 environment:
27 SERVICE_2181_NAME: "zookeeper"
28 ports:
29 - 2181:2181
30 networks:
31 - default
32
33
34 kafka:
35 image: "wurstmeister/kafka:2.11-2.0.1"
36 environment:
37 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${DOCKER_HOST_IP}:9092
38 KAFKA_LISTENERS: PLAINTEXT://:9092
39 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
40 KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
41 SERVICE_9092_NAME: "kafka"
42 volumes:
43 - /var/run/docker.sock:/var/run/docker.sock
44 ports:
45 - 9092:9092
46 networks:
47 - default
48
49
50 etcd:
51 image: "quay.io/coreos/etcd:v3.2.9"
52 command: [
53 "etcd",
54 "--name=etcd0",
55 "--advertise-client-urls=http://${DOCKER_HOST_IP}:2379,http://${DOCKER_HOST_IP}:4001",
56 "--listen-client-urls=http://0.0.0.0:2379,http://0.0.0.0:4001",
57 "--initial-advertise-peer-urls=http://${DOCKER_HOST_IP}:2380",
58 "--listen-peer-urls=http://0.0.0.0:2380",
59 "--initial-cluster-token=etcd-cluster-1",
60 "--initial-cluster=etcd0=http://${DOCKER_HOST_IP}:2380",
61 "--initial-cluster-state=new"
62 ]
63 ports:
64 - "2379:2379"
65 - 2380
66 - 4001
67 networks:
68 - default
69
70
71 rw_core:
72 image: voltha-rw-core
73 entrypoint:
74 - /app/rw_core
75 - -kv_store_type=etcd
76 - -kv_store_host=${DOCKER_HOST_IP}
77 - -kv_store_port=2379
78 - -grpc_port=50057
79 - -banner=true
80 - -kafka_adapter_host=${DOCKER_HOST_IP}
81 - -kafka_adapter_port=9092
82 - -kafka_cluster_host=${DOCKER_HOST_IP}
83 - -kafka_cluster_port=9092
84 - -rw_core_topic=rwcore
85 - -kv_store_data_prefix=service/voltha
86 - -in_competing_mode=false
87 - -log_level=0
88 - -log_level=0
89 volumes:
90 - "/var/run/docker.sock:/tmp/docker.sock"
91 ports:
92 - 50057:50057
93 networks:
94 - default
95 restart: unless-stopped
96
97
98 cli:
99 image: "${REGISTRY}${REPOSITORY}voltha-cli:latest"
100 logging:
101 driver: "json-file"
102 options:
103 max-size: "10m"
104 max-file: "3"
105 environment:
106 DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
107 entrypoint:
108 - /voltha/python/cli/setup.sh
109 - -g ${DOCKER_HOST_IP}:50057
110 networks:
111 - default
112 ports:
113 - "5022:22"
114
115
116 ofagent:
117 image: "${REGISTRY}${REPOSITORY}voltha-ofagent:latest"
118 logging:
119 driver: "json-file"
120 options:
121 max-size: "10m"
122 max-file: "3"
123 command: [
124 "/ofagent/ofagent/main.py",
125 "--consul=${DOCKER_HOST_IP}:8500",
126 "--controller=${DOCKER_HOST_IP}:6653",
127 "--grpc-endpoint=${DOCKER_HOST_IP}:50057",
128 "--instance-id-is-container-name",
129 "-v"
130 ]
131 volumes:
132 - "/var/run/docker.sock:/tmp/docker.sock"
133 networks:
134 - default
135 restart: unless-stopped
136
137 adapter_ponsim_olt:
138 image: "${REGISTRY}${REPOSITORY}voltha-adapter-ponsim-olt${TAG}"
139 logging:
140 driver: "json-file"
141 options:
142 max-size: "10m"
143 max-file: "3"
144 command: [
145 "/voltha/python/adapters/ponsim_olt/main.py",
146 "-v",
147 "--name=ponsim_olt",
148 "--kafka_adapter=${DOCKER_HOST_IP}:9092",
149 "--kafka_cluster=${DOCKER_HOST_IP}:9092",
150 "--core_topic=rwcore"
151 ]
152 networks:
153 - default
154
155 adapter_ponsim_onu:
156 image: "${REGISTRY}${REPOSITORY}voltha-adapter-ponsim-onu${TAG}"
157 logging:
158 driver: "json-file"
159 options:
160 max-size: "10m"
161 max-file: "3"
162 command: [
163 "/voltha/python/adapters/ponsim_onu/main.py",
164 "-v",
165 "--name=ponsim_onu",
166 "--kafka_adapter=${DOCKER_HOST_IP}:9092",
167 "--kafka_cluster=${DOCKER_HOST_IP}:9092",
168 "--core_topic=rwcore"
169 ]
170 networks:
171 - default
172
173 ponsim_olt:
174 image: "${REGISTRY}voltha/voltha-ponsim${TAG}"
175 logging:
176 driver: "json-file"
177 options:
178 max-size: "10m"
179 max-file: "3"
180 entrypoint:
181 - /app/ponsim
182 - -device_type
183 - "OLT"
184 - -onus
185 - "4"
186 - -internal_if
187 - "eth0"
188 - -external_if
189 - "eth0"
190 - -vcore_endpoint
191 - "vcore"
192 - -promiscuous
193 - -verbose
194 ports:
195 - "50060:50060"
196 networks:
197 - default
198
199 ponsim_onu:
200 image: "${REGISTRY}voltha/voltha-ponsim${TAG}"
201 logging:
202 driver: "json-file"
203 options:
204 max-size: "10m"
205 max-file: "3"
206 entrypoint:
207 - /app/ponsim
208 - -device_type
209 - "ONU"
210 - -parent_addr
211 - "ponsim_olt"
212 - -grpc_port
213 - "50061"
214 - -internal_if
215 - "eth0"
216 - -external_if
217 - "lo"
218 - -promiscuous
219 - -verbose
220 ports:
221 - "50061:50061"
222 networks:
223 - default