blob: be7d8b9ffe652fd72405afdc59c15d9569deef69 [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` }}",
Oleksandr Kononenko98ef1c02025-05-12 20:19:04 +030010 "inventory_file": "{{ env `INVENTORY_FILE` }}"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020011 },
12 "provisioners": [
13 {
Oleksandr Kononenko231933b2024-02-05 16:46:35 +020014 "type": "shell",
Oleksandr Kononenko98ef1c02025-05-12 20:19:04 +030015 "inline": [
16 "mkdir -p /usr/share/trymos /srv"
Oleksandr Kononenko231933b2024-02-05 16:46:35 +020017 ]
18 },
19 {
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020020 "type": "file",
Oleksandr Kononenko98ef1c02025-05-12 20:19:04 +030021 "source": "{{user `inventory_file`}}",
22 "destination": "/srv/single_node.yaml"
23 },
24 {
25 "type": "file",
26 "source": "../rockoon/charts",
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020027 "destination": "/srv/"
28 },
29 {
30 "type": "file",
Oleksandr Kononenko98ef1c02025-05-12 20:19:04 +030031 "source": "../rockoon/virtual_lab",
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020032 "destination": "/srv/"
33 },
34 {
35 "type": "file",
Oleksandr Kononenko98ef1c02025-05-12 20:19:04 +030036 "source": "./scripts/launch.sh",
37 "destination": "/usr/share/trymos/"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020038 }
39 ],
40 "builders": [
41 {
42 "type": "qemu",
43 "qemuargs": [
44 [
45 "-m",
Oleksandr Kononenko98ef1c02025-05-12 20:19:04 +030046 "4096M"
Oleh Hryhorovac5f6012021-03-05 18:26:25 +020047 ],
48 [
49 "-smp",
50 "4"
51 ],
52 [
53 "-cdrom",
54 "config-drive/cloudata.iso"
55 ],
56 ["-device", "virtio-net,netdev=user.0"],
57 ["-object","rng-random,id=objrng0,filename=/dev/urandom"],
58 ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ]
59 ],
60 "vm_name": "{{user `vm_name`}}",
61 "output_directory": "images",
62 "disk_compression": true,
63 "disk_size": "{{ user `disk_size`}}",
64 "format": "qcow2",
65 "iso_url": "{{ user `image_base_url`}}",
66 "iso_checksum": "file:{{ user `image_md5_url`}}",
67 "iso_target_path": "{{ user `images_cache`}}",
68 "disk_image": true,
69 "accelerator": "kvm",
70 "headless": true,
71 "ssh_username": "{{user `user`}}",
72 "ssh_password": "{{user `password`}}",
73 "ssh_host_port_min": 7000,
74 "ssh_host_port_max": 7050,
75 "vnc_port_max": "5956",
76 "vnc_port_min": "5956",
Vasyl Saienko057953f2023-11-27 12:45:27 +000077 "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 +020078 "boot_wait": "10s",
79 "ssh_wait_timeout": "360s"
80 }
81 ]
82}