/
X47-D10.4.json
180 lines (179 loc) · 8.91 KB
/
X47-D10.4.json
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
{
"variables": {
"product": "vsrx",
"junos_release": "12.1",
"junos_version": "X47-D10.4",
"suffix": "domestic",
"box_version": "0.5.0",
"box_version_description": "functional-zone management + automated Atlas uploads",
"vmware_boot_wait": "60s",
"virtualbox_boot_wait": "60s",
"vmx_source_path": "./images/vmx",
"ova_source_path": "./images/fixedova",
"output_path": "./builds",
"vagrant_insecure_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key",
"vagrant_user": "vagrant",
"vmware_nic1_network": "hostonly",
"vmware_nic2_network": "hostonly",
"vmware_nic3_network": "hostonly",
"vmware_nic4_network": "hostonly",
"vmware_nic5_network": "hostonly",
"vmware_nic6_network": "hostonly",
"vmware_nic7_network": "hostonly",
"vmware_nic8_network": "hostonly",
"vmware_nic9_network": "hostonly",
"virtualbox_nic2_network": "intnet",
"virtualbox_nic3_network": "intnet",
"virtualbox_nic4_network": "intnet",
"virtualbox_nic5_network": "intnet",
"virtualbox_nic6_network": "intnet",
"virtualbox_nic7_network": "intnet",
"virtualbox_nic8_network": "intnet"
},
"builders": [
{
"type": "vmware-vmx",
"boot_wait": "{{user `vmware_boot_wait`}}",
"boot_command": [
"root<enter><wait5>",
"chown -R root:wheel /cf/root<enter><wait10>",
"chown -R root:wheel /cf/etc<enter><wait10>",
"sysctl -w net.inet.ip.mcast_ttl=64<enter><wait5>",
"cli<enter><wait><wait>",
"conf<enter><wait>",
"set system host-name vsrx<enter><wait>",
"set system services netconf ssh<enter><wait>",
"set system root-authentication plain-text-password<enter><wait>",
"Juniper<enter>Juniper<enter><wait>",
"set system root-authentication ssh-rsa \"{{user `vagrant_insecure_public_key`}}\"<enter><wait10>",
"set system services ssh root-login allow<enter><wait>",
"set system login user {{user `vagrant_user`}} class super-user<enter><wait>",
"set system login user {{user `vagrant_user`}} authentication ssh-rsa \"{{user `vagrant_insecure_public_key`}}\"<enter><wait10>",
"set interfaces ge-0/0/0.0 family inet dhcp<enter><wait>",
"delete security zones security-zone untrust interfaces ge-0/0/0.0<enter><wait>",
"set security zones functional-zone management interfaces ge-0/0/0.0 host-inbound-traffic protocols all<enter><wait>",
"set security zones functional-zone management interfaces ge-0/0/0.0 host-inbound-traffic system-services all<enter><wait>",
"commit and-quit<enter><wait10>",
"exit<enter><wait>"
],
"source_path": "{{user `vmx_source_path`}}/{{user `junos_version`}}/junos-{{user `product`}}-{{user `junos_release`}}{{user `junos_version`}}-{{user `suffix`}}.vmx",
"ssh_username": "root",
"ssh_password": "Juniper",
"vnc_port_min": "5800",
"vnc_port_max": "5900",
"shutdown_command": "echo 'shutdown -p now' > shutdown.sh; chmod 755 shutdown.sh; sh shutdown.sh",
"vmx_data": {
"ethernet0.connectionType": "nat",
"ethernet1.present": "true",
"ethernet1.startConnected": "true",
"ethernet1.connectionType": "{{user `vmware_nic1_network`}}",
"ethernet2.present": "true",
"ethernet2.connectionType": "{{user `vmware_nic2_network`}}",
"ethernet3.present": "true",
"ethernet3.connectionType": "{{user `vmware_nic3_network`}}",
"ethernet4.present": "true",
"ethernet4.connectionType": "{{user `vmware_nic4_network`}}",
"ethernet5.present": "true",
"ethernet5.connectionType": "{{user `vmware_nic5_network`}}",
"ethernet6.present": "true",
"ethernet6.connectionType": "{{user `vmware_nic6_network`}}",
"ethernet7.present": "true",
"ethernet7.connectionType": "{{user `vmware_nic7_network`}}",
"ethernet8.present": "true",
"ethernet8.connectionType": "{{user `vmware_nic8_network`}}",
"ethernet9.present": "true",
"ethernet9.connectionType": "{{user `vmware_nic9_network`}}"
}
},
{
"type": "virtualbox-ovf",
"boot_wait": "{{user `virtualbox_boot_wait`}}",
"boot_command": [
"root<enter><wait5>",
"chown -R root:wheel /cf/root<enter><wait10>",
"chown -R root:wheel /cf/etc<enter><wait10>",
"sysctl -w net.inet.ip.mcast_ttl=64<enter><wait5>",
"cli<enter><wait><wait>",
"conf<enter><wait>",
"set system host-name vsrx<enter><wait>",
"set system services netconf ssh<enter><wait>",
"set system root-authentication plain-text-password<enter><wait>",
"Juniper<enter>Juniper<enter><wait>",
"set system root-authentication ssh-rsa \"{{user `vagrant_insecure_public_key`}}\"<enter><wait10>",
"set system services ssh root-login allow<enter><wait>",
"set system login user {{user `vagrant_user`}} class super-user<enter><wait>",
"set system login user {{user `vagrant_user`}} authentication ssh-rsa \"{{user `vagrant_insecure_public_key`}}\"<enter><wait10>",
"set interfaces ge-0/0/0.0 family inet dhcp<enter><wait>",
"delete security zones security-zone untrust interfaces ge-0/0/0.0<enter><wait>",
"set security zones functional-zone management interfaces ge-0/0/0.0 host-inbound-traffic protocols all<enter><wait>",
"set security zones functional-zone management interfaces ge-0/0/0.0 host-inbound-traffic system-services all<enter><wait>",
"commit and-quit<enter><wait10>",
"exit<enter><wait>"
],
"guest_additions_mode": "disable",
"source_path": "{{user `ova_source_path`}}/junos-{{user `product`}}-{{user `junos_release`}}{{user `junos_version`}}-{{user `suffix`}}.ova",
"ssh_username": "root",
"ssh_password": "Juniper",
"shutdown_command": "echo 'shutdown -p now' > shutdown.sh; chmod 755 shutdown.sh; sh shutdown.sh",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["modifyvm", "{{.Name}}", "--cpus", "2"],
["modifyvm", "{{.Name}}", "--vram", "10"],
["modifyvm", "{{.Name}}", "--nictype1", "virtio"],
["modifyvm", "{{.Name}}", "--nic1", "nat"],
["modifyvm", "{{.Name}}", "--nicpromisc1", "allow-all"],
["modifyvm", "{{.Name}}", "--nictype2", "virtio"],
["modifyvm", "{{.Name}}", "--nic2", "{{user `virtualbox_nic2_network`}}"],
["modifyvm", "{{.Name}}", "--nicpromisc2", "allow-all"],
["modifyvm", "{{.Name}}", "--nictype3", "virtio"],
["modifyvm", "{{.Name}}", "--nic3", "{{user `virtualbox_nic3_network`}}"],
["modifyvm", "{{.Name}}", "--nicpromisc3", "allow-all"],
["modifyvm", "{{.Name}}", "--nictype4", "virtio"],
["modifyvm", "{{.Name}}", "--nic4", "{{user `virtualbox_nic4_network`}}"],
["modifyvm", "{{.Name}}", "--nicpromisc4", "allow-all"],
["modifyvm", "{{.Name}}", "--nictype5", "virtio"],
["modifyvm", "{{.Name}}", "--nic5", "{{user `virtualbox_nic5_network`}}"],
["modifyvm", "{{.Name}}", "--nicpromisc5", "allow-all"],
["modifyvm", "{{.Name}}", "--nictype6", "virtio"],
["modifyvm", "{{.Name}}", "--nic6", "{{user `virtualbox_nic6_network`}}"],
["modifyvm", "{{.Name}}", "--nicpromisc6", "allow-all"],
["modifyvm", "{{.Name}}", "--nictype7", "virtio"],
["modifyvm", "{{.Name}}", "--nic7", "{{user `virtualbox_nic7_network`}}"],
["modifyvm", "{{.Name}}", "--nicpromisc7", "allow-all"],
["modifyvm", "{{.Name}}", "--nictype8", "virtio"],
["modifyvm", "{{.Name}}", "--nic8", "{{user `virtualbox_nic8_network`}}"],
["modifyvm", "{{.Name}}", "--nicpromisc8", "allow-all"],
["modifyvm", "{{.Name}}", "--boot1", "disk"],
["modifyvm", "{{.Name}}", "--uart1", "0x3F8", "4"],
["modifyvm", "{{.Name}}", "--uartmode1", "disconnected"]
]
}
],
"post-processors": [
{
"type": "vagrant",
"output": "{{user `output_path`}}/{{.Provider}}/junos-{{user `product`}}-{{user `junos_version`}}-{{.Provider}}.box",
"vagrantfile_template": "./tpl/X47-D10.4.tpl"
}
],
"provisioners": [
{
"type": "file",
"source": "scripts/junos/rc.custom",
"destination": "/cf/etc/rc.custom"
},
{
"type": "file",
"source": "scripts/junos/loader.conf",
"destination": "/cf/boot/loader.conf"
},
{
"type": "shell",
"execute_command": "sh {{.Path}}",
"inline": [
"chmod 0755 /cf/etc/rc.custom",
"ls -la /cf/etc/rc.custom"
]
}
]
}