blob: d889b976ab2895a73ea4f5f6094655a1c5b0646e [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"
36 }
37 ],
38 "builders": [
39 {
40 "type": "qemu",
41 "qemuargs": [
42 [
43 "-m",
44 "8096M"
45 ],
46 [
47 "-smp",
48 "4"
49 ],
50 [
51 "-cdrom",
52 "config-drive/cloudata.iso"
53 ],
54 ["-device", "virtio-net,netdev=user.0"],
55 ["-object","rng-random,id=objrng0,filename=/dev/urandom"],
56 ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ]
57 ],
58 "vm_name": "{{user `vm_name`}}",
59 "output_directory": "images",
60 "disk_compression": true,
61 "disk_size": "{{ user `disk_size`}}",
62 "format": "qcow2",
63 "iso_url": "{{ user `image_base_url`}}",
64 "iso_checksum": "file:{{ user `image_md5_url`}}",
65 "iso_target_path": "{{ user `images_cache`}}",
66 "disk_image": true,
67 "accelerator": "kvm",
68 "headless": true,
69 "ssh_username": "{{user `user`}}",
70 "ssh_password": "{{user `password`}}",
71 "ssh_host_port_min": 7000,
72 "ssh_host_port_max": 7050,
73 "vnc_port_max": "5956",
74 "vnc_port_min": "5956",
75 "shutdown_command": "shutdown -P now",
76 "boot_wait": "10s",
77 "ssh_wait_timeout": "360s"
78 }
79 ]
80}