blob: 798cf97db1981443e215fcde04d51cec5a62ca61 [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.
khenaidoofe874ae2017-07-14 18:07:27 -040014version: '2'
15services:
16 #
17 # Single-node zookeeper service
18 #
19 zookeeper:
David K. Bainbridge48946172018-01-20 14:33:37 -080020 image: "wurstmeister/zookeeper:latest"
khenaidoofe874ae2017-07-14 18:07:27 -040021 ports:
22 - 2181
23 environment:
24 SERVICE_2181_NAME: "zookeeper"
25 #
26 # Single-node kafka service
27 #
28 kafka:
David K. Bainbridge48946172018-01-20 14:33:37 -080029 image: "wurstmeister/kafka:latest"
khenaidoofe874ae2017-07-14 18:07:27 -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
khenaidoofe874ae2017-07-14 18:07:27 -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. Bainbridge48946172018-01-20 14:33:37 -080046 image: "consul:0.9.2"
khenaidoofe874ae2017-07-14 18:07:27 -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. Bainbridge48946172018-01-20 14:33:37 -080062 image: "gliderlabs/registrator:latest"
khenaidoofe874ae2017-07-14 18:07:27 -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"
khenaidoofe874ae2017-07-14 18:07:27 -040069 ]
70 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080071 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -040072 volumes:
73 - "/var/run/docker.sock:/tmp/docker.sock"
74
75 #
76 # Fluentd log server
77 #
78 fluentd:
David K. Bainbridge48946172018-01-20 14:33:37 -080079 image: "fluent/fluentd:latest"
khenaidoofe874ae2017-07-14 18:07:27 -040080 ports:
81 - "24224:24224"
82 volumes:
83 - "/tmp/fluentd:/fluentd/log"
84 environment:
85 SERVICE_24224_NAME: "fluentd-intake"
86
87 #
88 # Voltha server instance(s)
89 #
90 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080091 image: "${REGISTRY}${REPOSITORY}voltha-voltha:latest"
khenaidoo50b286d2018-03-02 17:44:30 -050092 logging:
93 driver: "json-file"
94 options:
95 max-size: "10m"
96 max-file: "3"
khenaidoofe874ae2017-07-14 18:07:27 -040097 command: [
98 "/voltha/voltha/main.py",
99 "-v",
100 "--consul=${DOCKER_HOST_IP}:8500",
khenaidoofe874ae2017-07-14 18:07:27 -0400101 "--rest-port=8880",
102 "--grpc-port=50555",
103 "--kafka=@kafka",
104 "--instance-id-is-container-name",
105 "--interface=eth1",
106 "--backend=consul",
107 "-v"
108 ]
109 ports:
110 - 8880
111 - 50555
112 - 18880
113 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800114 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400115 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800116 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400117 environment:
118 SERVICE_8880_NAME: "voltha-health"
119 SERVICE_8880_CHECK_HTTP: "/health"
120 SERVICE_8880_CHECK_INTERVAL: "5s"
121 SERVICE_8880_CHECK_TIMEOUT: "1s"
122 SERVICE_50555_NAME: "voltha-grpc"
123 SERVICE_18880_NAME: "voltha-sim-rest"
124 volumes:
125 - "/var/run/docker.sock:/tmp/docker.sock"
126 networks:
127 - default
128 - ponmgmt
129
130 #
khenaidoofe874ae2017-07-14 18:07:27 -0400131 # ofagent server instance
132 #
133 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800134 image: "${REGISTRY}${REPOSITORY}voltha-ofagent:latest"
khenaidoo50b286d2018-03-02 17:44:30 -0500135 logging:
136 driver: "json-file"
137 options:
138 max-size: "10m"
139 max-file: "3"
khenaidoofe874ae2017-07-14 18:07:27 -0400140 command: [
141 "/ofagent/ofagent/main.py",
142 "-v",
143 "--consul=${DOCKER_HOST_IP}:8500",
khenaidoofe874ae2017-07-14 18:07:27 -0400144 "--controller=${DOCKER_HOST_IP}:6653",
145 "--grpc-endpoint=@voltha-grpc",
146 "--instance-id-is-container-name",
147 "-v"
148 ]
149 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800150 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400151 - voltha
152 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800153 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400154 volumes:
155 - "/var/run/docker.sock:/tmp/docker.sock"
156 restart: unless-stopped
157
158 #
159 # Netconf server instance(s)
160 #
161 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800162 image: "${REGISTRY}${REPOSITORY}voltha-netconf:latest"
khenaidoo50b286d2018-03-02 17:44:30 -0500163 logging:
164 driver: "json-file"
165 options:
166 max-size: "10m"
167 max-file: "3"
khenaidoofe874ae2017-07-14 18:07:27 -0400168 privileged: true
169 command: [
170 "/netconf/netconf/main.py",
171 "-v",
172 "--consul=${DOCKER_HOST_IP}:8500",
khenaidoofe874ae2017-07-14 18:07:27 -0400173 "--grpc-endpoint=@voltha-grpc",
174 "--instance-id-is-container-name",
175 "-v"
176 ]
177 ports:
178 - "830:1830"
179 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800180 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400181 - voltha
182 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800183 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400184 environment:
185 SERVICE_1830_NAME: "netconf-server"
186 volumes:
187 - "/var/run/docker.sock:/tmp/docker.sock"
188
189networks:
190 default:
191 driver: bridge
192 ponmgmt:
193 driver: bridge
194 driver_opts:
195 com.docker.network.bridge.name: "ponmgmt"