-
Notifications
You must be signed in to change notification settings - Fork 68
/
Vagrantfile-kvm
1226 lines (1099 loc) · 63.6 KB
/
Vagrantfile-kvm
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
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# cat /var/lib/libvirt/dnsmasq/virbr1.status | jq '.[] | if .["hostname"]=="oob-mgmt-server" then .["ip-address"] else empty end'
#
#
# Created by Topology-Converter v3.3
# using topology data from: ./examples/reference_topology_libvirt.dot
# using definition data from: ./examples/reference_topology_libvirt.def
# NOTE: in order to use this Vagrantfile you will need:
# -Libvirt Installed -- guide to come
# -Boxes which have been mutated to support Libvirt -- see guide below:
# https://community.cumulusnetworks.com/cumulus/topics/converting-cumulus-vx-virtualbox-vagrant-box-gt-libvirt-vagrant-box
# -Start with "vagrant up --provider libvirt --parallel
# -Vagrant(v1.7+) installed: http://www.vagrantup.com/downloads
# -Cumulus Plugin for Vagrant installed: $ vagrant plugin install vagrant-cumulus
# -the "helper_scripts" directory that comes packaged with topology-converter.py
# -Ansible (v1.9+) installed: http://docs.ansible.com/ansible/intro_installation.html
Vagrant.configure("2") do |config|
##### GLOBAL OPTIONS #####
# You will need to uncomment and set wbid when you run.
wbid = 1
udp_port_lo = "#{100+wbid*2}"
udp_port_hi = "#{101+wbid*2}"
config.vm.provider :libvirt do |domain|
domain.nic_adapter_count = 55
domain.management_network_address = "10.255.#{wbid}.0/24"
domain.management_network_name = "wbr#{wbid}"
end
##### DEFINE VMs #####
##### DEFINE VM for oob-mgmt-server #####
config.vm.define "oob-mgmt-server" do |oob_mgmt_server|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
oob_mgmt_server.vm.synced_folder '.', '/vagrant', :disabled => true
oob_mgmt_server.vm.provider :libvirt do |v|
v.memory = 1024
end
oob_mgmt_server.vm.hostname = "oob-mgmt-server"
oob_mgmt_server.vm.box = "boxcutter/ubuntu1404"
# Local_Interface: eth1 Topology_File_Line(41): "oob-mgmt-server":"eth1" -- "oob-mgmt-switch":"swp1"
oob_mgmt_server.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}41",
:libvirt__tunnel_local_port => "#{udp_port_hi}41",
auto_config: false
# Disabling the default synced folder
oob_mgmt_server.vm.synced_folder ".", "/vagrant", disabled: true
# UBUNTU DEVICES ONLY: Shorten Boot Process - remove "Wait for Network"
oob_mgmt_server.vm.provision :shell , inline: "sudo sed -i 's/sleep [0-9]*/sleep 1/' /etc/init/failsafe.conf"
# Run Any Extra Config
oob_mgmt_server.vm.provision :shell , path: "./helper_scripts/oob_server_config.sh"
# Apply the interface re-map
oob_mgmt_server.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
oob_mgmt_server.vm.provision "file", source: "./helper_scripts/autogenerated/oob-mgmt-server_remap_eth", destination: "/home/vagrant/remap_eth"
oob_mgmt_server.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
oob_mgmt_server.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
oob_mgmt_server.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
oob_mgmt_server.vm.provision :shell , inline: "sudo sed -i '/exit 0/d' /etc/rc.local "
oob_mgmt_server.vm.provision :shell , inline: "sudo echo '/etc/init.d/rename_eth_swp start' >> /etc/rc.local "
oob_mgmt_server.vm.provision :shell , inline: "sudo echo 'exit 0' >> /etc/rc.local "
oob_mgmt_server.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
oob_mgmt_server.vm.provision "ansible" do |ansible|
ansible.playbook = "./playbook/site.yml"
ansible.extra_vars = {wbench_hosts: {
leaf01: {
ip: '192.168.0.11',
mac: 'a0:00:00:00:00:11'},
leaf02: {
ip: '192.168.0.12',
mac: 'a0:00:00:00:00:12'},
leaf03: {
ip: '192.168.0.13',
mac: 'a0:00:00:00:00:13'},
leaf04: {
ip: '192.168.0.14',
mac: 'a0:00:00:00:00:14'},
spine01: {
ip: '192.168.0.21',
mac: 'a0:00:00:00:00:21'},
spine02: {
ip: '192.168.0.22',
mac: 'a0:00:00:00:00:22'},
server01: {
ip: '192.168.0.31',
mac: 'a0:00:00:00:00:31'},
server02: {
ip: '192.168.0.32',
mac: 'a0:00:00:00:00:32'},
server03: {
ip: '192.168.0.33',
mac: 'a0:00:00:00:00:33'},
server04: {
ip: '192.168.0.34',
mac: 'a0:00:00:00:00:34'},
exit01: {
ip: '192.168.0.41',
mac: 'a0:00:00:00:00:41'},
exit02: {
ip: '192.168.0.42',
mac: 'a0:00:00:00:00:42'},
edge01: {
ip: '192.168.0.51',
mac: 'a0:00:00:00:00:51'}
}}
end
end
##### DEFINE VM for oob-mgmt-switch #####
config.vm.define "oob-mgmt-switch" do |oob_mgmt_switch|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
oob_mgmt_switch.vm.synced_folder '.', '/vagrant', :disabled => true
oob_mgmt_switch.vm.provider :libvirt do |v|
v.memory = 256
end
oob_mgmt_switch.vm.hostname = "oob-mgmt-switch"
oob_mgmt_switch.vm.box = "CumulusCommunity/cumulus-vx"
# Local_Interface: swp1 Topology_File_Line(41): "oob-mgmt-server":"eth1" -- "oob-mgmt-switch":"swp1"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}41",
:libvirt__tunnel_local_port => "#{udp_port_lo}41",
auto_config: false
# Local_Interface: swp2 Topology_File_Line(42): "server01":"eth0" -- "oob-mgmt-switch":"swp2"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}42",
:libvirt__tunnel_local_port => "#{udp_port_lo}42",
auto_config: false
# Local_Interface: swp3 Topology_File_Line(43): "server02":"eth0" -- "oob-mgmt-switch":"swp3"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}43",
:libvirt__tunnel_local_port => "#{udp_port_lo}43",
auto_config: false
# Local_Interface: swp4 Topology_File_Line(44): "server03":"eth0" -- "oob-mgmt-switch":"swp4"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}44",
:libvirt__tunnel_local_port => "#{udp_port_lo}44",
auto_config: false
# Local_Interface: swp5 Topology_File_Line(45): "server04":"eth0" -- "oob-mgmt-switch":"swp5"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}45",
:libvirt__tunnel_local_port => "#{udp_port_lo}45",
auto_config: false
# Local_Interface: swp6 Topology_File_Line(46): "leaf01":"eth0" -- "oob-mgmt-switch":"swp6"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}46",
:libvirt__tunnel_local_port => "#{udp_port_lo}46",
auto_config: false
# Local_Interface: swp7 Topology_File_Line(47): "leaf02":"eth0" -- "oob-mgmt-switch":"swp7"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}47",
:libvirt__tunnel_local_port => "#{udp_port_lo}47",
auto_config: false
# Local_Interface: swp8 Topology_File_Line(48): "leaf03":"eth0" -- "oob-mgmt-switch":"swp8"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}48",
:libvirt__tunnel_local_port => "#{udp_port_lo}48",
auto_config: false
# Local_Interface: swp9 Topology_File_Line(49): "leaf04":"eth0" -- "oob-mgmt-switch":"swp9"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}49",
:libvirt__tunnel_local_port => "#{udp_port_lo}49",
auto_config: false
# Local_Interface: swp10 Topology_File_Line(50): "spine01":"eth0" -- "oob-mgmt-switch":"swp10"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}50",
:libvirt__tunnel_local_port => "#{udp_port_lo}50",
auto_config: false
# Local_Interface: swp11 Topology_File_Line(51): "spine02":"eth0" -- "oob-mgmt-switch":"swp11"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}51",
:libvirt__tunnel_local_port => "#{udp_port_lo}51",
auto_config: false
# Local_Interface: swp12 Topology_File_Line(52): "exit01":"eth0" -- "oob-mgmt-switch":"swp12"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}52",
:libvirt__tunnel_local_port => "#{udp_port_lo}52",
auto_config: false
# Local_Interface: swp13 Topology_File_Line(53): "exit02":"eth0" -- "oob-mgmt-switch":"swp13"
oob_mgmt_switch.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}53",
:libvirt__tunnel_local_port => "#{udp_port_lo}53",
auto_config: false
# Disabling the default synced folder
oob_mgmt_switch.vm.synced_folder ".", "/vagrant", disabled: true
# Run Any Extra Config
oob_mgmt_switch.vm.provision :shell , path: "./helper_scripts/oob_switch_config.sh"
# Apply the interface re-map
oob_mgmt_switch.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
oob_mgmt_switch.vm.provision "file", source: "./helper_scripts/autogenerated/oob-mgmt-switch_remap_eth", destination: "/home/vagrant/remap_eth"
oob_mgmt_switch.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
oob_mgmt_switch.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
oob_mgmt_switch.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
oob_mgmt_switch.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
end
##### DEFINE VM for server01 #####
config.vm.define "server01" do |server01|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
server01.vm.synced_folder '.', '/vagrant', :disabled => true
server01.vm.provider :libvirt do |v|
v.memory = 512
end
server01.vm.hostname = "server01"
server01.vm.box = "boxcutter/ubuntu1404"
# Local_Interface: eth0 Topology_File_Line(42): "server01":"eth0" -- "oob-mgmt-switch":"swp2"
server01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}42",
:libvirt__tunnel_local_port => "#{udp_port_hi}42",
auto_config: false, :mac => "A00000000031"
# Local_Interface: eth1 Topology_File_Line(15): "server01":"eth1" -- "leaf01":"swp1"
server01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}15",
:libvirt__tunnel_local_port => "#{udp_port_hi}15",
auto_config: false
# Local_Interface: eth2 Topology_File_Line(16): "server01":"eth2" -- "leaf02":"swp1"
server01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}16",
:libvirt__tunnel_local_port => "#{udp_port_hi}16",
auto_config: false
# Disabling the default synced folder
server01.vm.synced_folder ".", "/vagrant", disabled: true
# UBUNTU DEVICES ONLY: Shorten Boot Process - remove "Wait for Network"
server01.vm.provision :shell , inline: "sudo sed -i 's/sleep [0-9]*/sleep 1/' /etc/init/failsafe.conf"
# Run Any Extra Config
server01.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
server01.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
server01.vm.provision "file", source: "./helper_scripts/autogenerated/server01_remap_eth", destination: "/home/vagrant/remap_eth"
server01.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
server01.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
server01.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
server01.vm.provision :shell , inline: "sudo sed -i '/exit 0/d' /etc/rc.local "
server01.vm.provision :shell , inline: "sudo echo '/etc/init.d/rename_eth_swp start' >> /etc/rc.local "
server01.vm.provision :shell , inline: "sudo echo 'exit 0' >> /etc/rc.local "
server01.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
server01.vm.provision :shell , path: "./helper_scripts/post_config_server.sh"
end
##### DEFINE VM for server02 #####
config.vm.define "server02" do |server02|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
server02.vm.synced_folder '.', '/vagrant', :disabled => true
server02.vm.provider :libvirt do |v|
v.memory = 512
end
server02.vm.hostname = "server02"
server02.vm.box = "boxcutter/ubuntu1404"
# Local_Interface: eth0 Topology_File_Line(43): "server02":"eth0" -- "oob-mgmt-switch":"swp3"
server02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}43",
:libvirt__tunnel_local_port => "#{udp_port_hi}43",
auto_config: false, :mac => "A00000000032"
# Local_Interface: eth1 Topology_File_Line(17): "server02":"eth1" -- "leaf01":"swp2"
server02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}17",
:libvirt__tunnel_local_port => "#{udp_port_hi}17",
auto_config: false
# Local_Interface: eth2 Topology_File_Line(18): "server02":"eth2" -- "leaf02":"swp2"
server02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}18",
:libvirt__tunnel_local_port => "#{udp_port_hi}18",
auto_config: false
# Disabling the default synced folder
server02.vm.synced_folder ".", "/vagrant", disabled: true
# UBUNTU DEVICES ONLY: Shorten Boot Process - remove "Wait for Network"
server02.vm.provision :shell , inline: "sudo sed -i 's/sleep [0-9]*/sleep 1/' /etc/init/failsafe.conf"
# Run Any Extra Config
server02.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
server02.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
server02.vm.provision "file", source: "./helper_scripts/autogenerated/server02_remap_eth", destination: "/home/vagrant/remap_eth"
server02.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
server02.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
server02.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
server02.vm.provision :shell , inline: "sudo sed -i '/exit 0/d' /etc/rc.local "
server02.vm.provision :shell , inline: "sudo echo '/etc/init.d/rename_eth_swp start' >> /etc/rc.local "
server02.vm.provision :shell , inline: "sudo echo 'exit 0' >> /etc/rc.local "
server02.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
server02.vm.provision :shell , path: "./helper_scripts/post_config_server.sh"
end
##### DEFINE VM for server03 #####
config.vm.define "server03" do |server03|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
server03.vm.synced_folder '.', '/vagrant', :disabled => true
server03.vm.provider :libvirt do |v|
v.memory = 512
end
server03.vm.hostname = "server03"
server03.vm.box = "boxcutter/ubuntu1404"
# Local_Interface: eth0 Topology_File_Line(44): "server03":"eth0" -- "oob-mgmt-switch":"swp4"
server03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}44",
:libvirt__tunnel_local_port => "#{udp_port_hi}44",
auto_config: false, :mac => "A00000000033"
# Local_Interface: eth1 Topology_File_Line(19): "server03":"eth1" -- "leaf03":"swp1"
server03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}19",
:libvirt__tunnel_local_port => "#{udp_port_hi}19",
auto_config: false
# Local_Interface: eth2 Topology_File_Line(20): "server03":"eth2" -- "leaf04":"swp1"
server03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}20",
:libvirt__tunnel_local_port => "#{udp_port_hi}20",
auto_config: false
# Disabling the default synced folder
server03.vm.synced_folder ".", "/vagrant", disabled: true
# UBUNTU DEVICES ONLY: Shorten Boot Process - remove "Wait for Network"
server03.vm.provision :shell , inline: "sudo sed -i 's/sleep [0-9]*/sleep 1/' /etc/init/failsafe.conf"
# Run Any Extra Config
server03.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
server03.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
server03.vm.provision "file", source: "./helper_scripts/autogenerated/server03_remap_eth", destination: "/home/vagrant/remap_eth"
server03.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
server03.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
server03.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
server03.vm.provision :shell , inline: "sudo sed -i '/exit 0/d' /etc/rc.local "
server03.vm.provision :shell , inline: "sudo echo '/etc/init.d/rename_eth_swp start' >> /etc/rc.local "
server03.vm.provision :shell , inline: "sudo echo 'exit 0' >> /etc/rc.local "
server03.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
server03.vm.provision :shell , path: "./helper_scripts/post_config_server.sh"
end
##### DEFINE VM for server04 #####
config.vm.define "server04" do |server04|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
server04.vm.synced_folder '.', '/vagrant', :disabled => true
server04.vm.provider :libvirt do |v|
v.memory = 512
end
server04.vm.hostname = "server04"
server04.vm.box = "boxcutter/ubuntu1404"
# Local_Interface: eth0 Topology_File_Line(45): "server04":"eth0" -- "oob-mgmt-switch":"swp5"
server04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}45",
:libvirt__tunnel_local_port => "#{udp_port_hi}45",
auto_config: false, :mac => "A00000000034"
# Local_Interface: eth1 Topology_File_Line(21): "server04":"eth1" -- "leaf03":"swp2"
server04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}21",
:libvirt__tunnel_local_port => "#{udp_port_hi}21",
auto_config: false
# Local_Interface: eth2 Topology_File_Line(22): "server04":"eth2" -- "leaf04":"swp2"
server04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}22",
:libvirt__tunnel_local_port => "#{udp_port_hi}22",
auto_config: false
# Disabling the default synced folder
server04.vm.synced_folder ".", "/vagrant", disabled: true
# UBUNTU DEVICES ONLY: Shorten Boot Process - remove "Wait for Network"
server04.vm.provision :shell , inline: "sudo sed -i 's/sleep [0-9]*/sleep 1/' /etc/init/failsafe.conf"
# Run Any Extra Config
server04.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
server04.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
server04.vm.provision "file", source: "./helper_scripts/autogenerated/server04_remap_eth", destination: "/home/vagrant/remap_eth"
server04.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
server04.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
server04.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
server04.vm.provision :shell , inline: "sudo sed -i '/exit 0/d' /etc/rc.local "
server04.vm.provision :shell , inline: "sudo echo '/etc/init.d/rename_eth_swp start' >> /etc/rc.local "
server04.vm.provision :shell , inline: "sudo echo 'exit 0' >> /etc/rc.local "
server04.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
server04.vm.provision :shell , path: "./helper_scripts/post_config_server.sh"
end
##### DEFINE VM for leaf01 #####
config.vm.define "leaf01" do |leaf01|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
leaf01.vm.synced_folder '.', '/vagrant', :disabled => true
leaf01.vm.provider :libvirt do |v|
v.memory = 512
end
leaf01.vm.hostname = "leaf01"
leaf01.vm.box = "CumulusCommunity/cumulus-vx"
# Local_Interface: eth0 Topology_File_Line(46): "leaf01":"eth0" -- "oob-mgmt-switch":"swp6"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}46",
:libvirt__tunnel_local_port => "#{udp_port_hi}46",
auto_config: false, :mac => "A00000000011"
# Local_Interface: swp1 Topology_File_Line(15): "server01":"eth1" -- "leaf01":"swp1"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}15",
:libvirt__tunnel_local_port => "#{udp_port_lo}15",
auto_config: false
# Local_Interface: swp2 Topology_File_Line(17): "server02":"eth1" -- "leaf01":"swp2"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}17",
:libvirt__tunnel_local_port => "#{udp_port_lo}17",
auto_config: false
# Local_Interface: swp45 Topology_File_Line(33): "leaf01":"swp45" -- "leaf01":"swp46"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}33",
:libvirt__tunnel_local_port => "#{udp_port_hi}33",
auto_config: false
# Local_Interface: swp46 Topology_File_Line(33): "leaf01":"swp45" -- "leaf01":"swp46"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}33",
:libvirt__tunnel_local_port => "#{udp_port_lo}33",
auto_config: false
# Local_Interface: swp47 Topology_File_Line(34): "leaf01":"swp47" -- "leaf01":"swp48"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}34",
:libvirt__tunnel_local_port => "#{udp_port_hi}34",
auto_config: false
# Local_Interface: swp48 Topology_File_Line(34): "leaf01":"swp47" -- "leaf01":"swp48"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}34",
:libvirt__tunnel_local_port => "#{udp_port_lo}34",
auto_config: false
# Local_Interface: swp49 Topology_File_Line(9): "leaf01":"swp49" -- "leaf02":"swp49"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}09",
:libvirt__tunnel_local_port => "#{udp_port_hi}09",
auto_config: false
# Local_Interface: swp50 Topology_File_Line(10): "leaf01":"swp50" -- "leaf02":"swp50"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}10",
:libvirt__tunnel_local_port => "#{udp_port_hi}10",
auto_config: false
# Local_Interface: swp51 Topology_File_Line(1): "leaf01":"swp51" -- "spine01":"swp1"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}01",
:libvirt__tunnel_local_port => "#{udp_port_hi}01",
auto_config: false
# Local_Interface: swp52 Topology_File_Line(5): "leaf01":"swp52" -- "spine02":"swp1"
leaf01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}05",
:libvirt__tunnel_local_port => "#{udp_port_hi}05",
auto_config: false
# Disabling the default synced folder
leaf01.vm.synced_folder ".", "/vagrant", disabled: true
# Run Any Extra Config
leaf01.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
leaf01.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
leaf01.vm.provision "file", source: "./helper_scripts/autogenerated/leaf01_remap_eth", destination: "/home/vagrant/remap_eth"
leaf01.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
leaf01.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
leaf01.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
leaf01.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
leaf01.vm.provision :shell , path: "./helper_scripts/post_config_switch.sh"
end
##### DEFINE VM for leaf02 #####
config.vm.define "leaf02" do |leaf02|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
leaf02.vm.synced_folder '.', '/vagrant', :disabled => true
leaf02.vm.provider :libvirt do |v|
v.memory = 512
end
leaf02.vm.hostname = "leaf02"
leaf02.vm.box = "CumulusCommunity/cumulus-vx"
# Local_Interface: eth0 Topology_File_Line(47): "leaf02":"eth0" -- "oob-mgmt-switch":"swp7"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}47",
:libvirt__tunnel_local_port => "#{udp_port_hi}47",
auto_config: false, :mac => "A00000000012"
# Local_Interface: swp1 Topology_File_Line(16): "server01":"eth2" -- "leaf02":"swp1"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}16",
:libvirt__tunnel_local_port => "#{udp_port_lo}16",
auto_config: false
# Local_Interface: swp2 Topology_File_Line(18): "server02":"eth2" -- "leaf02":"swp2"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}18",
:libvirt__tunnel_local_port => "#{udp_port_lo}18",
auto_config: false
# Local_Interface: swp45 Topology_File_Line(35): "leaf02":"swp45" -- "leaf02":"swp46"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}35",
:libvirt__tunnel_local_port => "#{udp_port_hi}35",
auto_config: false
# Local_Interface: swp46 Topology_File_Line(35): "leaf02":"swp45" -- "leaf02":"swp46"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}35",
:libvirt__tunnel_local_port => "#{udp_port_lo}35",
auto_config: false
# Local_Interface: swp47 Topology_File_Line(36): "leaf02":"swp47" -- "leaf02":"swp48"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}36",
:libvirt__tunnel_local_port => "#{udp_port_hi}36",
auto_config: false
# Local_Interface: swp48 Topology_File_Line(36): "leaf02":"swp47" -- "leaf02":"swp48"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}36",
:libvirt__tunnel_local_port => "#{udp_port_lo}36",
auto_config: false
# Local_Interface: swp49 Topology_File_Line(9): "leaf01":"swp49" -- "leaf02":"swp49"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}09",
:libvirt__tunnel_local_port => "#{udp_port_lo}09",
auto_config: false
# Local_Interface: swp50 Topology_File_Line(10): "leaf01":"swp50" -- "leaf02":"swp50"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}10",
:libvirt__tunnel_local_port => "#{udp_port_lo}10",
auto_config: false
# Local_Interface: swp51 Topology_File_Line(2): "leaf02":"swp51" -- "spine01":"swp2"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}02",
:libvirt__tunnel_local_port => "#{udp_port_hi}02",
auto_config: false
# Local_Interface: swp52 Topology_File_Line(6): "leaf02":"swp52" -- "spine02":"swp2"
leaf02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}06",
:libvirt__tunnel_local_port => "#{udp_port_hi}06",
auto_config: false
# Disabling the default synced folder
leaf02.vm.synced_folder ".", "/vagrant", disabled: true
# Run Any Extra Config
leaf02.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
leaf02.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
leaf02.vm.provision "file", source: "./helper_scripts/autogenerated/leaf02_remap_eth", destination: "/home/vagrant/remap_eth"
leaf02.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
leaf02.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
leaf02.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
leaf02.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
leaf02.vm.provision :shell , path: "./helper_scripts/post_config_switch.sh"
end
##### DEFINE VM for leaf03 #####
config.vm.define "leaf03" do |leaf03|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
leaf03.vm.synced_folder '.', '/vagrant', :disabled => true
leaf03.vm.provider :libvirt do |v|
v.memory = 512
end
leaf03.vm.hostname = "leaf03"
leaf03.vm.box = "CumulusCommunity/cumulus-vx"
# Local_Interface: eth0 Topology_File_Line(48): "leaf03":"eth0" -- "oob-mgmt-switch":"swp8"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}48",
:libvirt__tunnel_local_port => "#{udp_port_hi}48",
auto_config: false, :mac => "A00000000013"
# Local_Interface: swp1 Topology_File_Line(19): "server03":"eth1" -- "leaf03":"swp1"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}19",
:libvirt__tunnel_local_port => "#{udp_port_lo}19",
auto_config: false
# Local_Interface: swp2 Topology_File_Line(21): "server04":"eth1" -- "leaf03":"swp2"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}21",
:libvirt__tunnel_local_port => "#{udp_port_lo}21",
auto_config: false
# Local_Interface: swp45 Topology_File_Line(37): "leaf03":"swp45" -- "leaf03":"swp46"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}37",
:libvirt__tunnel_local_port => "#{udp_port_hi}37",
auto_config: false
# Local_Interface: swp46 Topology_File_Line(37): "leaf03":"swp45" -- "leaf03":"swp46"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}37",
:libvirt__tunnel_local_port => "#{udp_port_lo}37",
auto_config: false
# Local_Interface: swp47 Topology_File_Line(38): "leaf03":"swp47" -- "leaf03":"swp48"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}38",
:libvirt__tunnel_local_port => "#{udp_port_hi}38",
auto_config: false
# Local_Interface: swp48 Topology_File_Line(38): "leaf03":"swp47" -- "leaf03":"swp48"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}38",
:libvirt__tunnel_local_port => "#{udp_port_lo}38",
auto_config: false
# Local_Interface: swp49 Topology_File_Line(11): "leaf03":"swp49" -- "leaf04":"swp49"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}11",
:libvirt__tunnel_local_port => "#{udp_port_hi}11",
auto_config: false
# Local_Interface: swp50 Topology_File_Line(12): "leaf03":"swp50" -- "leaf04":"swp50"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}12",
:libvirt__tunnel_local_port => "#{udp_port_hi}12",
auto_config: false
# Local_Interface: swp51 Topology_File_Line(3): "leaf03":"swp51" -- "spine01":"swp3"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}03",
:libvirt__tunnel_local_port => "#{udp_port_hi}03",
auto_config: false
# Local_Interface: swp52 Topology_File_Line(7): "leaf03":"swp52" -- "spine02":"swp3"
leaf03.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}07",
:libvirt__tunnel_local_port => "#{udp_port_hi}07",
auto_config: false
# Disabling the default synced folder
leaf03.vm.synced_folder ".", "/vagrant", disabled: true
# Run Any Extra Config
leaf03.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
leaf03.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
leaf03.vm.provision "file", source: "./helper_scripts/autogenerated/leaf03_remap_eth", destination: "/home/vagrant/remap_eth"
leaf03.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
leaf03.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
leaf03.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
leaf03.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
leaf03.vm.provision :shell , path: "./helper_scripts/post_config_switch.sh"
end
##### DEFINE VM for leaf04 #####
config.vm.define "leaf04" do |leaf04|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
leaf04.vm.synced_folder '.', '/vagrant', :disabled => true
leaf04.vm.provider :libvirt do |v|
v.memory = 512
end
leaf04.vm.hostname = "leaf04"
leaf04.vm.box = "CumulusCommunity/cumulus-vx"
# Local_Interface: eth0 Topology_File_Line(49): "leaf04":"eth0" -- "oob-mgmt-switch":"swp9"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}49",
:libvirt__tunnel_local_port => "#{udp_port_hi}49",
auto_config: false, :mac => "A00000000014"
# Local_Interface: swp1 Topology_File_Line(20): "server03":"eth2" -- "leaf04":"swp1"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}20",
:libvirt__tunnel_local_port => "#{udp_port_lo}20",
auto_config: false
# Local_Interface: swp2 Topology_File_Line(22): "server04":"eth2" -- "leaf04":"swp2"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}22",
:libvirt__tunnel_local_port => "#{udp_port_lo}22",
auto_config: false
# Local_Interface: swp45 Topology_File_Line(39): "leaf04":"swp45" -- "leaf04":"swp46"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}39",
:libvirt__tunnel_local_port => "#{udp_port_hi}39",
auto_config: false
# Local_Interface: swp46 Topology_File_Line(39): "leaf04":"swp45" -- "leaf04":"swp46"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}39",
:libvirt__tunnel_local_port => "#{udp_port_lo}39",
auto_config: false
# Local_Interface: swp47 Topology_File_Line(40): "leaf04":"swp47" -- "leaf04":"swp48"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}40",
:libvirt__tunnel_local_port => "#{udp_port_hi}40",
auto_config: false
# Local_Interface: swp48 Topology_File_Line(40): "leaf04":"swp47" -- "leaf04":"swp48"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}40",
:libvirt__tunnel_local_port => "#{udp_port_lo}40",
auto_config: false
# Local_Interface: swp49 Topology_File_Line(11): "leaf03":"swp49" -- "leaf04":"swp49"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}11",
:libvirt__tunnel_local_port => "#{udp_port_lo}11",
auto_config: false
# Local_Interface: swp50 Topology_File_Line(12): "leaf03":"swp50" -- "leaf04":"swp50"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}12",
:libvirt__tunnel_local_port => "#{udp_port_lo}12",
auto_config: false
# Local_Interface: swp51 Topology_File_Line(4): "leaf04":"swp51" -- "spine01":"swp4"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}04",
:libvirt__tunnel_local_port => "#{udp_port_hi}04",
auto_config: false
# Local_Interface: swp52 Topology_File_Line(8): "leaf04":"swp52" -- "spine02":"swp4"
leaf04.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}08",
:libvirt__tunnel_local_port => "#{udp_port_hi}08",
auto_config: false
# Disabling the default synced folder
leaf04.vm.synced_folder ".", "/vagrant", disabled: true
# Run Any Extra Config
leaf04.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
leaf04.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
leaf04.vm.provision "file", source: "./helper_scripts/autogenerated/leaf04_remap_eth", destination: "/home/vagrant/remap_eth"
leaf04.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
leaf04.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
leaf04.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
leaf04.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
leaf04.vm.provision :shell , path: "./helper_scripts/post_config_switch.sh"
end
##### DEFINE VM for spine01 #####
config.vm.define "spine01" do |spine01|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
spine01.vm.synced_folder '.', '/vagrant', :disabled => true
spine01.vm.provider :libvirt do |v|
v.memory = 512
end
spine01.vm.hostname = "spine01"
spine01.vm.box = "CumulusCommunity/cumulus-vx"
# Local_Interface: eth0 Topology_File_Line(50): "spine01":"eth0" -- "oob-mgmt-switch":"swp10"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}50",
:libvirt__tunnel_local_port => "#{udp_port_hi}50",
auto_config: false, :mac => "A00000000021"
# Local_Interface: swp1 Topology_File_Line(1): "leaf01":"swp51" -- "spine01":"swp1"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}01",
:libvirt__tunnel_local_port => "#{udp_port_lo}01",
auto_config: false
# Local_Interface: swp2 Topology_File_Line(2): "leaf02":"swp51" -- "spine01":"swp2"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}02",
:libvirt__tunnel_local_port => "#{udp_port_lo}02",
auto_config: false
# Local_Interface: swp3 Topology_File_Line(3): "leaf03":"swp51" -- "spine01":"swp3"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}03",
:libvirt__tunnel_local_port => "#{udp_port_lo}03",
auto_config: false
# Local_Interface: swp4 Topology_File_Line(4): "leaf04":"swp51" -- "spine01":"swp4"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}04",
:libvirt__tunnel_local_port => "#{udp_port_lo}04",
auto_config: false
# Local_Interface: swp29 Topology_File_Line(25): "exit02":"swp51" -- "spine01":"swp29"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}25",
:libvirt__tunnel_local_port => "#{udp_port_lo}25",
auto_config: false
# Local_Interface: swp30 Topology_File_Line(23): "exit01":"swp51" -- "spine01":"swp30"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}23",
:libvirt__tunnel_local_port => "#{udp_port_lo}23",
auto_config: false
# Local_Interface: swp31 Topology_File_Line(13): "spine01":"swp31" -- "spine02":"swp31"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}13",
:libvirt__tunnel_local_port => "#{udp_port_hi}13",
auto_config: false
# Local_Interface: swp32 Topology_File_Line(14): "spine01":"swp32" -- "spine02":"swp32"
spine01.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}14",
:libvirt__tunnel_local_port => "#{udp_port_hi}14",
auto_config: false
# Disabling the default synced folder
spine01.vm.synced_folder ".", "/vagrant", disabled: true
# Run Any Extra Config
spine01.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
spine01.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
spine01.vm.provision "file", source: "./helper_scripts/autogenerated/spine01_remap_eth", destination: "/home/vagrant/remap_eth"
spine01.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
spine01.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
spine01.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
spine01.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
spine01.vm.provision :shell , path: "./helper_scripts/post_config_switch.sh"
end
##### DEFINE VM for spine02 #####
config.vm.define "spine02" do |spine02|
# disabling sync folder support on all VMs
# see note here: https://github.com/pradels/vagrant-libvirt#synced-folders
spine02.vm.synced_folder '.', '/vagrant', :disabled => true
spine02.vm.provider :libvirt do |v|
v.memory = 512
end
spine02.vm.hostname = "spine02"
spine02.vm.box = "CumulusCommunity/cumulus-vx"
# Local_Interface: eth0 Topology_File_Line(51): "spine02":"eth0" -- "oob-mgmt-switch":"swp11"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_lo}51",
:libvirt__tunnel_local_port => "#{udp_port_hi}51",
auto_config: false, :mac => "A00000000022"
# Local_Interface: swp1 Topology_File_Line(5): "leaf01":"swp52" -- "spine02":"swp1"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}05",
:libvirt__tunnel_local_port => "#{udp_port_lo}05",
auto_config: false
# Local_Interface: swp2 Topology_File_Line(6): "leaf02":"swp52" -- "spine02":"swp2"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}06",
:libvirt__tunnel_local_port => "#{udp_port_lo}06",
auto_config: false
# Local_Interface: swp3 Topology_File_Line(7): "leaf03":"swp52" -- "spine02":"swp3"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}07",
:libvirt__tunnel_local_port => "#{udp_port_lo}07",
auto_config: false
# Local_Interface: swp4 Topology_File_Line(8): "leaf04":"swp52" -- "spine02":"swp4"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}08",
:libvirt__tunnel_local_port => "#{udp_port_lo}08",
auto_config: false
# Local_Interface: swp29 Topology_File_Line(26): "exit02":"swp52" -- "spine02":"swp29"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}26",
:libvirt__tunnel_local_port => "#{udp_port_lo}26",
auto_config: false
# Local_Interface: swp30 Topology_File_Line(24): "exit01":"swp52" -- "spine02":"swp30"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}24",
:libvirt__tunnel_local_port => "#{udp_port_lo}24",
auto_config: false
# Local_Interface: swp31 Topology_File_Line(13): "spine01":"swp31" -- "spine02":"swp31"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}13",
:libvirt__tunnel_local_port => "#{udp_port_lo}13",
auto_config: false
# Local_Interface: swp32 Topology_File_Line(14): "spine01":"swp32" -- "spine02":"swp32"
spine02.vm.network "private_network",
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => "#{udp_port_hi}14",
:libvirt__tunnel_local_port => "#{udp_port_lo}14",
auto_config: false
# Disabling the default synced folder
spine02.vm.synced_folder ".", "/vagrant", disabled: true
# Run Any Extra Config
spine02.vm.provision :shell , path: "./helper_scripts/pre_config.sh"
# Apply the interface re-map
spine02.vm.provision "file", source: "./helper_scripts/rename_eth_swp", destination: "/home/vagrant/rename_eth_swp"
spine02.vm.provision "file", source: "./helper_scripts/autogenerated/spine02_remap_eth", destination: "/home/vagrant/remap_eth"
spine02.vm.provision :shell , inline: "mv /home/vagrant/rename_eth_swp /etc/init.d/rename_eth_swp"
spine02.vm.provision :shell , inline: "mv /home/vagrant/remap_eth /etc/default/remap_eth"
spine02.vm.provision :shell , inline: "chmod 755 /etc/init.d/rename_eth_swp"
spine02.vm.provision :shell , inline: "/etc/init.d/rename_eth_swp verbose"
spine02.vm.provision :shell , path: "./helper_scripts/post_config_switch.sh"
end
##### DEFINE VM for exit01 #####