forked from opiproject/opi-evpn-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
481 lines (443 loc) · 26 KB
/
docker-compose.yml
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
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.
---
version: '3.7'
services:
spine1:
image: quay.io/frrouting/frr:8.5.2
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_MODULE
- CAP_NET_RAW
stdin_open: true
tty: true
volumes:
- ./conf/spine1.conf:/etc/frr/frr.conf
networks:
n1l1tos1:
ipv4_address: 10.168.1.6
n0l2tos1:
ipv4_address: 10.168.2.6
btos1:
ipv4_address: 10.168.3.6
command: |
sh -x -c 'touch /etc/frr/vtysh.conf && \
sed -i "s/bgpd=no/bgpd=yes/g" /etc/frr/daemons && \
ip link add name lo0 type dummy && \
ifconfig lo0 10.0.0.1 netmask 255.255.255.255 up && \
/etc/init.d/frr stop && \
/usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd && \
sleep infinity'
leaf1:
image: quay.io/frrouting/frr:8.5.2
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_MODULE
- CAP_NET_RAW
stdin_open: true
tty: true
volumes:
- ./conf/leaf1.conf:/etc/frr/frr.conf
networks:
n1l1tos1:
ipv4_address: 10.168.1.5
n2htoleaf1:
n3htoleafbn1:
n5h1tol1r:
n6h1tol1y:
command: |
sh -x -c 'touch /etc/frr/vtysh.conf && \
sed -i "s/bgpd=no/bgpd=yes/g" /etc/frr/daemons && \
ip link add name lo0 type dummy && \
ifconfig lo0 10.0.0.2 netmask 255.255.255.255 up && \
/etc/init.d/frr stop && \
/usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd && \
sleep infinity'
bleaf:
image: quay.io/frrouting/frr:8.5.2
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_MODULE
- CAP_NET_RAW
stdin_open: true
tty: true
volumes:
- ./conf/bleaf.conf:/etc/frr/frr.conf
networks:
btos1:
ipv4_address: 10.168.3.5
internet:
ipv4_address: 5.5.5.5
internet1:
ipv4_address: 6.6.6.6
internet2:
ipv4_address: 7.7.7.7
command: |
sh -x -c 'touch /etc/frr/vtysh.conf && \
sed -i "s/bgpd=no/bgpd=yes/g" /etc/frr/daemons && \
ip link add name lo0 type dummy && \
ifconfig lo0 10.0.0.3 netmask 255.255.255.255 up && \
ip link add blue type vrf table 1000 && \
ip link set blue up && \
ip link set eth1 master blue && \
ip link add green type vrf table 1001 && \
ip link set green up && \
ip link set eth2 master green && \
ip link add yellow type vrf table 1002 && \
ip link set yellow up && \
ip link set eth3 master yellow && \
ip link add br100 type bridge && \
ip link set br100 master blue addrgenmode none && \
ip link set br100 addr aa:bb:cc:00:00:33 && \
ip link add vni100 type vxlan local 10.0.0.3 dstport 4789 id 100 nolearning && \
ip link set vni100 master br100 addrgenmode none && \
ip link set vni100 type bridge_slave neigh_suppress on learning off && \
ip link set vni100 up && \
ip link set br100 up && \
ip link add br101 type bridge && \
ip link set br101 master green addrgenmode none && \
ip link set br101 addr aa:bb:cc:00:00:44 && \
ip link add vni101 type vxlan local 10.0.0.3 dstport 4789 id 101 nolearning && \
ip link set vni101 master br101 addrgenmode none && \
ip link set vni101 type bridge_slave neigh_suppress on learning off && \
ip link set vni101 up && \
ip link set br101 up && \
ip link add br102 type bridge && \
ip link set br102 master yellow addrgenmode none && \
ip link set br102 addr aa:bb:cc:00:00:55 && \
ip link add vni102 type vxlan local 10.0.0.3 dstport 4789 id 102 nolearning && \
ip link set vni102 master br102 addrgenmode none && \
ip link set vni102 type bridge_slave neigh_suppress on learning off && \
ip link set vni102 up && \
ip link set br102 up && \
/etc/init.d/frr stop && \
/usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd && \
sleep infinity'
leaf2:
image: quay.io/frrouting/frr:8.5.2
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_MODULE
- CAP_NET_RAW
stdin_open: true
tty: true
volumes:
- ./conf/leaf2.conf:/etc/frr/frr.conf
networks:
n0l2tos1:
ipv4_address: 10.168.2.5
n2htoleaf2:
n4htoleafbn2:
command: |
sh -x -c 'touch /etc/frr/vtysh.conf && \
sed -i "s/bgpd=no/bgpd=yes/g" /etc/frr/daemons && \
ip link add name lo0 type dummy && \
ifconfig lo0 10.0.0.4 netmask 255.255.255.255 up && \
ip link add blue type vrf table 1000 && \
ip link set blue up && \
ip link add green type vrf table 1001 && \
ip link set green up && \
ip link add yellow type vrf table 1002 && \
ip link set yellow up && \
ip link add br100 type bridge && \
ip link set br100 master blue addrgenmode none && \
ip link set br100 addr aa:bb:cc:00:00:02 && \
ip link add vni100 type vxlan local 10.0.0.4 dstport 4789 id 100 nolearning && \
ip link set vni100 master br100 addrgenmode none && \
ip link set vni100 type bridge_slave neigh_suppress on learning off && \
ip link set vni100 up && \
ip link set br100 up && \
ip link add br101 type bridge && \
ip link set br101 master green addrgenmode none && \
ip link set br101 addr aa:bb:cc:00:00:03 && \
ip link add vni101 type vxlan local 10.0.0.4 dstport 4789 id 101 nolearning && \
ip link set vni101 master br101 addrgenmode none && \
ip link set vni101 type bridge_slave neigh_suppress on learning off && \
ip link set vni101 up && \
ip link set br101 up && \
ip link add br102 type bridge && \
ip link set br102 master yellow addrgenmode none && \
ip link set br102 addr aa:bb:cc:00:00:04 && \
ip link add vni102 type vxlan local 10.0.0.4 dstport 4789 id 102 nolearning && \
ip link set vni102 master br102 addrgenmode none && \
ip link set vni102 type bridge_slave neigh_suppress on learning off && \
ip link set vni102 up && \
ip link set br102 up && \
ip link add br10 type bridge && \
ip link set br10 addr aa:bb:cc:00:00:22 && \
ip link add link eth1 name eth1.10 type vlan id 10 && \
ip link set eth1 up && ip addr flush dev eth1 && \
ip link set eth1.10 up && \
ip link set eth1.10 master br10 addrgenmode none && \
ip link add vni10 type vxlan local 10.0.0.4 dstport 4789 id 10 nolearning && \
ip link set vni10 master br10 addrgenmode none && \
ip link set vni10 type bridge_slave neigh_suppress on learning off && \
ip link set vni10 up && \
ip link set br10 up && \
ip link add br20 type bridge && \
ip link set br20 master blue addrgenmode none && \
ip link set br20 addr aa:bb:cc:00:00:23 && \
ip addr add 20.20.20.1/24 dev br20 && \
ip link add vni20 type vxlan local 10.0.0.4 dstport 4789 id 20 nolearning && \
ip link set vni20 master br20 addrgenmode none && \
ip link set vni20 type bridge_slave neigh_suppress on learning off && \
ip link set vni20 up && \
ip link set br20 up && \
ip link add br30 type bridge && \
ip link set br30 master blue addrgenmode none && \
ip link set eth2 up && ip addr flush dev eth2 && \
ip link add link eth2 name eth2.30 type vlan id 30 && \
ip link set eth2.30 up && \
ip link set eth2.30 master br30 addrgenmode none && \
ip link set br30 addr aa:bb:cc:00:00:24 && \
ip addr add 30.30.30.1/24 dev br30 && \
ip link add vni30 type vxlan local 10.0.0.4 dstport 4789 id 30 nolearning && \
ip link set vni30 master br30 addrgenmode none && \
ip link set vni30 type bridge_slave neigh_suppress on learning off && \
ip link set vni30 up && \
ip link set br30 up && \
ip link add br40 type bridge && \
ip link set br40 master green addrgenmode none && \
ip link set br40 addr aa:bb:cc:00:00:25 && \
ip addr add 40.40.40.1/24 dev br40 && \
ip link add vni40 type vxlan local 10.0.0.4 dstport 4789 id 40 nolearning && \
ip link set vni40 master br40 addrgenmode none && \
ip link set vni40 type bridge_slave neigh_suppress on learning off && \
ip link set vni40 up && \
ip link set br40 up && \
ip link add br50 type bridge && \
ip link set br50 master green addrgenmode none && \
ip link set br50 addr aa:bb:cc:00:00:26 && \
ip addr add 50.50.50.1/24 dev br50 && \
ip link add vni50 type vxlan local 10.0.0.4 dstport 4789 id 50 nolearning && \
ip link set vni50 master br50 addrgenmode none && \
ip link set vni50 type bridge_slave neigh_suppress on learning off && \
ip link set vni50 up && \
ip link set br50 up && \
/etc/init.d/frr stop && \
/usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd && \
sleep infinity'
opi-evpn-bridge:
build:
context: .
cap_add:
- NET_ADMIN
depends_on:
- leaf1
network_mode: service:leaf1
command: /opi-evpn-bridge -port=50151
healthcheck:
test: grpcurl -plaintext localhost:50151 list || exit 1
testgrpc:
image: docker.io/namely/grpc-cli
cap_add:
- NET_ADMIN
network_mode: service:leaf1
depends_on:
opi-evpn-bridge:
condition: service_healthy
entrypoint: /bin/bash
command: |
-x -c 'echo start && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.CreateInterface -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.CreateSubnet -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.CreateTunnel -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.CreateVpc -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.GetInterface -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.GetSubnet -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.GetTunnel -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.GetVpc -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.DeleteInterface -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.DeleteSubnet -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.DeleteTunnel -l && \
/entrypoint.sh ls localhost:50151 opi_api.network.cloud.v1alpha1.CloudInfraService.DeleteVpc -l && \
echo create && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateVpc "{\"vpc\" : {\"spec\" : {\"v4_route_table_name_ref\" : \"1000\"} }, \"vpc_id\" : \"blue\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateVpc "{\"vpc\" : {\"spec\" : {\"v4_route_table_name_ref\" : \"1001\"} }, \"vpc_id\" : \"green\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateVpc "{\"vpc\" : {\"spec\" : {\"v4_route_table_name_ref\" : \"1002\"} }, \"vpc_id\" : \"yellow\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSubnet "{\"subnet\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/vpcs/blue\", \"virtual_router_mac\": \"qrvMAAAB\" } }, \"subnet_id\" : \"br100\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSubnet "{\"subnet\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/vpcs/green\", \"virtual_router_mac\": \"qrvMAAAC\" } }, \"subnet_id\" : \"br101\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSubnet "{\"subnet\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/vpcs/yellow\", \"virtual_router_mac\": \"qrvMAAAD\" } }, \"subnet_id\" : \"br102\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSubnet "{\"subnet\" : {\"spec\" : { \"virtual_router_mac\": \"qrvMAAAR\" } }, \"subnet_id\" : \"br10\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSubnet "{\"subnet\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/vpcs/blue\", \"virtual_router_mac\": \"qrvMAAAh\", \"v4_prefix\": {\"addr\": 336860161, \"len\": 24} } }, \"subnet_id\" : \"br20\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSubnet "{\"subnet\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/vpcs/blue\", \"virtual_router_mac\": \"qrvMAAAx\", \"v4_prefix\": {\"addr\": 505290241, \"len\": 24} } }, \"subnet_id\" : \"br30\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSubnet "{\"subnet\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/vpcs/green\", \"virtual_router_mac\": \"qrvMAABB\", \"v4_prefix\": {\"addr\": 673720321, \"len\": 24} } }, \"subnet_id\" : \"br40\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateSubnet "{\"subnet\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/vpcs/yellow\", \"virtual_router_mac\": \"qrvMAABC\", \"v4_prefix\": {\"addr\": 842150401, \"len\": 24} } }, \"subnet_id\" : \"br50\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateTunnel "{\"tunnel\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br100\", \"local_ip\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"encap\": {\"type\": \"ENCAP_TYPE_VXLAN\", \"value\": {\"vnid\": 100}} } }, \"tunnel_id\" : \"vni100\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateTunnel "{\"tunnel\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br101\", \"local_ip\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"encap\": {\"type\": \"ENCAP_TYPE_VXLAN\", \"value\": {\"vnid\": 101}} } }, \"tunnel_id\" : \"vni101\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateTunnel "{\"tunnel\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br102\", \"local_ip\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"encap\": {\"type\": \"ENCAP_TYPE_VXLAN\", \"value\": {\"vnid\": 102}} } }, \"tunnel_id\" : \"vni102\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateTunnel "{\"tunnel\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br10\", \"local_ip\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"encap\": {\"type\": \"ENCAP_TYPE_VXLAN\", \"value\": {\"vnid\": 10}} } }, \"tunnel_id\" : \"vni10\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateTunnel "{\"tunnel\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br20\", \"local_ip\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"encap\": {\"type\": \"ENCAP_TYPE_VXLAN\", \"value\": {\"vnid\": 20}} } }, \"tunnel_id\" : \"vni20\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateTunnel "{\"tunnel\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br30\", \"local_ip\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"encap\": {\"type\": \"ENCAP_TYPE_VXLAN\", \"value\": {\"vnid\": 30}} } }, \"tunnel_id\" : \"vni30\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateTunnel "{\"tunnel\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br40\", \"local_ip\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"encap\": {\"type\": \"ENCAP_TYPE_VXLAN\", \"value\": {\"vnid\": 40}} } }, \"tunnel_id\" : \"vni40\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateTunnel "{\"tunnel\" : {\"spec\" : {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br50\", \"local_ip\": {\"af\": \"IP_AF_INET\", \"v4_addr\": 167772162}, \"encap\": {\"type\": \"ENCAP_TYPE_VXLAN\", \"value\": {\"vnid\": 50}} } }, \"tunnel_id\" : \"vni50\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateInterface "{\"interface\" : {\"spec\" : {\"ifid\": 10, \"l3_if_spec\": {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br10\"}} }, \"interface_id\" : \"eth1\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateInterface "{\"interface\" : {\"spec\" : {\"ifid\": 20, \"l3_if_spec\": {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br20\"}} }, \"interface_id\" : \"eth2\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateInterface "{\"interface\" : {\"spec\" : {\"ifid\": 40, \"l3_if_spec\": {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br40\"}} }, \"interface_id\" : \"eth3\", \"parent\" : \"todo\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 CreateInterface "{\"interface\" : {\"spec\" : {\"ifid\": 50, \"l3_if_spec\": {\"vpc_name_ref\" : \"//network.opiproject.org/subnets/br50\"}} }, \"interface_id\" : \"eth4\", \"parent\" : \"todo\" }" && \
echo get && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetVpc "{\"name\" : \"//network.opiproject.org/vpcs/blue\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetVpc "{\"name\" : \"//network.opiproject.org/vpcs/green\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetVpc "{\"name\" : \"//network.opiproject.org/vpcs/yellow\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSubnet "{\"name\" : \"//network.opiproject.org/subnets/br100\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSubnet "{\"name\" : \"//network.opiproject.org/subnets/br101\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSubnet "{\"name\" : \"//network.opiproject.org/subnets/br102\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSubnet "{\"name\" : \"//network.opiproject.org/subnets/br10\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSubnet "{\"name\" : \"//network.opiproject.org/subnets/br20\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSubnet "{\"name\" : \"//network.opiproject.org/subnets/br30\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSubnet "{\"name\" : \"//network.opiproject.org/subnets/br40\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetSubnet "{\"name\" : \"//network.opiproject.org/subnets/br50\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetTunnel "{\"name\" : \"//network.opiproject.org/tunnels/vni100\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetTunnel "{\"name\" : \"//network.opiproject.org/tunnels/vni101\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetTunnel "{\"name\" : \"//network.opiproject.org/tunnels/vni102\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetTunnel "{\"name\" : \"//network.opiproject.org/tunnels/vni10\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetTunnel "{\"name\" : \"//network.opiproject.org/tunnels/vni20\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetTunnel "{\"name\" : \"//network.opiproject.org/tunnels/vni30\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetTunnel "{\"name\" : \"//network.opiproject.org/tunnels/vni40\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetTunnel "{\"name\" : \"//network.opiproject.org/tunnels/vni50\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetInterface "{\"name\" : \"//network.opiproject.org/interfaces/eth1\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetInterface "{\"name\" : \"//network.opiproject.org/interfaces/eth2\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetInterface "{\"name\" : \"//network.opiproject.org/interfaces/eth3\" }" && \
/entrypoint.sh call --json_input --json_output localhost:50151 GetInterface "{\"name\" : \"//network.opiproject.org/interfaces/eth4\" }" && \
echo done'
host2-leaf2:
image: docker.io/library/alpine:3.18
cap_add:
- NET_ADMIN
networks:
n2htoleaf2:
# L2 VXLAN - VLAN10 stretched with VNI10 to leaf2 from leaf1 (ping 10.10.10.3)
command: |
sh -x -c 'sleep 30 && \
ip link add link eth0 name eth0.10 type vlan id 10 && \
ip link set eth0 up && ip addr flush dev eth0 && \
ip link set eth0.10 up && \
ip addr add 10.10.10.11/24 dev eth0.10 && sleep infinity'
host3-leaf2:
image: docker.io/library/alpine:3.18
cap_add:
- NET_ADMIN
networks:
n4htoleafbn2:
command: |
sh -x -c 'sleep 30 && \
ip link add link eth0 name eth0.30 type vlan id 30 && \
ip link set eth0 up && ip addr flush dev eth0 && \
ip link set eth0.30 up && \
ip addr add 30.30.30.31/24 dev eth0.30 &&
ip route replace default via 30.30.30.1 && sleep infinity'
opi-test:
image: docker.io/library/alpine:3.18
cap_add:
- NET_ADMIN
networks:
n2htoleaf1:
n3htoleafbn1:
n5h1tol1r:
n6h1tol1y:
depends_on:
- spine1
- leaf1
- leaf2
- bleaf
- host2-leaf2
- host3-leaf2
- opi-evpn-bridge
- testgrpc
# HOST1
# L2 VXLAN - VLAN10 stretched with VNI10 to leaf2 from leaf1, ping Host2 IP from Host1
# L3VXLAN Asymmetric IRB:
# VLAN20 & VLAN30 stretched with VNI20 & VNI30 repectively to leaf2 from leaf1 via blue VRF, ping Host3 IP from Host1
# L3VXLAN Symmetric IRB:
# Ping to Bleaf internet connectivity IPs from Host1 via green and yellow VRFs from Leaf1
command: |
sh -x -c 'sleep 30 && \
ip link add link eth0 name eth0.10 type vlan id 10 && \
ip link set eth0 up && ip addr flush dev eth0 && \
ip link set eth0.10 up && \
ip addr add 10.10.10.10/24 dev eth0.10 && \
ping -c 3 10.10.10.11 && \
ip link add link eth1 name eth1.20 type vlan id 20 && \
ip link set eth1 up && ip addr flush dev eth1 && \
ip link set eth1.20 up && \
ip addr add 20.20.20.20/24 dev eth1.20 && \
ip route replace default via 20.20.20.1 && \
ping -c 3 30.30.30.31 && ping -c 3 5.5.5.5 && \
ip link add link eth2 name eth2.40 type vlan id 40 && \
ip link set eth2 up && ip addr flush dev eth2 && \
ip link set eth2.40 up && \
ip addr add 40.40.40.40/24 dev eth2.40 && \
ip route replace default via 40.40.40.1 && \
ping -c 3 6.6.6.6 && \
ip link add link eth3 name eth3.50 type vlan id 50 && \
ip link set eth3 up && ip addr flush dev eth3 && \
ip link set eth3.50 up && \
ip addr add 50.50.50.50/24 dev eth3.50 && \
ip route replace default via 50.50.50.1 && \
ping -c 3 7.7.7.7'
networks:
n1l1tos1:
ipam:
driver: default
config:
- subnet: 10.168.1.0/24
n0l2tos1:
ipam:
driver: default
config:
- subnet: 10.168.2.0/24
btos1:
ipam:
driver: default
config:
- subnet: 10.168.3.0/24
internet:
ipam:
driver: default
config:
- subnet: 5.5.5.0/24
internet1:
ipam:
driver: default
config:
- subnet: 6.6.6.0/24
internet2:
ipam:
driver: default
config:
- subnet: 7.7.7.0/24
n2htoleaf1:
ipam:
driver: default
config:
- subnet: 10.10.10.16/28
n2htoleaf2:
ipam:
driver: default
config:
- subnet: 10.10.10.32/28
n3htoleafbn1:
ipam:
driver: default
config:
- subnet: 20.20.20.0/24
n4htoleafbn2:
ipam:
driver: default
config:
- subnet: 30.30.30.0/24
n5h1tol1r:
ipam:
driver: default
config:
- subnet: 40.40.40.0/24
n6h1tol1y:
ipam:
driver: default
config:
- subnet: 50.50.50.0/24