-
Notifications
You must be signed in to change notification settings - Fork 123
/
arch-template.json
138 lines (138 loc) · 5.54 KB
/
arch-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
136
137
138
{
"variables": {
"iso_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/archlinux-{{isotime \"2006.01\"}}.01-x86_64.iso",
"iso_checksum_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/sha1sums.txt",
"ssh_timeout": "20m",
"country": "US",
"write_zeros": "true",
"headless": "false"
},
"builders": [
{
"type": "parallels-iso",
"parallels_tools_flavor": "lin",
"parallels_tools_mode": "attach",
"guest_os_type": "linux-2.6",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "file:{{ user `iso_checksum_url` }}",
"http_directory": "srv",
"boot_wait": "5s",
"boot_command": [
"<enter><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
"/usr/bin/bash ./enable-ssh.sh<enter>"
],
"cpus": 1,
"memory": 768,
"disk_size": 20480,
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"shutdown_command": "sudo systemctl start poweroff.timer"
},
{
"type": "virtualbox-iso",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "file:{{ user `iso_checksum_url` }}",
"guest_os_type": "ArchLinux_64",
"guest_additions_mode": "disable",
"http_directory": "srv",
"boot_wait": "5s",
"boot_command": [
"<enter><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
"/usr/bin/bash ./enable-ssh.sh<enter>"
],
"cpus": 1,
"memory": 768,
"disk_size": 20480,
"hard_drive_interface": "sata",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"shutdown_command": "sudo systemctl start poweroff.timer",
"headless": "{{ user `headless`}}"
},
{
"type": "vmware-iso",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "file:{{ user `iso_checksum_url` }}",
"http_directory": "srv",
"boot_wait": "5s",
"boot_command": [
"<enter><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
"/usr/bin/bash ./enable-ssh.sh<enter>"
],
"cpus": 1,
"memory": 768,
"disk_size": 20480,
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"shutdown_command": "sudo systemctl start poweroff.timer",
"headless": "{{ user `headless`}}"
},
{
"type": "qemu",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "file:{{ user `iso_checksum_url` }}",
"http_directory": "srv",
"boot_wait": "5s",
"boot_command": [
"<enter><wait10><wait10><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait5>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait5>",
"/usr/bin/bash ./enable-ssh.sh<enter>"
],
"cpus": 1,
"memory": 768,
"disk_size": 20480,
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"shutdown_command": "sudo systemctl start poweroff.timer",
"headless": "{{ user `headless`}}"
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "{{ .Vars }} COUNTRY={{ user `country` }} sudo -E -S bash '{{ .Path }}'",
"expect_disconnect": true,
"script": "scripts/install-base.sh"
},
{
"only": ["parallels-iso"],
"type": "shell",
"execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"script": "scripts/install-parallels.sh"
},
{
"only": ["virtualbox-iso"],
"type": "shell",
"execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"script": "scripts/install-virtualbox.sh"
},
{
"only": ["vmware-iso"],
"type": "shell",
"execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"script": "scripts/install-vmware.sh"
},
{
"type": "shell",
"execute_command": "{{ .Vars }} WRITE_ZEROS={{ user `write_zeros` }} sudo -E -S bash '{{ .Path }}'",
"script": "scripts/cleanup.sh"
}
],
"post-processors": [
{
"type": "vagrant",
"output": "output/packer_arch_{{ .Provider }}-{{isotime \"2006.01\"}}.01.box"
}
]
}