mirror of
https://github.com/elasticdog/packer-arch.git
synced 2026-07-18 00:45:20 +00:00
134 lines
5.6 KiB
JSON
134 lines
5.6 KiB
JSON
{
|
|
"variables": {
|
|
"iso_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/archlinux-{{isotime \"2006.01\"}}.01-x86_64.iso",
|
|
"iso_checksum_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/sha1sums.txt",
|
|
"iso_checksum_type": "sha1",
|
|
"ssh_timeout": "20m",
|
|
"country": "US",
|
|
"headless": "false"
|
|
},
|
|
"builders": [
|
|
{
|
|
"type": "parallels-iso",
|
|
"parallels_tools_flavor": "lin",
|
|
"parallels_tools_mode": "attach",
|
|
"guest_os_type": "linux-2.6",
|
|
"iso_url": "{{ user `iso_url` }}",
|
|
"iso_checksum_url": "{{ user `iso_checksum_url` }}",
|
|
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
|
|
"http_directory": "srv",
|
|
"boot_wait": "5s",
|
|
"boot_command": [
|
|
"<enter><wait10><wait10><wait10><wait10>",
|
|
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
|
|
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
|
|
"/usr/bin/bash ./enable-ssh.sh<enter>"
|
|
],
|
|
"disk_size": 20480,
|
|
"ssh_username": "vagrant",
|
|
"ssh_password": "vagrant",
|
|
"ssh_timeout": "{{ user `ssh_timeout` }}",
|
|
"shutdown_command": "sudo systemctl start poweroff.timer"
|
|
},
|
|
{
|
|
"type": "virtualbox-iso",
|
|
"iso_url": "{{ user `iso_url` }}",
|
|
"iso_checksum_url": "{{ user `iso_checksum_url` }}",
|
|
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
|
|
"guest_os_type": "ArchLinux_64",
|
|
"guest_additions_mode": "disable",
|
|
"http_directory": "srv",
|
|
"boot_wait": "5s",
|
|
"boot_command": [
|
|
"<enter><wait10><wait10><wait10><wait10>",
|
|
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
|
|
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
|
|
"/usr/bin/bash ./enable-ssh.sh<enter>"
|
|
],
|
|
"disk_size": 20480,
|
|
"hard_drive_interface": "sata",
|
|
"ssh_username": "vagrant",
|
|
"ssh_password": "vagrant",
|
|
"ssh_timeout": "{{ user `ssh_timeout` }}",
|
|
"shutdown_command": "sudo systemctl start poweroff.timer",
|
|
"headless" : "{{ user `headless`}}"
|
|
},
|
|
{
|
|
"type": "vmware-iso",
|
|
"iso_url": "{{ user `iso_url` }}",
|
|
"iso_checksum_url": "{{ user `iso_checksum_url` }}",
|
|
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
|
|
"http_directory": "srv",
|
|
"boot_wait": "5s",
|
|
"boot_command": [
|
|
"<enter><wait10><wait10><wait10><wait10>",
|
|
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
|
|
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
|
|
"/usr/bin/bash ./enable-ssh.sh<enter>"
|
|
],
|
|
"disk_size": 20480,
|
|
"ssh_username": "vagrant",
|
|
"ssh_password": "vagrant",
|
|
"ssh_timeout": "{{ user `ssh_timeout` }}",
|
|
"shutdown_command": "sudo systemctl start poweroff.timer",
|
|
"headless" : "{{ user `headless`}}"
|
|
},
|
|
{
|
|
"type": "qemu",
|
|
"iso_url": "{{ user `iso_url` }}",
|
|
"iso_checksum_url": "{{ user `iso_checksum_url` }}",
|
|
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
|
|
"http_directory": "srv",
|
|
"boot_wait": "5s",
|
|
"boot_command": [
|
|
"<enter><wait10><wait10><wait10><wait10>",
|
|
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
|
|
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
|
|
"/usr/bin/bash ./enable-ssh.sh<enter>"
|
|
],
|
|
"disk_size": 20480,
|
|
"ssh_username": "vagrant",
|
|
"ssh_password": "vagrant",
|
|
"ssh_timeout": "{{ user `ssh_timeout` }}",
|
|
"shutdown_command": "sudo systemctl start poweroff.timer",
|
|
"headless" : "{{ user `headless`}}"
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "{{ .Vars }} COUNTRY={{ user `country` }} sudo -E -S bash '{{ .Path }}'",
|
|
"expect_disconnect": true,
|
|
"script": "scripts/install-base.sh"
|
|
},
|
|
{
|
|
"only": ["parallels-iso"],
|
|
"type": "shell",
|
|
"execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'",
|
|
"script": "scripts/install-parallels.sh"
|
|
},
|
|
{
|
|
"only": ["virtualbox-iso"],
|
|
"type": "shell",
|
|
"execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'",
|
|
"script": "scripts/install-virtualbox.sh"
|
|
},
|
|
{
|
|
"only": ["vmware-iso"],
|
|
"type": "shell",
|
|
"execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'",
|
|
"script": "scripts/install-vmware.sh"
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'",
|
|
"script": "scripts/cleanup.sh"
|
|
}
|
|
],
|
|
"post-processors": [
|
|
{
|
|
"type": "vagrant",
|
|
"output": "output/packer_arch_{{ .Provider }}-{{isotime \"2006.01\"}}.01.box"
|
|
}
|
|
]
|
|
}
|