blob: ba6e94b964052a5d45f8ac7b702539053b131aef [file] [log] [blame]
khenaidoofe874ae2017-07-14 18:07:27 -04001version: '2'
2services:
3 #
4 # Single-node zookeeper service
5 #
6 zookeeper:
David K. Bainbridge48946172018-01-20 14:33:37 -08007 image: "wurstmeister/zookeeper:latest"
khenaidoofe874ae2017-07-14 18:07:27 -04008 ports:
9 - 2181
10 environment:
11 SERVICE_2181_NAME: "zookeeper"
12 #
13 # Single-node kafka service
14 #
15 kafka:
David K. Bainbridge48946172018-01-20 14:33:37 -080016 image: "wurstmeister/kafka:latest"
khenaidoofe874ae2017-07-14 18:07:27 -040017 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
khenaidoofe874ae2017-07-14 18:07:27 -040027 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. Bainbridge48946172018-01-20 14:33:37 -080033 image: "consul:0.9.2"
khenaidoofe874ae2017-07-14 18:07:27 -040034 command: agent -server -bootstrap -client 0.0.0.0 -ui
35 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"
45 #
46 # Registrator
47 #
48 registrator:
David K. Bainbridge48946172018-01-20 14:33:37 -080049 image: "gliderlabs/registrator:latest"
khenaidoofe874ae2017-07-14 18:07:27 -040050 command: [
51 "-ip=${DOCKER_HOST_IP}",
52 "-retry-attempts", "100",
53 "-cleanup",
54 # "-internal",
Jonathan Hart87314cd2018-02-12 17:15:35 -080055 "consul://vconsul:8500"
khenaidoofe874ae2017-07-14 18:07:27 -040056 ]
57 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080058 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -040059 volumes:
60 - "/var/run/docker.sock:/tmp/docker.sock"
61
62 #
63 # Fluentd log server
64 #
65 fluentd:
David K. Bainbridge48946172018-01-20 14:33:37 -080066 image: "fluent/fluentd:latest"
khenaidoofe874ae2017-07-14 18:07:27 -040067 ports:
68 - "24224:24224"
69 volumes:
70 - "/tmp/fluentd:/fluentd/log"
71 environment:
72 SERVICE_24224_NAME: "fluentd-intake"
73
74 #
75 # Voltha server instance(s)
76 #
77 voltha:
David K. Bainbridge737b74f2018-01-22 12:57:52 -080078 image: "${REGISTRY}${REPOSITORY}voltha-voltha:latest"
khenaidoofe874ae2017-07-14 18:07:27 -040079 command: [
80 "/voltha/voltha/main.py",
81 "-v",
82 "--consul=${DOCKER_HOST_IP}:8500",
83 "--fluentd=fluentd:24224",
84 "--rest-port=8880",
85 "--grpc-port=50555",
86 "--kafka=@kafka",
87 "--instance-id-is-container-name",
88 "--interface=eth1",
89 "--backend=consul",
90 "-v"
91 ]
92 ports:
93 - 8880
94 - 50555
95 - 18880
96 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -080097 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -040098 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -080099 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400100 - fluentd
101 environment:
102 SERVICE_8880_NAME: "voltha-health"
103 SERVICE_8880_CHECK_HTTP: "/health"
104 SERVICE_8880_CHECK_INTERVAL: "5s"
105 SERVICE_8880_CHECK_TIMEOUT: "1s"
106 SERVICE_50555_NAME: "voltha-grpc"
107 SERVICE_18880_NAME: "voltha-sim-rest"
108 volumes:
109 - "/var/run/docker.sock:/tmp/docker.sock"
110 networks:
111 - default
112 - ponmgmt
113
114 #
khenaidoofe874ae2017-07-14 18:07:27 -0400115 # ofagent server instance
116 #
117 ofagent:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800118 image: "${REGISTRY}${REPOSITORY}voltha-ofagent:latest"
khenaidoofe874ae2017-07-14 18:07:27 -0400119 command: [
120 "/ofagent/ofagent/main.py",
121 "-v",
122 "--consul=${DOCKER_HOST_IP}:8500",
123 "--fluentd=fluentd:24224",
124 "--controller=${DOCKER_HOST_IP}:6653",
125 "--grpc-endpoint=@voltha-grpc",
126 "--instance-id-is-container-name",
127 "-v"
128 ]
129 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800130 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400131 - voltha
132 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800133 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400134 - fluentd
135 volumes:
136 - "/var/run/docker.sock:/tmp/docker.sock"
137 restart: unless-stopped
138
139 #
140 # Netconf server instance(s)
141 #
142 netconf:
David K. Bainbridge737b74f2018-01-22 12:57:52 -0800143 image: "${REGISTRY}${REPOSITORY}voltha-netconf:latest"
khenaidoofe874ae2017-07-14 18:07:27 -0400144 privileged: true
145 command: [
146 "/netconf/netconf/main.py",
147 "-v",
148 "--consul=${DOCKER_HOST_IP}:8500",
149 "--fluentd=fluentd:24224",
150 "--grpc-endpoint=@voltha-grpc",
151 "--instance-id-is-container-name",
152 "-v"
153 ]
154 ports:
155 - "830:1830"
156 depends_on:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800157 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400158 - voltha
159 links:
Jonathan Hart87314cd2018-02-12 17:15:35 -0800160 - vconsul
khenaidoofe874ae2017-07-14 18:07:27 -0400161 - fluentd
162 environment:
163 SERVICE_1830_NAME: "netconf-server"
164 volumes:
165 - "/var/run/docker.sock:/tmp/docker.sock"
166
167networks:
168 default:
169 driver: bridge
170 ponmgmt:
171 driver: bridge
172 driver_opts:
173 com.docker.network.bridge.name: "ponmgmt"