Vasyl Saienko | 9740a4f | 2023-09-22 14:48:29 +0000 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
| 3 | "user": "root", |
| 4 | "password": "r00tme", |
Vasyl Saienko | 37965db | 2023-10-12 14:36:19 +0000 | [diff] [blame] | 5 | "disk_size": "8000M", |
Vasyl Saienko | 9740a4f | 2023-09-22 14:48:29 +0000 | [diff] [blame] | 6 | "images_cache": "{{ env `PACKER_IMAGES_CACHE` }}", |
| 7 | "image_base_url": "{{ env `IMAGE_BASE_URL` }}", |
| 8 | "image_md5_url": "{{ env `IMAGE_MD5_URL` }}", |
Vasyl Saienko | ab3cead | 2023-09-24 14:25:37 +0000 | [diff] [blame] | 9 | "vm_name": "{{ env `VM_NAME` }}", |
Vasyl Saienko | 3cc01ca | 2023-09-25 12:23:43 +0000 | [diff] [blame] | 10 | "kernel_version": "{{ env `KERNEL_VERSION` }}", |
| 11 | "docker_ee_release": "{{ env `DOCKER_EE_RELEASE` }}", |
| 12 | "docker_ee_url": "{{ env `DOCKER_EE_URL` }}", |
Vasyl Saienko | 8241a25 | 2024-06-11 09:48:34 +0000 | [diff] [blame] | 13 | "docker_ucp_image": "{{ env `DOCKER_UCP_IMAGE` }}", |
| 14 | "docker_ucp_packages": "{{ env `DOCKER_UCP_PACKAGES` }}" |
Vasyl Saienko | 3cc01ca | 2023-09-25 12:23:43 +0000 | [diff] [blame] | 15 | |
Vasyl Saienko | 9740a4f | 2023-09-22 14:48:29 +0000 | [diff] [blame] | 16 | }, |
| 17 | "provisioners": [ |
| 18 | { |
| 19 | "type": "shell", |
Vasyl Saienko | ab3cead | 2023-09-24 14:25:37 +0000 | [diff] [blame] | 20 | "environment_vars": [ |
Vasyl Saienko | 3cc01ca | 2023-09-25 12:23:43 +0000 | [diff] [blame] | 21 | "KERNEL_VERSION={{user `kernel_version`}}", |
| 22 | "DOCKER_EE_RELEASE={{user `docker_ee_release`}}", |
| 23 | "DOCKER_EE_URL={{user `docker_ee_url`}}", |
Vasyl Saienko | 8241a25 | 2024-06-11 09:48:34 +0000 | [diff] [blame] | 24 | "DOCKER_UCP_IMAGE={{user `docker_ucp_image`}}", |
| 25 | "DOCKER_UCP_PACKAGES={{user `docker_ucp_packages`}}" |
Vasyl Saienko | ab3cead | 2023-09-24 14:25:37 +0000 | [diff] [blame] | 26 | ], |
Vasyl Saienko | 9740a4f | 2023-09-22 14:48:29 +0000 | [diff] [blame] | 27 | "scripts": [ |
| 28 | "scripts/apt.sh", |
Vasyl Saienko | 3cc01ca | 2023-09-25 12:23:43 +0000 | [diff] [blame] | 29 | "scripts/docker.sh", |
| 30 | "scripts/cleanup.sh" |
Vasyl Saienko | 9740a4f | 2023-09-22 14:48:29 +0000 | [diff] [blame] | 31 | ] |
| 32 | } |
| 33 | ], |
| 34 | "builders": [ |
| 35 | { |
| 36 | "type": "qemu", |
| 37 | "qemuargs": [ |
| 38 | [ |
| 39 | "-m", |
| 40 | "8096M" |
| 41 | ], |
| 42 | [ |
| 43 | "-smp", |
| 44 | "4" |
| 45 | ], |
| 46 | [ |
| 47 | "-cdrom", |
| 48 | "config-drive/cloudata.iso" |
| 49 | ], |
| 50 | ["-device", "virtio-net,netdev=user.0"], |
| 51 | ["-object","rng-random,id=objrng0,filename=/dev/urandom"], |
| 52 | ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ] |
| 53 | ], |
| 54 | "vm_name": "{{user `vm_name`}}", |
| 55 | "output_directory": "images", |
| 56 | "disk_compression": true, |
| 57 | "disk_size": "{{ user `disk_size`}}", |
| 58 | "format": "qcow2", |
| 59 | "iso_url": "{{ user `image_base_url`}}", |
| 60 | "iso_checksum": "file:{{ user `image_md5_url`}}", |
| 61 | "iso_target_path": "{{ user `images_cache`}}", |
| 62 | "disk_image": true, |
| 63 | "accelerator": "kvm", |
| 64 | "headless": true, |
| 65 | "ssh_username": "{{user `user`}}", |
| 66 | "ssh_password": "{{user `password`}}", |
| 67 | "ssh_host_port_min": 7000, |
| 68 | "ssh_host_port_max": 7050, |
| 69 | "vnc_port_max": "5956", |
| 70 | "vnc_port_min": "5956", |
Vasyl Saienko | 9740a4f | 2023-09-22 14:48:29 +0000 | [diff] [blame] | 71 | "boot_wait": "10s", |
Vasyl Saienko | 057953f | 2023-11-27 12:45:27 +0000 | [diff] [blame] | 72 | "ssh_wait_timeout": "360s", |
| 73 | "shutdown_command": "passwd -d root; rm -rf /etc/sudoers.d/90-cloud-init-users; /sbin/shutdown -P now" |
Vasyl Saienko | 9740a4f | 2023-09-22 14:48:29 +0000 | [diff] [blame] | 74 | } |
| 75 | ] |
| 76 | } |