-
-
Notifications
You must be signed in to change notification settings - Fork 117
/
rocky8.json
66 lines (66 loc) · 1.98 KB
/
rocky8.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"variables": {
"cpu": "2",
"ram": "2048",
"name": "rocky",
"disk_size": "32768",
"version": "8",
"iso_checksum_type": "sha256",
"iso_urls": "http://10.11.1.20/pub/isos/Rocky-8.8-x86_64-boot.iso",
"iso_checksum": "96c9d96c33ebacc8e909dcf8abf067b6bb30588c0c940a9c21bb9b83f3c99868",
"headless": "true",
"config_file": "rocky8-packer-ks.cfg",
"ssh_username": "root",
"ssh_password": "packer",
"destination_server": "truenas.hl.test:/mnt/homelab-hdd/packer"
},
"builders": [
{
"name": "{{user `name`}}{{user `version`}}",
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"qemu_binary": "/usr/libexec/qemu-kvm",
"net_device": "virtio-net",
"disk_interface": "virtio",
"disk_cache": "none",
"qemuargs": [
[
"-m",
"{{user `ram`}}M"
],
[
"-smp",
"{{user `cpu`}}"
]
],
"ssh_wait_timeout": "30m",
"http_directory": ".",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"iso_urls": "{{user `iso_urls`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"boot_wait": "40s",
"boot_command": [
"<up><wait><tab><wait> net.ifnames=0 biosdevname=0 inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/http/{{user `config_file`}}<enter><wait>"
],
"disk_size": "{{user `disk_size`}}",
"disk_discard": "unmap",
"disk_compression": true,
"headless": "{{user `headless`}}",
"shutdown_command": "sudo /usr/sbin/shutdown -h now",
"output_directory": "artifacts/qemu/{{user `name`}}{{user `version`}}"
}
],
"post-processors": [
{
"type": "shell-local",
"script": "post-processors/upload-image-to-nfs.sh",
"environment_vars": [
"IMAGE_NAME={{user `name`}}",
"IMAGE_VERSION={{user `version`}}",
"DESTINATION_SERVER={{user `destination_server`}}"
]
}
]
}