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` }}", |
Oleksandr Kononenko | 231933b | 2024-02-05 16:46:35 +0200 | [diff] [blame^] | 9 | "vm_name": "{{ env `VM_NAME` }}", |
| 10 | "binary_base_url": "{{ env `BINARY_BASE_URL` }}" |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 11 | }, |
| 12 | "provisioners": [ |
| 13 | { |
Oleksandr Kononenko | 231933b | 2024-02-05 16:46:35 +0200 | [diff] [blame^] | 14 | "type": "shell", |
| 15 | "environment_vars": [ |
| 16 | "BINARY_BASE_URL={{user `binary_base_url`}}" |
| 17 | ], |
| 18 | "scripts": [ |
| 19 | "scripts/binary.sh" |
| 20 | ] |
| 21 | }, |
| 22 | { |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 23 | "type": "file", |
| 24 | "source": "./certs", |
| 25 | "destination": "/srv/" |
| 26 | }, |
| 27 | { |
| 28 | "type": "file", |
| 29 | "source": "./release-openstack-k8s", |
| 30 | "destination": "/srv/" |
| 31 | }, |
| 32 | { |
| 33 | "type": "file", |
Vasyl Saienko | e967706 | 2021-03-19 13:31:32 +0200 | [diff] [blame] | 34 | "source": "files/usr/share", |
| 35 | "destination": "/usr" |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 36 | }, |
| 37 | { |
| 38 | "type": "file", |
Vasyl Saienko | e967706 | 2021-03-19 13:31:32 +0200 | [diff] [blame] | 39 | "source": "../../de/heat-templates/scripts/instance_boot.sh", |
| 40 | "destination": "/usr/share/trymos/functions" |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 41 | }, |
| 42 | { |
| 43 | "type": "file", |
| 44 | "source": "files/etc/", |
| 45 | "destination": "/etc" |
Oleksandr Kononenko | 7e63ecd | 2021-10-13 11:37:19 +0300 | [diff] [blame] | 46 | }, |
| 47 | { |
| 48 | "type": "file", |
| 49 | "source": "./release-openstack-k8s/trymos/files/environment/common", |
| 50 | "destination": "/usr/share/trymos/environment/common" |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 51 | } |
| 52 | ], |
| 53 | "builders": [ |
| 54 | { |
| 55 | "type": "qemu", |
| 56 | "qemuargs": [ |
| 57 | [ |
| 58 | "-m", |
| 59 | "8096M" |
| 60 | ], |
| 61 | [ |
| 62 | "-smp", |
| 63 | "4" |
| 64 | ], |
| 65 | [ |
| 66 | "-cdrom", |
| 67 | "config-drive/cloudata.iso" |
| 68 | ], |
| 69 | ["-device", "virtio-net,netdev=user.0"], |
| 70 | ["-object","rng-random,id=objrng0,filename=/dev/urandom"], |
| 71 | ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ] |
| 72 | ], |
| 73 | "vm_name": "{{user `vm_name`}}", |
| 74 | "output_directory": "images", |
| 75 | "disk_compression": true, |
| 76 | "disk_size": "{{ user `disk_size`}}", |
| 77 | "format": "qcow2", |
| 78 | "iso_url": "{{ user `image_base_url`}}", |
| 79 | "iso_checksum": "file:{{ user `image_md5_url`}}", |
| 80 | "iso_target_path": "{{ user `images_cache`}}", |
| 81 | "disk_image": true, |
| 82 | "accelerator": "kvm", |
| 83 | "headless": true, |
| 84 | "ssh_username": "{{user `user`}}", |
| 85 | "ssh_password": "{{user `password`}}", |
| 86 | "ssh_host_port_min": 7000, |
| 87 | "ssh_host_port_max": 7050, |
| 88 | "vnc_port_max": "5956", |
| 89 | "vnc_port_min": "5956", |
Vasyl Saienko | 057953f | 2023-11-27 12:45:27 +0000 | [diff] [blame] | 90 | "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] | 91 | "boot_wait": "10s", |
| 92 | "ssh_wait_timeout": "360s" |
| 93 | } |
| 94 | ] |
| 95 | } |