blob: ce4d8d873cc27ad6d563f2c5847a78d37b672e77 [file] [log] [blame]
{
"variables": {
"user": "root",
"password": "r00tme",
"disk_size": "8000M",
"images_cache": "{{ env `PACKER_IMAGES_CACHE` }}",
"image_base_url": "{{ env `IMAGE_BASE_URL` }}",
"image_md5_url": "{{ env `IMAGE_MD5_URL` }}",
"vm_name": "{{ env `VM_NAME` }}",
"kernel_version": "{{ env `KERNEL_VERSION` }}",
"docker_ee_release": "{{ env `DOCKER_EE_RELEASE` }}",
"docker_ee_url": "{{ env `DOCKER_EE_URL` }}",
"docker_ucp_image": "{{ env `DOCKER_UCP_IMAGE` }}"
},
"provisioners": [
{
"type": "shell",
"environment_vars": [
"KERNEL_VERSION={{user `kernel_version`}}",
"DOCKER_EE_RELEASE={{user `docker_ee_release`}}",
"DOCKER_EE_URL={{user `docker_ee_url`}}",
"DOCKER_UCP_IMAGE={{user `docker_ucp_image`}}"
],
"scripts": [
"scripts/apt.sh",
"scripts/docker.sh",
"scripts/cleanup.sh"
]
}
],
"builders": [
{
"type": "qemu",
"qemuargs": [
[
"-m",
"8096M"
],
[
"-smp",
"4"
],
[
"-cdrom",
"config-drive/cloudata.iso"
],
["-device", "virtio-net,netdev=user.0"],
["-object","rng-random,id=objrng0,filename=/dev/urandom"],
["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ]
],
"vm_name": "{{user `vm_name`}}",
"output_directory": "images",
"disk_compression": true,
"disk_size": "{{ user `disk_size`}}",
"format": "qcow2",
"iso_url": "{{ user `image_base_url`}}",
"iso_checksum": "file:{{ user `image_md5_url`}}",
"iso_target_path": "{{ user `images_cache`}}",
"disk_image": true,
"accelerator": "kvm",
"headless": true,
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"ssh_host_port_min": 7000,
"ssh_host_port_max": 7050,
"vnc_port_max": "5956",
"vnc_port_min": "5956",
"boot_wait": "10s",
"ssh_wait_timeout": "360s",
"shutdown_command": "passwd -d root; rm -rf /etc/sudoers.d/90-cloud-init-users; /sbin/shutdown -P now"
}
]
}