misp-packer/misp.json

108 lines
3.6 KiB
JSON

{
"variables": {
"ssh_name": "misp",
"ssh_pass": "Password1234",
"hostname": "misp",
"vm_name": "MISP_demo",
"disk_size": "10000"
},
"builders": [{
"type": "virtualbox-iso",
"headless": "true",
"guest_os_type": "Ubuntu_64",
"format": "ova",
"vm_name": "{{user `vm_name`}}",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--vram", "32"]
],
"disk_size": "{{user `disk_size`}}",
"iso_url": "http://releases.ubuntu.com/17.10/ubuntu-17.10.1-server-amd64.iso",
"iso_checksum": "8ff73f1b622276758475c3bd5190b382774626de5a82c50930519381f6c3a3f8",
"iso_checksum_type": "sha256",
"http_directory" : "preseeds",
"http_port_min" : 9001,
"http_port_max" : 9011,
"ssh_username": "{{user `ssh_name`}}",
"ssh_password": "{{user `ssh_pass`}}",
"ssh_wait_timeout": "20m",
"ssh_pty" : "true",
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"boot_command" : [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{user `hostname`}} ",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
"initrd=/install/initrd.gz -- <enter>"
]
},
{
"type": "vmware-iso",
"headless": "true",
"guest_os_type": "ubuntu-64",
"vm_name": "{{user `vm_name`}}",
"disk_size": "{{user `disk_size`}}",
"iso_url": "http://releases.ubuntu.com/17.10/ubuntu-17.10.1-server-amd64.iso",
"iso_checksum": "8ff73f1b622276758475c3bd5190b382774626de5a82c50930519381f6c3a3f8",
"iso_checksum_type": "sha256",
"http_directory" : "preseeds",
"http_port_min" : 9001,
"http_port_max" : 9011,
"ssh_username": "{{user `ssh_name`}}",
"ssh_password": "{{user `ssh_pass`}}",
"ssh_wait_timeout": "20m",
"ssh_pty" : "true",
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"boot_command" : [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{user `hostname`}} ",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
"initrd=/install/initrd.gz -- <enter>"
],
"skip_compaction": false
}
],
"provisioners": [{
"type": "shell",
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"inline": [
"echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"
]
},
{
"type": "shell",
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"script": "scripts/bootstrap.sh",
"pause_before": "10s"
}],
"post-processors":[{
"type": "checksum",
"checksum_types": ["sha1", "sha256", "sha384", "sha512"]
}]
}