-
Notifications
You must be signed in to change notification settings - Fork 17
/
tr069.nbs
355 lines (336 loc) · 8.95 KB
/
tr069.nbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
version: '3.3'
services:
################################################################################
# real implemented and used services
################################################################################
genieacs:
environment:
- KEEP_SERVICE_RUNNING=yes
tty: true
container_name: ${NBS_PROJECT}_genieacs
hostname: genieacs
image: ${NBS_PROJECT}_genieacs:${VERSION:-latest}
build:
context: ./genieacs
args:
- VERSION=${VERSION:-latest}
depends_on:
- telco0
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
ports:
# 7547 is the cwmp, 7557 is the NBI, 7567 is the FS, 7070 is webui
- 7547:7547
- 7557:7557
- 7567:7567
- 7070:7070
expose:
- '7547'
- '7557'
- '7567'
- '7070'
volumes:
- genieacs:/data/db
networks:
telco0:
acsdb:
container_name: ${NBS_PROJECT}_acsdb
hostname: acsdb
image: ${NBS_PROJECT}_acsdb:${VERSION:-latest}
build:
context: ./mysql
args:
- VERSION=${VERSION:-latest}
tty: true
environment:
- KEEP_SERVICE_RUNNING=yes
tty: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
security_opt:
- apparmor:docker-default
ports:
# <Port exposed> : < MySQL Port running inside container>
- ${MYSQL_PORT:-3306}:3306
expose:
# Opens port 3306 on the container
- '3306'
volumes:
# Where our data will be persisted
- acsdb:/var/lib/mysql
# all files in db will be executed (*.sh *.sql *.sql.gz) or ignored.
- ./acsdb/inserts:/docker-entrypoint-initdb.d
networks:
telco0:
depends_on:
- telco0
acs:
environment:
- KEEP_SERVICE_RUNNING=yes
tty: true
container_name: ${NBS_PROJECT}_acs
hostname: acs
image: ${NBS_PROJECT}_acs:${VERSION:-latest}
build:
context: ./openacs
args:
- VERSION=${VERSION:-latest}
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
security_opt:
- apparmor:docker-default
depends_on:
- acsdb
- telco0
ports:
# <Port exposed> : <jboss>
- ${MYHTTP_PORT:-8080}:8080
expose:
# Opens port 8080 on the container
- '8080'
networks:
telco0:
stun:
environment:
- KEEP_SERVICE_RUNNING=yes
tty: true
container_name: ${NBS_PROJECT}_stun
hostname: stun
image: ${NBS_PROJECT}_stun:${VERSION:-latest}
build:
context: ./stun
args:
- VERSION=${VERSION:-latest}
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
depends_on:
- telco0
security_opt:
- apparmor:docker-default
expose:
# Opens stun ports on the container
- 3478/udp
- 3479/udp
networks:
telco0:
xmpp:
environment:
- KEEP_SERVICE_RUNNING=yes
tty: true
container_name: ${NBS_PROJECT}_xmpp
hostname: xmpp
image: ${NBS_PROJECT}_xmpp:${VERSION:-latest}
build:
context: ./xmpp
args:
- VERSION=${VERSION:-latest}
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
security_opt:
- apparmor:docker-default
depends_on:
- upstream
expose:
# Opens xmpp ports on the container
- 5222
- 5223
- 5269
- 5298/udp
- 5298
- 8010
networks:
internet:
web:
environment:
- KEEP_SERVICE_RUNNING=yes
tty: true
container_name: ${NBS_PROJECT}_web
hostname: web
image: ${NBS_PROJECT}_web:${VERSION:-latest}
build:
context: ./apache
args:
- VERSION=${VERSION:-latest}
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
volumes:
- web:/var/www/html/protected
depends_on:
- telco0
security_opt:
- apparmor:docker-default
expose:
# Opens http port on the container
- 80
networks:
telco0:
nginx:
environment:
- KEEP_SERVICE_RUNNING=yes
tty: true
container_name: ${NBS_PROJECT}_nginx
hostname: nginx
image: ${NBS_PROJECT}_nginx:${VERSION:-latest}
build:
context: ./nginx
args:
- VERSION=${VERSION:-latest}
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
depends_on:
- genieacs
- acs
- web
- telco0
volumes:
- ~/.ca:/root/ca
security_opt:
- apparmor:docker-default
expose:
# Opens http and https port on the container
- 80
- 443
networks:
telco0:
################################################################################
# gateways
################################################################################
home0:
environment:
- KEEP_SERVICE_RUNNING=yes
- UPSTREAM_NETWORK_NAME=internet
- UPSTREAM_GATEWAY_NAME=upstream
# allowed range is 1-250 to generate addresses in 192.168.IP_ADDRES_BYTE_TO_SERVE.
- IP_ADDRES_BYTE_TO_SERVE=${HOME0_IP_ADDRES_BYTE:-1}
- IP_ADDRES_BYTE_RANGE_START=${HOME0_IP_ADDRES_START:-101}
- IP_ADDRES_BYTE_RANGE_END=${HOME0_IP_ADDRES_END:-110}
- OWN_IP_ADDRES_BYTE=${HOME0_OWN_IP_ADDRES_BYTE:-100}
- DEFAULT_LEASE_TIME=${HOME0_DEFAULT_LEASE_TIME:-86400}
- DOMAIN_TO_SERVE=home0.intern
- USE_OPTION_125_WORKAROUND=${PATCH_MY_DHCP_SERVER_FOR_OPTION_125_WORKAROUND:-no}
- USE_OPTION_43_WORKAROUND=${PATCH_MY_DHCP_SERVER_FOR_OPTION_43_WORKAROUND:-no}
- USE_OPTION_125_MODE=${USE_OPTION_125_MODE:-BBF}
- USE_OPTION_43_MODE=${USE_OPTION_43_MODE:-none}
- ACS_URL_TO_USE_OPTION125=${ACS_URL_TO_USE_OPTION125:-http://telco0.public:9000/openacs/acs}
- ACS_URL_TO_USE_OPTION43=${ACS_URL_TO_USE_OPTION43:-http://telco0.public:7547}
- PROVISIONING_CODE=${PROVISIONING_CODE:-code12345}
- WAIT_INTERVAL=${WAIT_INTERVAL:-86400}
- WAIT_INTERVAL_MULTIPLIER=${WAIT_INTERVAL_MULTIPLIER:-1}
tty: true
container_name: ${NBS_PROJECT}_home0
hostname: home0
image: ${NBS_PROJECT}_home0:${VERSION:-latest}
build:
context: ./home0
args:
- VERSION=${VERSION:-latest}
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
security_opt:
- apparmor:docker-default
depends_on:
- upstream
expose:
- 53
- 53/udp
- 67/udp
- 68/udp
networks:
internet:
home0:
# To connect the telco0 network to the 'internet'
telco0:
environment:
- KEEP_SERVICE_RUNNING=yes
- UPSTREAM_NETWORK_NAME=internet
- UPSTREAM_GATEWAY_NAME=upstream
# allowed range is 1-250 to generate addresses in 192.168.IP_ADDRES_BYTE_TO_SERVE.
- IP_ADDRES_BYTE_TO_SERVE=${TELCO0_IP_ADDRES_BYTE:-2}
- OWN_IP_ADDRES_BYTE=${TELCO0_OWN_IP_ADDRES_BYTE:-1}
- DEFAULT_LEASE_TIME=${TELCO0_DEFAULT_LEASE_TIME:-3600}
- DOMAIN_TO_SERVE=telco0.intern
tty: true
container_name: ${NBS_PROJECT}_telco0
hostname: telco0
image: ${NBS_PROJECT}_telco0:${VERSION:-latest}
build:
context: ./telco0
args:
- VERSION=${VERSION:-latest}
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
security_opt:
- apparmor:docker-default
depends_on:
- upstream
expose:
- 53
- 53/udp
- 67/udp
- 68/udp
networks:
internet:
telco0:
# To connect the internetworking network to the upstream 'internet'
upstream:
environment:
- KEEP_SERVICE_RUNNING=yes
- UPSTREAM_NETWORK_NAME=localupstream
# allowed range is 1-250 to generate addresses in 192.168.IP_ADDRES_BYTE_TO_SERVE.
- IP_ADDRES_BYTE_TO_SERVE=${UPSTREAM_IP_ADDRES_BYTE:-3}
- OWN_IP_ADDRES_BYTE=${UPSTREAM_OWN_IP_ADDRES_BYTE:-1}
- DEFAULT_LEASE_TIME=${UPSTREAM_DEFAULT_LEASE_TIME:-600}
- DHCLIENT_TIMEOUT=60
- DOMAIN_TO_SERVE=public
- ADDITIONAL_NAMESERVER=${UPSTREAM_ADDITIONAL_NAMESERVER}
tty: true
container_name: ${NBS_PROJECT}_upstream
hostname: upstream
image: ${NBS_PROJECT}_upstream:${VERSION:-latest}
build:
context: ./upstream
args:
- VERSION=${VERSION:-latest}
privileged: true
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
security_opt:
- apparmor:docker-default
depends_on:
- gateway
expose:
- 53
- 53/udp
- 67/udp
- 68/udp
networks:
internet:
upstream:
#
################################################################################
#
volumes:
acsdb:
genieacs:
web:
#
################################################################################
#
networks:
telco0:
driver: macvlan
home0:
driver: macvlan
driver_opts:
parent: ${MY_DUT_INTERFACE}
upstream:
driver: macvlan
driver_opts:
parent: ${MY_UPSTREAM_INTERFACE}
# continue only after the openacs has been started by jboss, and genieacs is up and running
#nbs wait;acs;Started in
#nbs wait;genieacs;spawned: 'genieacs-ui'
#nbs resolve;telco0
#nbs resolve;home0
#nbs resolve;upstream
#nbs url;openACS;telco0.public:9000/openacs
#nbs url;apache;telco0.public
#nbs url;GenieACS;telco0.public:7557/devices