blob: 81f51b9a5df95771d60cb6b6729b510936192e03 [file] [log] [blame]
Vasyl Saienko9740a4f2023-09-22 14:48:29 +00001{
2 "variables": {
3 "user": "root",
4 "password": "r00tme",
Vasyl Saienko3cc01ca2023-09-25 12:23:43 +00005 "disk_size": "7000M",
Vasyl Saienko9740a4f2023-09-22 14:48:29 +00006 "images_cache": "{{ env `PACKER_IMAGES_CACHE` }}",
7 "image_base_url": "{{ env `IMAGE_BASE_URL` }}",
8 "image_md5_url": "{{ env `IMAGE_MD5_URL` }}",
Vasyl Saienkoab3cead2023-09-24 14:25:37 +00009 "vm_name": "{{ env `VM_NAME` }}",
Vasyl Saienko3cc01ca2023-09-25 12:23:43 +000010 "kernel_version": "{{ env `KERNEL_VERSION` }}",
11 "docker_ee_release": "{{ env `DOCKER_EE_RELEASE` }}",
12 "docker_ee_url": "{{ env `DOCKER_EE_URL` }}",
13 "docker_ucp_image": "{{ env `DOCKER_UCP_IMAGE` }}"
14
Vasyl Saienko9740a4f2023-09-22 14:48:29 +000015 },
16 "provisioners": [
17 {
18 "type": "shell",
Vasyl Saienkoab3cead2023-09-24 14:25:37 +000019 "environment_vars": [
Vasyl Saienko3cc01ca2023-09-25 12:23:43 +000020 "KERNEL_VERSION={{user `kernel_version`}}",
21 "DOCKER_EE_RELEASE={{user `docker_ee_release`}}",
22 "DOCKER_EE_URL={{user `docker_ee_url`}}",
23 "DOCKER_UCP_IMAGE={{user `docker_ucp_image`}}"
Vasyl Saienkoab3cead2023-09-24 14:25:37 +000024 ],
Vasyl Saienko9740a4f2023-09-22 14:48:29 +000025 "scripts": [
26 "scripts/apt.sh",
Vasyl Saienko3cc01ca2023-09-25 12:23:43 +000027 "scripts/docker.sh",
28 "scripts/cleanup.sh"
Vasyl Saienko9740a4f2023-09-22 14:48:29 +000029 ]
30 }
31 ],
32 "builders": [
33 {
34 "type": "qemu",
35 "qemuargs": [
36 [
37 "-m",
38 "8096M"
39 ],
40 [
41 "-smp",
42 "4"
43 ],
44 [
45 "-cdrom",
46 "config-drive/cloudata.iso"
47 ],
48 ["-device", "virtio-net,netdev=user.0"],
49 ["-object","rng-random,id=objrng0,filename=/dev/urandom"],
50 ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ]
51 ],
52 "vm_name": "{{user `vm_name`}}",
53 "output_directory": "images",
54 "disk_compression": true,
55 "disk_size": "{{ user `disk_size`}}",
56 "format": "qcow2",
57 "iso_url": "{{ user `image_base_url`}}",
58 "iso_checksum": "file:{{ user `image_md5_url`}}",
59 "iso_target_path": "{{ user `images_cache`}}",
60 "disk_image": true,
61 "accelerator": "kvm",
62 "headless": true,
63 "ssh_username": "{{user `user`}}",
64 "ssh_password": "{{user `password`}}",
65 "ssh_host_port_min": 7000,
66 "ssh_host_port_max": 7050,
67 "vnc_port_max": "5956",
68 "vnc_port_min": "5956",
69 "shutdown_command": "shutdown -P now",
70 "boot_wait": "10s",
71 "ssh_wait_timeout": "360s"
72 }
73 ]
74}