Created
May 10, 2016 09:26
-
-
Save skonto/4bb9cada2298a6f86bc8d104b8b21cfb to your computer and use it in GitHub Desktop.
my packer tempalte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [ | |
{ | |
"type": "virtualbox-iso", | |
"name": "mybox", | |
"guest_os_type": "Ubuntu_64", | |
"iso_url": "file:///home/stavros/Downloads/ubuntu-16.04-server-amd64.iso", | |
"iso_checksum": "23e97cd5d4145d4105fbf29878534049", | |
"iso_checksum_type": "md5", | |
"ssh_username": "user", | |
"ssh_password": "user", | |
"ssh_port": 22, | |
"ssh_wait_timeout": "10000s", | |
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now", | |
"boot_wait": "10s", | |
"guest_additions_mode": "upload", | |
"guest_additions_path" : "VBoxGuestAdditions_{{.Version}}.iso", | |
"headless": false, | |
"http_directory" : "cfg", | |
"boot_command" : [ | |
"<esc><esc><enter><wait>", | |
"/install/vmlinuz noapic auto=true preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>", | |
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us <wait>", | |
"hostname={{ .Name }} <wait>", | |
"fb=false debconf/frontend=noninteractive <wait>", | |
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false <wait>", | |
"initrd=/install/initrd.gz -- <enter><wait>" | |
], | |
"vboxmanage": [ | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--memory", | |
"2048" | |
], | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--cpus", | |
"4" | |
], | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--vram", | |
"64" | |
] | |
] | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"script": "install.sh", | |
"execute_command": "echo 'user' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment