blob: 9af97a308457764851f5fc96632101637d732854 [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 {
13 "type": "shell",
14 "inline": ["mkdir -p /usr/share/trymos/"]
15 },
16 {
17 "type": "file",
18 "source": "../../de/heat-templates/scripts/instance_boot.sh",
19 "destination": "/usr/share/trymos/functions"
20 },
21 {
22 "type": "file",
23 "source": "./certs",
24 "destination": "/srv/"
25 },
26 {
27 "type": "file",
28 "source": "./release-openstack-k8s",
29 "destination": "/srv/"
30 },
31 {
32 "type": "file",
33 "source": "files/srv/",
34 "destination": "/srv"
35 },
36 {
37 "type": "file",
38 "source": "files/usr/share",
39 "destination": "/usr"
40 },
41 {
42 "type": "file",
43 "source": "files/etc/",
44 "destination": "/etc"
45 }
46 ],
47 "builders": [
48 {
49 "type": "qemu",
50 "qemuargs": [
51 [
52 "-m",
53 "8096M"
54 ],
55 [
56 "-smp",
57 "4"
58 ],
59 [
60 "-cdrom",
61 "config-drive/cloudata.iso"
62 ],
63 ["-device", "virtio-net,netdev=user.0"],
64 ["-object","rng-random,id=objrng0,filename=/dev/urandom"],
65 ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ]
66 ],
67 "vm_name": "{{user `vm_name`}}",
68 "output_directory": "images",
69 "disk_compression": true,
70 "disk_size": "{{ user `disk_size`}}",
71 "format": "qcow2",
72 "iso_url": "{{ user `image_base_url`}}",
73 "iso_checksum": "file:{{ user `image_md5_url`}}",
74 "iso_target_path": "{{ user `images_cache`}}",
75 "disk_image": true,
76 "accelerator": "kvm",
77 "headless": true,
78 "ssh_username": "{{user `user`}}",
79 "ssh_password": "{{user `password`}}",
80 "ssh_host_port_min": 7000,
81 "ssh_host_port_max": 7050,
82 "vnc_port_max": "5956",
83 "vnc_port_min": "5956",
84 "shutdown_command": "shutdown -P now",
85 "boot_wait": "10s",
86 "ssh_wait_timeout": "360s"
87 }
88 ]
89}