blob: 059404311bf19b609c13f1d494230e2d38c4fa3e [file] [log] [blame]
Vasyl Saienko9740a4f2023-09-22 14:48:29 +00001{
2 "variables": {
3 "user": "root",
4 "password": "r00tme",
Vasyl Saienko37965db2023-10-12 14:36:19 +00005 "disk_size": "8000M",
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` }}",
Vasyl Saienko8241a252024-06-11 09:48:34 +000013 "docker_ucp_image": "{{ env `DOCKER_UCP_IMAGE` }}",
14 "docker_ucp_packages": "{{ env `DOCKER_UCP_PACKAGES` }}"
Vasyl Saienko3cc01ca2023-09-25 12:23:43 +000015
Vasyl Saienko9740a4f2023-09-22 14:48:29 +000016 },
17 "provisioners": [
18 {
19 "type": "shell",
Vasyl Saienkoab3cead2023-09-24 14:25:37 +000020 "environment_vars": [
Vasyl Saienko3cc01ca2023-09-25 12:23:43 +000021 "KERNEL_VERSION={{user `kernel_version`}}",
22 "DOCKER_EE_RELEASE={{user `docker_ee_release`}}",
23 "DOCKER_EE_URL={{user `docker_ee_url`}}",
Vasyl Saienko8241a252024-06-11 09:48:34 +000024 "DOCKER_UCP_IMAGE={{user `docker_ucp_image`}}",
25 "DOCKER_UCP_PACKAGES={{user `docker_ucp_packages`}}"
Vasyl Saienkoab3cead2023-09-24 14:25:37 +000026 ],
Vasyl Saienko9740a4f2023-09-22 14:48:29 +000027 "scripts": [
28 "scripts/apt.sh",
Vasyl Saienko3cc01ca2023-09-25 12:23:43 +000029 "scripts/docker.sh",
30 "scripts/cleanup.sh"
Vasyl Saienko9740a4f2023-09-22 14:48:29 +000031 ]
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 Saienko9740a4f2023-09-22 14:48:29 +000071 "boot_wait": "10s",
Vasyl Saienko057953f2023-11-27 12:45:27 +000072 "ssh_wait_timeout": "360s",
73 "shutdown_command": "passwd -d root; rm -rf /etc/sudoers.d/90-cloud-init-users; /sbin/shutdown -P now"
Vasyl Saienko9740a4f2023-09-22 14:48:29 +000074 }
75 ]
76}