fix: [fmt] ran packer fix misp.json now more clean

pull/23/head
Steve Clement 2020-04-30 11:21:00 +09:00
parent 0376239695
commit e87c943f79
No known key found for this signature in database
GPG Key ID: 69A20F509BE4AEE9
1 changed files with 122 additions and 120 deletions

View File

@ -1,6 +1,7 @@
{
"_comment": "MISP VM Autogen packer build system",
"builders": [{
"builders": [
{
"boot_command": [
"{{ user `boot_command_prefix` }}",
"/install/vmlinuz noapic ",
@ -20,8 +21,7 @@
"-- <enter>"
],
"disk_size": "{{user `disk_size`}}",
"export_opts":
[
"export_opts": [
"--manifest",
"--vsys", "0",
"--eulafile", "/tmp/LICENSE-misp",
@ -33,9 +33,9 @@
"guest_os_type": "Ubuntu_64",
"hard_drive_interface": "sata",
"headless": "{{user `headless`}}",
"http_directory" : "preseeds",
"http_port_min" : 9001,
"http_port_max" : 9011,
"http_directory": "preseeds",
"http_port_max": 9011,
"http_port_min": 9001,
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_urls": [
@ -44,30 +44,30 @@
],
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"ssh_password": "{{user `ssh_pass`}}",
"ssh_pty" : "true",
"ssh_pty": "true",
"ssh_timeout": "20m",
"ssh_username": "{{user `ssh_name`}}",
"type": "virtualbox-iso",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"],
["modifyvm", "{{.Name}}", "--natpf1", "ssh,tcp,,2222,0.0.0.0,22" ],
["modifyvm", "{{.Name}}", "--natpf1", "http,tcp,,8080,,80" ],
["modifyvm", "{{.Name}}", "--natpf1", "https,tcp,,8443,,443" ],
["modifyvm", "{{.Name}}", "--natpf1", "dashboard,tcp,,8001,0.0.0.0,8001" ],
["modifyvm", "{{.Name}}", "--natpf1", "viper,tcp,,8888,0.0.0.0,8888" ],
["modifyvm", "{{.Name}}", "--natpf1", "jupyter-notebook,tcp,,8889,0.0.0.0,8889" ],
["modifyvm", "{{.Name}}", "--natpf1", "misp-modules,tcp,,1666,0.0.0.0,6666" ],
["modifyvm", "{{.Name}}", "--audio", "none"],
["modifyvm", "{{.Name}}", "--graphicscontroller", "vmsvga"],
["modifyvm", "{{.Name}}", "--usb", "off"],
["modifyvm", "{{.Name}}", "--vrde", "off"],
["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"],
["modifyvm", "{{.Name}}", "--vram", "32"]
[ "modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}" ],
[ "modifyvm", "{{.Name}}", "--natpf1", "ssh,tcp,,2222,0.0.0.0,22" ],
[ "modifyvm", "{{.Name}}", "--natpf1", "http,tcp,,8080,,80" ],
[ "modifyvm", "{{.Name}}", "--natpf1", "https,tcp,,8443,,443" ],
[ "modifyvm", "{{.Name}}", "--natpf1", "dashboard,tcp,,8001,0.0.0.0,8001" ],
[ "modifyvm", "{{.Name}}", "--natpf1", "viper,tcp,,8888,0.0.0.0,8888" ],
[ "modifyvm", "{{.Name}}", "--natpf1", "jupyter-notebook,tcp,,8889,0.0.0.0,8889" ],
[ "modifyvm", "{{.Name}}", "--natpf1", "misp-modules,tcp,,1666,0.0.0.0,6666" ],
[ "modifyvm", "{{.Name}}", "--audio", "none" ],
[ "modifyvm", "{{.Name}}", "--graphicscontroller", "vmsvga" ],
[ "modifyvm", "{{.Name}}", "--usb", "off" ],
[ "modifyvm", "{{.Name}}", "--vrde", "off" ],
[ "modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}" ],
[ "modifyvm", "{{.Name}}", "--vram", "32" ]
],
"vm_name": "{{user `vm_name`}}"
},
{
"boot_command" : [
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
@ -81,9 +81,9 @@
"disk_size": "{{user `disk_size`}}",
"guest_os_type": "ubuntu-64",
"headless": "{{user `headless`}}",
"http_directory" : "preseeds",
"http_port_min" : 9001,
"http_port_max" : 9011,
"http_directory": "preseeds",
"http_port_max": 9011,
"http_port_min": 9001,
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_urls": [
@ -94,14 +94,15 @@
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"skip_compaction": false,
"ssh_password": "{{user `ssh_pass`}}",
"ssh_pty" : "true",
"ssh_pty": "true",
"ssh_timeout": "20m",
"ssh_username": "{{user `ssh_name`}}",
"type": "vmware-iso",
"vm_name": "{{user `vm_name`}}"
}
],
"provisioners": [{
"provisioners": [
{
"environment_vars": [
"DESKTOP={{user `desktop`}}",
"UPDATE={{user `update`}}",
@ -116,18 +117,18 @@
"type": "shell"
},
{
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"script": "scripts/users.sh",
"type": "shell"
},
{
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"script": "scripts/interfaces.sh",
"type": "shell"
},
{
"source" : "scripts/INSTALL.sh",
"destination": "/tmp/INSTALL.sh",
"source": "scripts/INSTALL.sh",
"type": "file"
},
{
@ -144,21 +145,21 @@
"type": "shell"
},
{
"source" : "conffiles/crontab",
"destination": "/tmp/crontab",
"source": "conffiles/crontab",
"type": "file"
},
{
"source" : "conffiles/issue",
"destination": "/tmp/issue",
"source": "conffiles/issue",
"type": "file"
},
{
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"script": "scripts/clean.sh",
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"expect_disconnect": "true",
"pause_before": "10s",
"pause_after": "30s",
"pause_before": "10s",
"script": "scripts/clean.sh",
"type": "shell"
}
],
@ -179,7 +180,7 @@
"memory": "3072",
"no_proxy": "{{env `no_proxy`}}",
"ovftool_path": "ovftool",
"preseed":"preseed.cfg",
"preseed": "preseed.cfg",
"ssh_fullname": "misp",
"ssh_name": "misp",
"ssh_pass": "Password1234",
@ -189,3 +190,4 @@
"vm_version": "2.4"
}
}