This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVagrantfile
112 lines (97 loc) · 3.71 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
require "vagrant-host-shell"
require "vagrant-junos"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "client", primary: true do |ndo|
ndo.vm.box = "juniper/netdevops-ubuntu1404-headless"
ndo.vm.hostname = "Client"
ndo.vm.network "private_network",
ip: "172.16.0.10",
virtualbox__intnet: "NetDevOps-Client"
ndo.vm.synced_folder "", "/vagrant", disabled: true
ndo.ssh.password = "vagrant"
#Virtualbox configuration
ndo.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", "1024"]
end
#VMware configuration
ndo.vm.provider "vmware_fusion" do |v|
v.vmx["memsize"] = "1024"
v.vmx["vhv.enable"] = "TRUE"
v.vmx["ethernet1.generatedAddress"] = nil
v.vmx["ethernet1.connectionType"] = "custom"
v.vmx["ethernet1.present"] = "TRUE"
v.vmx["ethernet1.vnet"] = "vmnet0"
end
ndo.vm.provision "shell" do |s|
# this script provisions the ndo box for you
s.path = "scripts/ndo-setup-client.sh"
end
end
config.vm.define "server", primary: true do |ndo|
ndo.vm.box = "juniper/netdevops-ubuntu1404-headless"
ndo.vm.hostname = "Server"
ndo.vm.network "private_network",
ip: "192.168.0.10",
virtualbox__intnet: "NetDevOps-Server"
ndo.vm.synced_folder "", "/vagrant", disabled: true
ndo.ssh.password = "vagrant"
#Virtualbox Configuration
ndo.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", "1024"]
end
#VMware configuration
ndo.vm.provider "vmware_fusion" do |v|
v.vmx["memsize"] = "1024"
v.vmx["ethernet1.generatedAddress"] = nil
v.vmx["ethernet1.connectionType"] = "custom"
v.vmx["ethernet1.present"] = "TRUE"
v.vmx["ethernet1.vnet"] = "vmnet1"
end
ndo.vm.provision "shell" do |s|
# this script provisions the ndo box for you
s.path = "scripts/ndo-setup-server.sh"
end
end
config.vm.define "srx" do |srx|
srx.vm.box = "juniper/ffp-12.1X47-D20.7"
srx.vm.hostname = "vSRX"
srx.vm.network "private_network",
ip: "172.16.0.1",
nic_type: 'virtio',
virtualbox__intnet: "NetDevOps-Client"
srx.vm.network "private_network",
ip: "192.168.0.1",
nic_type: 'virtio',
virtualbox__intnet: "NetDevOps-Server"
srx.vm.synced_folder "", "/vagrant", disabled: true
srx.vm.provider "virtualbox" do |v|
# increase RAM to support AppFW and IPS
# comment out to make it run at 2GB
v.customize ["modifyvm", :id, "--memory", "3072"]
v.check_guest_additions = false
end
#VMware configuration
srx.vm.provider "vmware_fusion" do |v|
v.vmx["memsize"] = "3072"
v.vmx["ethernet1.generatedAddress"] = nil
v.vmx["ethernet1.connectionType"] = "custom"
v.vmx["ethernet1.present"] = "TRUE"
v.vmx["ethernet1.vnet"] = "vmnet0"
v.vmx["ethernet2.generatedAddress"] = nil
v.vmx["ethernet2.connectionType"] = "custom"
v.vmx["ethernet2.present"] = "TRUE"
v.vmx["ethernet2.vnet"] = "vmnet1"
end
#
srx.vm.provision "file", source: "vSRX-configs/inital.cfg", destination: "/cf/root/inital.cfg"
srx.vm.provision "file", source: "vSRX-configs/nopolicy.cfg", destination: "/cf/root/nopolicy.cfg"
srx.vm.provision :host_shell do |host_shell|
# provides the inital configuration
host_shell.inline = 'vagrant ssh srx -c "/usr/sbin/cli -f /cf/root/inital.cfg"'
end
end
end