blob: 57952fc46267355190fa54e50ceff9fcfcff2e79 [file] [log] [blame]
jan kaufmana519d7b2015-03-04 00:51:47 +01001{
2 "variables": {
3 "user": "{{ env `BUILD_USER` }}",
4 "password": "{{ env `BUILD_PASSWORD` }}",
5 "do_api_token": "{{ env `DO_API_TOKEN` }}",
6 "distro": "ubuntu-14-04-x64",
7 "disk_size": 8000
8 },
9
10 "provisioners": [
11 {
12 "type": "shell",
13 "execute_command": "echo '{{user `user`}}' |sudo -S sh '{{.Path}}'",
14 "override": {
15 "virtualbox-iso": {
16 "scripts": [
17 "scripts/base.sh",
18 "scripts/salt.sh",
19 "scripts/vagrant.sh",
20 "scripts/virtualbox.sh",
21 "scripts/cleanup.sh",
22 "scripts/zerodisk.sh"
23 ]
24 },
25 "vmware-iso": {
26 "scripts": [
27 "scripts/base.sh",
jan kaufmandfc08f02015-04-29 20:17:55 +020028 "scripts/salt.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010029 "scripts/vmware.sh",
30 "scripts/cleanup.sh",
31 "scripts/zerodisk.sh"
32 ]
33 },
34 "qemu": {
35 "scripts": [
36 "scripts/base.sh",
37 "scripts/salt.sh",
38 "scripts/cleanup.sh",
39 "scripts/zerodisk.sh"
40 ]
41 },
42 "digitalocean": {
43 "scripts": [
44 "scripts/base.sh",
45 "scripts/salt.sh",
46 "scripts/cleanup.sh"
47 ]
48 }
49 }
50 }
51 ],
52 "post-processors": [
53 {
54 "type": "vagrant",
55 "keep_input_artifact": true,
56 "except": "digitalocean",
57 "override": {
58 "virtualbox": {
jan kaufmandfc08f02015-04-29 20:17:55 +020059 "output": "images/{{ user `distro` }}-vbox-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010060 },
61 "vmware": {
jan kaufmandfc08f02015-04-29 20:17:55 +020062 "output": "images/{{ user `distro` }}-vmware-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010063 },
64 "qemu": {
jan kaufmandfc08f02015-04-29 20:17:55 +020065 "output": "images/{{ user `distro` }}-qemu-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010066 }
67 },
68 "except": [ "digitalocean" ]
69 }
70 ],
71 "builders": [
72 {
73 "type": "virtualbox-iso",
74 "boot_command": [
75 "<esc><wait>",
76 "<esc><wait>",
77 "<enter><wait>",
78 "/install/vmlinuz<wait>",
79 " auto<wait>",
80 " console-setup/ask_detect=false<wait>",
81 " console-setup/layoutcode=us<wait>",
82 " console-setup/modelcode=pc105<wait>",
83 " debconf/frontend=noninteractive<wait>",
84 " debian-installer=en_US<wait>",
85 " fb=false<wait>",
86 " initrd=/install/initrd.gz<wait>",
87 " kbd-chooser/method=us<wait>",
88 " keyboard-configuration/layout=USA<wait>",
89 " keyboard-configuration/variant=USA<wait>",
90 " passwd/user-fullname={{user `user`}} ",
91 " passwd/user-password-again={{user `password`}} ",
92 " passwd/user-password={{user `password`}} ",
93 " passwd/username={{user `user`}} ",
94 " locale=en_US<wait>",
95 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +020096 " netcfg/get_domain=cloudlab.cz<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +010097 " noapic<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +020098 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +010099 " -- <wait>",
100 "<enter><wait>"
101 ],
102 "boot_wait": "5s",
103 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200104 "output_directory": "images/{{ user `distro` }}-vbox-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100105 "guest_os_type": "Ubuntu_64",
106 "http_directory": "http",
jan kaufmandfc08f02015-04-29 20:17:55 +0200107 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100108 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200109 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100110 "ssh_username": "{{user `user`}}",
111 "ssh_password": "{{user `password`}}",
112 "ssh_port": 22,
113 "ssh_wait_timeout": "10000s",
114 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
115 "vboxmanage": [
116 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
117 [ "modifyvm", "{{.Name}}", "--cpus", "2" ]
118 ]
119 },
120 {
121 "type": "vmware-iso",
122 "boot_command": [
123 "<esc><wait>",
124 "<esc><wait>",
125 "<enter><wait>",
126 "/install/vmlinuz<wait>",
127 " auto<wait>",
128 " console-setup/ask_detect=false<wait>",
129 " console-setup/layoutcode=us<wait>",
130 " console-setup/modelcode=pc105<wait>",
131 " debconf/frontend=noninteractive<wait>",
132 " debian-installer=en_US<wait>",
133 " fb=false<wait>",
134 " initrd=/install/initrd.gz<wait>",
135 " kbd-chooser/method=us<wait>",
136 " keyboard-configuration/layout=USA<wait>",
137 " keyboard-configuration/variant=USA<wait>",
138 " passwd/user-fullname={{user `user`}} ",
139 " passwd/user-password-again={{user `password`}} ",
140 " passwd/user-password={{user `password`}} ",
141 " passwd/username={{user `user`}} ",
142 " locale=en_US<wait>",
143 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100144 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100145 " noapic<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +0200146 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100147 " -- <wait>",
148 "<enter><wait>"
149 ],
150 "boot_wait": "5s",
151 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200152 "disk_type_id": 4,
153 "vmdk_name": "{{ user `distro`}}",
154 "output_directory": "images/{{ user `distro` }}-vmware-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100155 "guest_os_type": "linux",
156 "http_directory": "http",
jan kaufmandfc08f02015-04-29 20:17:55 +0200157 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100158 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200159 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100160 "ssh_username": "{{user `user`}}",
161 "ssh_password": "{{user `password`}}",
162 "ssh_port": 22,
163 "ssh_wait_timeout": "10000s",
164 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
165 "vmx_data": {
jan kaufmandfc08f02015-04-29 20:17:55 +0200166 "memsize": "1024",
jan kaufmana519d7b2015-03-04 00:51:47 +0100167 "numvcpus": "1",
168 "cpuid.coresPerSocket": "1"
169 }
170 },
171 {
172 "type": "qemu",
173 "vm_name": "{{ user `distro` }}-{{ timestamp }}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200174 "output_directory": "images/{{ user `distro` }}-qemu-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100175 "format": "qcow2",
176 "accelerator": "kvm",
177 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200178 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100179 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200180 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100181 "http_directory": "http",
jan kaufman64b9f972015-03-11 11:31:28 +0100182 "headless": true,
jan kaufmana519d7b2015-03-04 00:51:47 +0100183 "ssh_username": "{{user `user`}}",
184 "ssh_password": "{{user `password`}}",
185 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
186 "boot_wait": "2s",
187 "boot_command": [
188 "<esc><wait>",
189 "<esc><wait>",
190 "<enter><wait>",
191 "/install/vmlinuz<wait>",
192 " auto<wait>",
193 " console-setup/ask_detect=false<wait>",
194 " console-setup/layoutcode=us<wait>",
195 " console-setup/modelcode=pc105<wait>",
196 " debconf/frontend=noninteractive<wait>",
197 " debian-installer=en_US<wait>",
198 " fb=false<wait>",
199 " initrd=/install/initrd.gz<wait>",
200 " kbd-chooser/method=us<wait>",
201 " keyboard-configuration/layout=USA<wait>",
202 " keyboard-configuration/variant=USA<wait>",
203 " passwd/user-fullname={{user `user`}} ",
204 " passwd/user-password-again={{user `password`}} ",
205 " passwd/user-password={{user `password`}} ",
206 " passwd/username={{user `user`}} ",
207 " locale=en_US<wait>",
208 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100209 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100210 " noapic<wait>",
jan kaufman757e3322015-03-11 11:30:59 +0100211 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100212 " -- <wait>",
213 "<enter><wait>"
214 ]
215 },
216 {
217 "type": "digitalocean",
218 "api_token": "{{user `do_api_token`}}",
219 "image": "{{user `distro`}}",
220 "snapshot_name": "{{ user `distro` }}-{{ timestamp }}",
221 "region" : "ams2",
222 "size" : "1gb"
223 }
224 ]
225}