You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
6.3 KiB
145 lines
6.3 KiB
{
|
|
"builders": [
|
|
{
|
|
"boot_command": [
|
|
"e<wait>",
|
|
"<down><down><down><down><down><wait>",
|
|
"<end><wait>",
|
|
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><wait>",
|
|
"false<wait>",
|
|
"<f10><wait>",
|
|
"<wait10><wait10><wait10><wait10><wait10><wait10>",
|
|
"<wait10><wait10><wait10><wait10><wait10><wait10>",
|
|
"<wait10><wait10><wait10><wait10><wait10><wait10>",
|
|
"root<enter><wait><wait>",
|
|
"solaris<enter><wait><wait>",
|
|
"<wait10>",
|
|
"while (true); do sleep 5; test -f /a/etc/sudoers \u0026\u0026 grep -v \"vagrant\" \"/a/etc/sudoers\" 2> /dev/null<wait>",
|
|
" \u0026\u0026 echo \"vagrant ALL=(ALL) NOPASSWD: ALL\" >> /a/etc/sudoers \u0026\u0026 break ; done \u0026<enter><wait>",
|
|
"<enter>while (true); do grep \"You may wish to reboot\" \"/var/svc/log/application-auto-installer:default.log\" 2> /dev/null<wait>",
|
|
" \u0026\u0026 reboot; sleep 10; done \u0026<enter><wait>",
|
|
"sleep 5; curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/default.xml -o default.xml;<wait>",
|
|
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/profile.xml -o profile.xml;<wait>",
|
|
"cp default.xml /system/volatile/ai.xml;<wait>",
|
|
"mkdir /system/volatile/profile;<wait>",
|
|
"cp profile.xml /system/volatile/profile/profile.xml;<wait>",
|
|
"svcadm enable svc:/application/auto-installer:default;<wait>",
|
|
"<enter><wait10><wait><wait>",
|
|
"<enter><wait>",
|
|
"tail -f /var/svc/log/application-auto-installer\\:default.log<enter><wait>",
|
|
"<leftCtrlOn>r<leftCtrlOff>"
|
|
],
|
|
"boot_wait": "5s",
|
|
"cpus": "{{ user `cpus` }}",
|
|
"disk_size": "{{user `disk_size`}}",
|
|
"guest_additions_mode": "attach",
|
|
"guest_additions_url": "{{ user `guest_additions_url` }}",
|
|
"guest_os_type": "Solaris11_64",
|
|
"headless": "{{ user `headless` }}",
|
|
"http_directory": "{{user `http_directory`}}",
|
|
"iso_checksum": "sha256:e3a29507e583acbc0b912f371c8f328fea7cb6257d587cbc0a651477a52b0a29",
|
|
"iso_url": "{{user `mirror`}}/sol-11_4-ai-x86.iso",
|
|
"memory": "{{ user `memory` }}",
|
|
"output_directory": "packer-solaris-11.4-x86_64-virtualbox",
|
|
"shutdown_command": "echo 'vagrant'|sudo -i init 5",
|
|
"shutdown_timeout": "10m",
|
|
"ssh_password": "vagrant",
|
|
"ssh_port": 22,
|
|
"ssh_timeout": "10000s",
|
|
"ssh_username": "vagrant",
|
|
"type": "virtualbox-iso",
|
|
"virtualbox_version_file": ".vbox_version",
|
|
"vm_name": "{{ user `template` }}"
|
|
},
|
|
{
|
|
"boot_command": [
|
|
"e<wait>",
|
|
"<down><down><down><down><down><wait>",
|
|
"<end><wait>",
|
|
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><wait>",
|
|
"false<wait>",
|
|
"<f10><wait>",
|
|
"<wait10><wait10><wait10><wait10><wait10><wait10>",
|
|
"<wait10><wait10><wait10><wait10><wait10><wait10>",
|
|
"<wait10><wait10><wait10><wait10><wait10><wait10>",
|
|
"root<enter><wait><wait>",
|
|
"solaris<enter><wait><wait>",
|
|
"<wait10>",
|
|
"while (true); do sleep 5; test -f /a/etc/sudoers \u0026\u0026 grep -v \"vagrant\" \"/a/etc/sudoers\" 2> /dev/null<wait>",
|
|
" \u0026\u0026 echo \"vagrant ALL=(ALL) NOPASSWD: ALL\" >> /a/etc/sudoers \u0026\u0026 break ; done \u0026<enter><wait>",
|
|
"<enter>while (true); do grep \"You may wish to reboot\" \"/var/svc/log/application-auto-installer:default.log\" 2> /dev/null<wait>",
|
|
" \u0026\u0026 reboot; sleep 10; done \u0026<enter><wait>",
|
|
"sleep 5; curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/default.xml -o default.xml;<wait>",
|
|
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/profile.xml -o profile.xml;<wait>",
|
|
"cp default.xml /system/volatile/ai.xml;<wait>",
|
|
"mkdir /system/volatile/profile;<wait>",
|
|
"cp profile.xml /system/volatile/profile/profile.xml;<wait>",
|
|
"svcadm enable svc:/application/auto-installer:default;<wait>",
|
|
"<enter><wait10><wait><wait>",
|
|
"<enter><wait>",
|
|
"tail -f /var/svc/log/application-auto-installer\\:default.log<enter><wait>"
|
|
],
|
|
"boot_wait": "5s",
|
|
"cpus": "{{ user `cpus` }}",
|
|
"disk_size": "{{user `disk_size`}}",
|
|
"guest_os_type": "solaris11-64",
|
|
"headless": "{{ user `headless` }}",
|
|
"http_directory": "{{user `http_directory`}}",
|
|
"iso_checksum": "sha256:e3a29507e583acbc0b912f371c8f328fea7cb6257d587cbc0a651477a52b0a29",
|
|
"iso_url": "{{user `mirror`}}/sol-11_4-ai-x86.iso",
|
|
"memory": "{{ user `memory` }}",
|
|
"output_directory": "packer-solaris-11.4-x86_64-vmware",
|
|
"shutdown_command": "echo 'vagrant'|sudo -i init 5",
|
|
"shutdown_timeout": "10m",
|
|
"ssh_password": "vagrant",
|
|
"ssh_port": 22,
|
|
"ssh_timeout": "10000s",
|
|
"ssh_username": "vagrant",
|
|
"type": "vmware-iso",
|
|
"vm_name": "{{ user `template` }}",
|
|
"vmx_data": {
|
|
"cpuid.coresPerSocket": "1"
|
|
},
|
|
"vmx_remove_ethernet_interfaces": true
|
|
}
|
|
],
|
|
"post-processors": [
|
|
{
|
|
"output": "{{ user `build_directory` }}/{{user `box_basename`}}.{{.Provider}}.box",
|
|
"type": "vagrant"
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"environment_vars": [],
|
|
"execute_command": "echo 'vagrant'|sudo -S bash {{.Path}}",
|
|
"expect_disconnect": true,
|
|
"scripts": [
|
|
"{{template_dir}}/scripts/update.sh",
|
|
"{{template_dir}}/scripts/vagrant.sh",
|
|
"{{template_dir}}/scripts/vmtools.sh",
|
|
"{{template_dir}}/scripts/minimize.sh"
|
|
],
|
|
"type": "shell"
|
|
}
|
|
],
|
|
"variables": {
|
|
"_DOWNLOAD_SITE": "http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html",
|
|
"_README": "You must download the automated installer iso from the following page, and then place it in the packer_cache dir",
|
|
"arch": "64",
|
|
"box_basename": "solaris-11.4",
|
|
"build_directory": "../../builds",
|
|
"build_timestamp": "{{isotime \"20200222210405\"}}",
|
|
"cpus": "2",
|
|
"disk_size": "65536",
|
|
"git_revision": "__unknown_git_revision__",
|
|
"guest_additions_url": "",
|
|
"headless": "",
|
|
"http_directory": "{{template_dir}}/http",
|
|
"memory": "4096",
|
|
"mirror": "./packer_cache",
|
|
"name": "solaris-11.4",
|
|
"template": "solaris-11.4-x86",
|
|
"version": "TIMESTAMP"
|
|
}
|
|
}
|
|
|