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
139
140
|
{
"variables": {
"iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso",
"iso_checksum": "737ae7041212c628de5751d15c3016058b0e833fdc32e7420209b76ca3d0a535",
"iso_checksum_type": "sha256",
"vm_name": "ubuntu-16.04-amd64",
"http_dir": "http",
"preseed_path": "ubuntu-16.04/preseed.cfg",
"shutdown_command": "systemctl poweroff",
"ssh_password":"{{ env `ROOTPW` }}"
},
"builders": [{
"type": "qemu",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"output_directory": "output-{{ user `vm_name` }}-{{ build_type }}",
"vm_name": "{{ user `vm_name` }}",
"disk_size": "{{ user `disk_size` }}",
"format": "qcow2",
"headless": "{{ user `headless` }}",
"http_directory": "{{ user `http_dir` }}",
"boot_command": [
"<enter><wait>",
"<f6><esc>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs>",
"/install/vmlinuz ",
"initrd=/install/initrd.gz ",
"auto=true ",
"passwd/root-password={{ user `ssh_password` }} ",
"passwd/root-password-again={{ user `ssh_password` }} ",
"debconf/priority=critical ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed_path` }} ",
"<enter>"
],
"boot_wait": "5s",
"ssh_timeout": "{{user `ssh_timeout`}}",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}",
"shutdown_command": "{{ user `shutdown_command` }}",
"qemuargs": [
["-m", "{{user `memory`}}"],
["-smp", "{{user `cpus`}}"]
]
}, {
"type": "virtualbox-iso",
"guest_os_type": "Ubuntu_64",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"output_directory": "output-{{ user `vm_name` }}-{{ build_type }}",
"vm_name": "{{ user `vm_name` }}",
"disk_size": "{{ user `disk_size` }}",
"headless": "{{ user `headless` }}",
"http_directory": "{{ user `http_dir` }}",
"boot_command": [
"<enter><wait>",
"<f6><esc>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs>",
"/install/vmlinuz ",
"initrd=/install/initrd.gz ",
"auto=true ",
"passwd/root-password={{ user `ssh_password` }} ",
"passwd/root-password-again={{ user `ssh_password` }} ",
"debconf/priority=critical ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed_path` }} ",
"<enter>"
],
"boot_wait": "5s",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}",
"shutdown_command": "{{ user `shutdown_command` }}",
"vboxmanage": [
["modifyvm", "{{ .Name }}", "--memory", "{{ user `memory` }}"],
["modifyvm", "{{ .Name }}", "--cpus", "{{ user `cpus` }}"]
]
}, {
"type": "vmware-iso",
"guest_os_type": "ubuntu-64",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"output_directory": "output-{{ user `vm_name` }}-{{ build_type }}",
"vm_name": "{{ user `vm_name` }}",
"disk_size": "{{ user `disk_size` }}",
"headless": "{{ user `headless` }}",
"http_directory": "{{ user `http_dir` }}",
"boot_command": [
"<enter><wait>",
"<f6><esc>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs>",
"/install/vmlinuz ",
"initrd=/install/initrd.gz ",
"auto=true ",
"passwd/root-password={{ user `ssh_password` }} ",
"passwd/root-password-again={{ user `ssh_password` }} ",
"debconf/priority=critical ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed_path` }} ",
"<enter>"
],
"boot_wait": "5s",
"ssh_timeout": "{{ user `ssh_timeout` }}",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}",
"shutdown_command": "{{ user `shutdown_command` }}",
"vmx_data": {
"memsize": "{{ user `memory` }}",
"numvcpus": "{{ user `cpus` }}"
}
}],
"post-processors": [{
"type": "manifest",
"output": "output-{{ user `vm_name` }}-{{ build_type }}/manifest.json"
}]
}
|