Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
| 3 | "user": "root", |
| 4 | "password": "r00tme", |
| 5 | "disk_size": "2500M", |
| 6 | "images_cache": "{{ env `PACKER_IMAGES_CACHE` }}", |
| 7 | "image_base_url": "{{ env `IMAGE_BASE_URL` }}", |
| 8 | "image_md5_url": "{{ env `IMAGE_MD5_URL` }}", |
| 9 | "vm_name": "{{ env `VM_NAME` }}" |
| 10 | }, |
| 11 | "provisioners": [ |
| 12 | { |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 13 | "type": "file", |
| 14 | "source": "./certs", |
| 15 | "destination": "/srv/" |
| 16 | }, |
| 17 | { |
| 18 | "type": "file", |
| 19 | "source": "./release-openstack-k8s", |
| 20 | "destination": "/srv/" |
| 21 | }, |
| 22 | { |
| 23 | "type": "file", |
Vasyl Saienko | e967706 | 2021-03-19 13:31:32 +0200 | [diff] [blame] | 24 | "source": "files/usr/share", |
| 25 | "destination": "/usr" |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 26 | }, |
| 27 | { |
| 28 | "type": "file", |
Vasyl Saienko | e967706 | 2021-03-19 13:31:32 +0200 | [diff] [blame] | 29 | "source": "../../de/heat-templates/scripts/instance_boot.sh", |
| 30 | "destination": "/usr/share/trymos/functions" |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 31 | }, |
| 32 | { |
| 33 | "type": "file", |
| 34 | "source": "files/etc/", |
| 35 | "destination": "/etc" |
Oleksandr Kononenko | 7e63ecd | 2021-10-13 11:37:19 +0300 | [diff] [blame] | 36 | }, |
| 37 | { |
| 38 | "type": "file", |
| 39 | "source": "./release-openstack-k8s/trymos/files/environment/common", |
| 40 | "destination": "/usr/share/trymos/environment/common" |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 41 | } |
| 42 | ], |
| 43 | "builders": [ |
| 44 | { |
| 45 | "type": "qemu", |
| 46 | "qemuargs": [ |
| 47 | [ |
| 48 | "-m", |
| 49 | "8096M" |
| 50 | ], |
| 51 | [ |
| 52 | "-smp", |
| 53 | "4" |
| 54 | ], |
| 55 | [ |
| 56 | "-cdrom", |
| 57 | "config-drive/cloudata.iso" |
| 58 | ], |
| 59 | ["-device", "virtio-net,netdev=user.0"], |
| 60 | ["-object","rng-random,id=objrng0,filename=/dev/urandom"], |
| 61 | ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ] |
| 62 | ], |
| 63 | "vm_name": "{{user `vm_name`}}", |
| 64 | "output_directory": "images", |
| 65 | "disk_compression": true, |
| 66 | "disk_size": "{{ user `disk_size`}}", |
| 67 | "format": "qcow2", |
| 68 | "iso_url": "{{ user `image_base_url`}}", |
| 69 | "iso_checksum": "file:{{ user `image_md5_url`}}", |
| 70 | "iso_target_path": "{{ user `images_cache`}}", |
| 71 | "disk_image": true, |
| 72 | "accelerator": "kvm", |
| 73 | "headless": true, |
| 74 | "ssh_username": "{{user `user`}}", |
| 75 | "ssh_password": "{{user `password`}}", |
| 76 | "ssh_host_port_min": 7000, |
| 77 | "ssh_host_port_max": 7050, |
| 78 | "vnc_port_max": "5956", |
| 79 | "vnc_port_min": "5956", |
Vasyl Saienko | 057953f | 2023-11-27 12:45:27 +0000 | [diff] [blame] | 80 | "shutdown_command": "passwd -d root; rm -rf /etc/sudoers.d/90-cloud-init-users; /sbin/shutdown -P now", |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 81 | "boot_wait": "10s", |
| 82 | "ssh_wait_timeout": "360s" |
| 83 | } |
| 84 | ] |
| 85 | } |