-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpacker-rancher.json
45 lines (45 loc) · 1.2 KB
/
packer-rancher.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
{
"builders":
[
{
"type": "qemu",
"iso_url": "https://releases.rancher.com/os/latest/rancheros.iso",
"iso_checksum_type": "md5",
"iso_checksum": "fbc67ac3a71e9ba53a18b65ce4c0d9f6",
"output_directory": "output_rancheros",
"ssh_wait_timeout": "360s",
"shutdown_command": "sudo shutdown -h now",
"disk_size": 10000,
"format": "qcow2",
"headless": true,
"accelerator": "kvm",
"ssh_host_port_min": 2225,
"ssh_host_port_max": 2229,
"ssh_username": "rancher",
"ssh_password": "rancher",
"ssh_port": 22,
"vm_name": "rancheros",
"net_device": "virtio-net",
"disk_interface": "scsi",
"qemuargs": [
["-m", "1024M"],
["-kernel", "/mnt/boot/vmlinuz"],
["-initrd", "/mnt/boot/initrd"],
["-append", "quiet rancher.autologin=tty1 rancher.autologin=ttyS0 rancher.password=rancher"]
]
}
],
"provisioners": [
{
"type": "file",
"source": "cloud_config.yml",
"destination": "/home/rancher/cloud_config.yml"
},
{
"type": "shell",
"inline": [
"sleep 5",
"sudo ros install -f -c cloud_config.yml -d /dev/sda -no-reboot"
]
}]
}