jcloude/backbone/packer/scaleway.json
2025-12-23 19:17:16 +08:00

57 lines
1.7 KiB
JSON

{
"builders": [
{
"boot_wait": "10s",
"cpus": "2",
"disk_image": true,
"disk_size": "{{user `disk_size`}}",
"iso_checksum": "36403f9562949545e2a6c38d4b840008acae674e20b67a67f4facba610b82aec",
"iso_urls": [
"{{template_dir}}/images/ubuntu-20.04-server-cloudimg-amd64.img",
"{{template_dir}}/images/02b24c4cf15cb4f576c262aa4efa6bca3c64c620.img",
"https://cloud-images.ubuntu.com/releases/focal/release-20201210/ubuntu-20.04-server-cloudimg-amd64.img"
],
"iso_target_path": "{{template_dir}}/images",
"iso_target_extension": "img",
"memory": "4096",
"output_directory": "{{template_dir}}/scratch",
"headless": true,
"qemuargs": [
[
"-fda",
"{{template_dir}}/cloud-init-scaleway.img"
]
],
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_username": "vagrant",
"type": "qemu",
"use_backing_file": false,
"vm_name": "scaleway"
}
],
"post-processors": [
{
"output": "{{template_dir}}/builds/scaleway.box",
"type": "vagrant"
}
],
"provisioners": [
{
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
"expect_disconnect": true,
"scripts": [
"{{template_dir}}/scripts/sshd.sh",
"{{template_dir}}/scripts/scaleway-sshd.sh",
"{{template_dir}}/scripts/networking.sh",
"{{template_dir}}/scripts/update.sh",
"{{template_dir}}/scripts/cleanup.sh",
"{{template_dir}}/scripts/minimize.sh"
],
"type": "shell"
}
],
"variables": {
"disk_size": "16384"
}
}