chg: [preseed] Adapted preseed to a 18.04 world

17.10
Steve Clement 2018-07-20 18:04:41 +02:00
parent f045648fe3
commit dfcbd5bdc2
1 changed files with 28 additions and 3 deletions

View File

@ -1,12 +1,24 @@
{
"_comment": "MISP VM Autogen packer build system",
"variables": {
"boot_command_prefix": "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"preseed":"preseed.cfg",
"ssh_fullname": "misp",
"ssh_name": "misp",
"ssh_pass": "Password1234",
"desktop": "false",
"update": "true",
"headless": "true",
"no_proxy": "{{env `no_proxy`}}",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"hostname": "misp",
"vm_version": "2.4",
"vm_description": "MISP, is an open source software solution for collecting, storing, distributing and sharing cyber security indicators and threat about cyber security incidents analysis and malware analysis. MISP is designed by and for incident analysts, security and ICT professionals or malware reverser to support their day-to-day operations to share structured informations efficiently.",
"vm_name": "MISP_demo",
"disk_size": "25000"
"disk_size": "25000",
"memory": "2048",
"cpus": "1"
},
"builders": [{
@ -26,13 +38,17 @@
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["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", "misp-modules,tcp,,1666,0.0.0.0,6666" ],
["modifyvm", "{{.Name}}", "--audio", "none"]
["modifyvm", "{{.Name}}", "--usb", "off"]
["modifyvm", "{{.Name}}", "--vrde", "off"]
["modifyvm", "{{.Name}}", "--cpus", "{{user `env cpus`}}"]
["modifyvm", "{{.Name}}", "--vram", "32"]
],
@ -54,6 +70,7 @@
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"boot_command" : [
"{{user `boot_command_prefix`}}",
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
@ -89,7 +106,7 @@
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"vmx_data": {
"memsize": "2048"
"memsize": "{{user `memory`}}"
},
"boot_command" : [
@ -109,6 +126,13 @@
],
"provisioners": [{
"environment_vars": [
"DESKTOP={{user `desktop`}}",
"UPDATE={{user `update`}}",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
"no_proxy={{user `no_proxy`}}"
],
"type": "shell",
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"inline": [
@ -123,6 +147,7 @@
}],
"post-processors":[{
"keep_input_artifact": "false",
"type": "checksum",
"checksum_types": ["sha1", "sha256", "sha384", "sha512"]
}]