Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (62 sloc) 2.4 KB
{
"variables": {
"exoscale_api_key": "{{env `EXOSCALE_API_KEY`}}",
"exoscale_api_secret": "{{user `EXOSCALE_API_SECRET`}}",
"image_url": "https://cdimage.debian.org/cdimage/openstack/current-10/debian-10-openstack-amd64.qcow2",
"image_checksum_url": "https://cdimage.debian.org/cdimage/openstack/current-10/SHA256SUMS",
"image_checksum_type": "sha256",
"ssh_private_key_file": "{{env `PACKER_PRIVATE_KEY`}}"
},
"builders": [
{
"type": "qemu",
"qemuargs": [
["-cpu", "qemu64,rdrand=on"],
["-drive", "file=output-qemu/debian-buster.qcow2,format=qcow2,if=virtio"],
["-drive", "file=seed.img,format=raw,if=virtio"]
],
"vm_name": "debian-buster.qcow2",
"iso_url": "{{user `image_url`}}",
"iso_checksum_url": "{{user `image_checksum_url`}}",
"iso_checksum_type": "{{user `image_checksum_type`}}",
"disk_image": true,
"disk_size": 10000,
"disk_compression": true,
"disk_interface": "virtio",
"format": "qcow2",
"net_device": "virtio-net",
"communicator": "ssh",
"ssh_username": "debian",
"ssh_private_key_file": "{{user `ssh_private_key_file`}}",
"ssh_timeout": "20m",
"ssh_port": 22,
"vnc_port_min": 6000,
"vnc_port_max": 6000,
"use_default_display": true,
"shutdown_command": "rm -rf /home/debian/.ssh/authorized_keys && sudo rm -rf /root/.ssh/authorized_keys && echo 'packer' | sudo -S shutdown -P now"
}
],
"provisioners": [
{"type": "shell",
"execute_command": "chmod +x {{.Path}}; sudo {{.Path}}",
"scripts": [
"install.sh"
]
}
],
"post-processors": [
{
"type": "shell-local",
"inline": ["qemu-img resize output-qemu/debian-buster.qcow2 10G"]
},
{
"type": "exoscale-import",
"api_key": "{{user `exoscale_api_key`}}",
"api_secret": "{{user `exoscale_api_secret`}}",
"image_bucket": "mcorbin.fr.images",
"template_name": "Debian 10 {{timestamp}}",
"template_description": "Debian 10 template",
"template_username": "debian"
}
]
}
You can’t perform that action at this time.