-
Notifications
You must be signed in to change notification settings - Fork 1
/
k3os-proxmox.json
81 lines (76 loc) · 2.32 KB
/
k3os-proxmox.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"variables": {
"iso_url": "{{ env `K3S_URL` }}",
"iso_md5": "{{ env `K3S_MD5` }}"
},
"sensitive-variables": ["sshkey", "password"],
"builders":
[
{
"type": "proxmox",
"proxmox_url": "{{ user `proxmox_url`}}",
"insecure_skip_tls_verify": "{{ user `proxmox_ssl` }}",
"username": "{{ user `proxmox_user`}}",
"password": "{{ user `proxmox_pass`}}",
"node": "{{ user `target_node`}}",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_md5` }}",
"iso_storage_pool": "{{ user `iso_storage_pool`}}",
"unmount_iso": true,
"template_name": "k3os-template",
"template_description": "k3os",
"qemu_agent": true,
"communicator": "ssh",
"ssh_username": "rancher",
"ssh_password": "rancher",
"ssh_private_key_file": "packer_cache/build/k3os.pem",
"vm_name": "k3os-template",
"vm_id": "{{ user `vm_id` }}",
"cores": "{{ user `cores`}}",
"memory": "{{ user `memory`}}",
"sockets": "1",
"cpu_type": "host",
"os": "l26",
"network_adapters": [
{
"model": "virtio",
"bridge": "vmbr0"
}
],
"scsi_controller": "virtio-scsi-pci",
"disks": [
{
"type": "scsi",
"disk_size": "{{ user `disk_size`}}",
"storage_pool": "{{ user `vm_storage_pool` }}",
"storage_pool_type": "{{ user `vm_storage_pool_type` }}",
"format": "raw"
}
],
"http_directory":"http",
"boot_wait": "{{ user `boot_wait`}}",
"boot_key_interval": "20ms",
"boot_command": [
"e<down><down><down><down><down><down><down><left>",
"boot_cmd=\"echo ",
"GA_PATH=/dev/vport2p1>/etc/conf.d/qemu-guest-agent\" ",
"ssh_authorized_keys=\"{{ user `authorized_keys` }}\"<F10>"
]
}
],
"provisioners": [
{ "type": "file",
"source": "packer_cache/build/config.yaml",
"destination": "/tmp/config.yaml"
},
{ "type": "file",
"source": "packer_cache/build/install.sh",
"destination": "/tmp/install.sh"
},
{
"type": "shell",
"execute_command": "{{ .Vars }} sudo -E sh '{{ .Path }}'",
"inline": [ "bash -x /tmp/install.sh --takeover --debug --config /tmp/config.yaml /dev/sda" ]
}
]
}