blob: 3c2ee67397a141a40004c1124014dc6fda4745eb [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` }}",
Oleksandr Kononenko231933b2024-02-05 16:46:35 +02009 "vm_name": "{{ env `VM_NAME` }}",
10 "binary_base_url": "{{ env `BINARY_BASE_URL` }}"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020011 },
12 "provisioners": [
13 {
Oleksandr Kononenko231933b2024-02-05 16:46:35 +020014 "type": "shell",
15 "environment_vars": [
16 "BINARY_BASE_URL={{user `binary_base_url`}}"
17 ],
18 "scripts": [
19 "scripts/binary.sh"
20 ]
21 },
22 {
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020023 "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 Saienkoe9677062021-03-19 13:31:32 +020034 "source": "files/usr/share",
35 "destination": "/usr"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020036 },
37 {
38 "type": "file",
Vasyl Saienkoe9677062021-03-19 13:31:32 +020039 "source": "../../de/heat-templates/scripts/instance_boot.sh",
40 "destination": "/usr/share/trymos/functions"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020041 },
42 {
43 "type": "file",
44 "source": "files/etc/",
45 "destination": "/etc"
Oleksandr Kononenko7e63ecd2021-10-13 11:37:19 +030046 },
47 {
48 "type": "file",
49 "source": "./release-openstack-k8s/trymos/files/environment/common",
50 "destination": "/usr/share/trymos/environment/common"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020051 }
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 Saienko057953f2023-11-27 12:45:27 +000090 "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 +020091 "boot_wait": "10s",
92 "ssh_wait_timeout": "360s"
93 }
94 ]
95}