-
Notifications
You must be signed in to change notification settings - Fork 0
/
openSUSE_QEMU_template.json
135 lines (123 loc) · 4.59 KB
/
openSUSE_QEMU_template.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
"variables": {
"iso_url": "https://download.opensuse.org/distribution/leap/42.3/iso/openSUSE-Leap-42.3-NET-x86_64.iso"
, "iso_checksum": "d1a17116cf33a5582b83ef479d7b151b33938e60f07eebc544abf162e2aa5c12"
, "iso_checksum_type": "sha256"
, "user": "root"
, "password": "packer"
, "disk_size": "10240"
, "domain": ""
, "ssh_timeout": "50000s"
, "http_directory": "served_files"
},
"builders":
[
{
"type": "qemu",
"name": "Salt Master"
, "qemuargs":[
["-m", "2048"]
, ["-smp", "2"]
]
, "iso_url": "{{user `iso_url`}}"
, "iso_checksum": "{{user `iso_checksum`}}"
, "iso_checksum_type": "{{user `iso_checksum_type`}}"
, "output_directory": "output_opensuse_chipnibbles"
, "shutdown_command": "echo 'packer' | sudo -S /sbin/halt -p"
, "format": "qcow2"
, "headless": true
, "accelerator": "kvm"
, "http_directory": "{{user `http_directory`}}"
, "http_port_min": 10082
, "http_port_max": 10089
, "ssh_host_port_min": 2222
, "ssh_host_port_max": 2229
, "ssh_username": "{{user `user`}}"
, "ssh_password": "{{user `password`}}"
, "ssh_port": 22
, "ssh_timeout": "{{user `ssh_timeout`}}"
, "vm_name": "Master_openSUSE_42_3"
, "net_device": "virtio-net"
, "disk_interface": "virtio"
, "disk_size": "{{user `disk_size`}}"
, "boot_wait": "5s"
, "boot_command": [
"<esc><enter><wait>"
, "linux netdevice=eth0 netsetup=dhcp<wait>"
, "install=http://download.opensuse.org/distribution/leap/42.3/repo/oss/ <wait>"
, "lang=en_US autoyast2=http://{{ .HTTPIP}}:{{ .HTTPPort}}/autoinst.xml <wait>"
, "textmode=1<wait>"
, "<enter><wait>"
]
}
,{
"type": "qemu"
, "name": "Salt Minion"
, "qemuargs":[
["-m", "2048"]
, ["-smp", "2"]
]
, "iso_url": "{{user `iso_url`}}"
, "iso_checksum": "{{user `iso_checksum`}}"
, "iso_checksum_type": "{{user `iso_checksum_type`}}"
, "output_directory": "output_opensuse_chipnibbles"
, "shutdown_command": "echo 'packer' | sudo -S /sbin/halt -p"
, "format": "qcow2"
, "headless": true
, "accelerator": "kvm"
, "http_directory": "{{user `http_directory`}}"
, "http_port_min": 10082
, "http_port_max": 10089
, "ssh_host_port_min": 2222
, "ssh_host_port_max": 2229
, "ssh_username": "{{user `user`}}"
, "ssh_password": "{{user `password`}}"
, "ssh_port": 22
, "ssh_timeout": "{{user `ssh_timeout`}}"
, "vm_name": "Minion_openSUSE_42_3"
, "net_device": "virtio-net"
, "disk_interface": "virtio"
, "disk_size": "{{user `disk_size`}}"
, "boot_wait": "5s"
, "boot_command": [
"<esc><enter><wait>"
, "linux netdevice=eth0 netsetup=dhcp<wait>"
, "install=http://download.opensuse.org/distribution/leap/42.3/repo/oss/ <wait>"
, "lang=en_US autoyast2=http://{{ .HTTPIP}}:{{ .HTTPPort}}/autoinst.xml <wait>"
, "textmode=1<wait>"
, "<enter><wait>"
]
}
],
"provisioners": [
{
"type": "file"
, "source": "served_files/authorized_keys"
, "destination": "/tmp/authorized_keys"
}
, {
"execute_command": "echo 'packer' | {{ .Vars }} sudo -S -E bash '{{ .Path}}'"
, "type": "shell"
, "scripts": [
"scripts/wait.sh"
, "scripts/sanitize.sh"
]
}
, {
"execute_command": "echo 'packer' | {{ .Vars }} sudo -S -E bash '{{ .Path}}'"
, "type": "shell"
, "scripts": [
"scripts/bootstrap_saltmaster.sh"
]
, "only": ["Salt Master"]
}
, {
"execute_command": "echo 'packer' | {{ .Vars }} sudo -S -E bash '{{ .Path}}'"
, "type": "shell"
, "scripts": [
"scripts/bootstrap_saltminion.sh"
]
, "only": ["Salt Minion"]
}
]
}