blob: a6e0c89561b4057ae679817ce36e745e906602dd [file] [log] [blame]
Oleh Hryhorovac5f6012021-03-05 18:26:25 +02001{
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 Hryhorovac5f6012021-03-05 18:26:25 +020013 "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 Saienkoe9677062021-03-19 13:31:32 +020024 "source": "files/usr/share",
25 "destination": "/usr"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020026 },
27 {
28 "type": "file",
Vasyl Saienkoe9677062021-03-19 13:31:32 +020029 "source": "../../de/heat-templates/scripts/instance_boot.sh",
30 "destination": "/usr/share/trymos/functions"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020031 },
32 {
33 "type": "file",
34 "source": "files/etc/",
35 "destination": "/etc"
Oleksandr Kononenko7e63ecd2021-10-13 11:37:19 +030036 },
37 {
38 "type": "file",
39 "source": "./release-openstack-k8s/trymos/files/environment/common",
40 "destination": "/usr/share/trymos/environment/common"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020041 }
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 Saienko057953f2023-11-27 12:45:27 +000080 "shutdown_command": "passwd -d root; rm -rf /etc/sudoers.d/90-cloud-init-users; /sbin/shutdown -P now",
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020081 "boot_wait": "10s",
82 "ssh_wait_timeout": "360s"
83 }
84 ]
85}