blob: a918047491564881a1b2d283c86d729675cab124 [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 }
jan kaufman0fcf1a72015-05-06 10:16:12 +020050 },
51 {
52 "type": "file",
53 "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
54 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
jan kaufmana519d7b2015-03-04 00:51:47 +010055 }
56 ],
57 "post-processors": [
58 {
59 "type": "vagrant",
60 "keep_input_artifact": true,
61 "except": "digitalocean",
62 "override": {
63 "virtualbox": {
jan kaufmandfc08f02015-04-29 20:17:55 +020064 "output": "images/{{ user `distro` }}-vbox-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010065 },
66 "vmware": {
jan kaufmandfc08f02015-04-29 20:17:55 +020067 "output": "images/{{ user `distro` }}-vmware-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010068 },
69 "qemu": {
jan kaufmandfc08f02015-04-29 20:17:55 +020070 "output": "images/{{ user `distro` }}-qemu-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010071 }
72 },
73 "except": [ "digitalocean" ]
74 }
75 ],
76 "builders": [
77 {
78 "type": "virtualbox-iso",
79 "boot_command": [
80 "<esc><wait>",
81 "<esc><wait>",
82 "<enter><wait>",
83 "/install/vmlinuz<wait>",
84 " auto<wait>",
85 " console-setup/ask_detect=false<wait>",
86 " console-setup/layoutcode=us<wait>",
87 " console-setup/modelcode=pc105<wait>",
88 " debconf/frontend=noninteractive<wait>",
89 " debian-installer=en_US<wait>",
90 " fb=false<wait>",
91 " initrd=/install/initrd.gz<wait>",
92 " kbd-chooser/method=us<wait>",
93 " keyboard-configuration/layout=USA<wait>",
94 " keyboard-configuration/variant=USA<wait>",
95 " passwd/user-fullname={{user `user`}} ",
96 " passwd/user-password-again={{user `password`}} ",
97 " passwd/user-password={{user `password`}} ",
98 " passwd/username={{user `user`}} ",
99 " locale=en_US<wait>",
100 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +0200101 " netcfg/get_domain=cloudlab.cz<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100102 " noapic<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +0200103 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100104 " -- <wait>",
105 "<enter><wait>"
106 ],
107 "boot_wait": "5s",
108 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200109 "output_directory": "images/{{ user `distro` }}-vbox-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100110 "guest_os_type": "Ubuntu_64",
111 "http_directory": "http",
jan kaufmandfc08f02015-04-29 20:17:55 +0200112 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100113 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200114 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100115 "ssh_username": "{{user `user`}}",
116 "ssh_password": "{{user `password`}}",
117 "ssh_port": 22,
118 "ssh_wait_timeout": "10000s",
119 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
120 "vboxmanage": [
121 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
122 [ "modifyvm", "{{.Name}}", "--cpus", "2" ]
123 ]
124 },
125 {
126 "type": "vmware-iso",
127 "boot_command": [
128 "<esc><wait>",
129 "<esc><wait>",
130 "<enter><wait>",
131 "/install/vmlinuz<wait>",
132 " auto<wait>",
133 " console-setup/ask_detect=false<wait>",
134 " console-setup/layoutcode=us<wait>",
135 " console-setup/modelcode=pc105<wait>",
136 " debconf/frontend=noninteractive<wait>",
137 " debian-installer=en_US<wait>",
138 " fb=false<wait>",
139 " initrd=/install/initrd.gz<wait>",
140 " kbd-chooser/method=us<wait>",
141 " keyboard-configuration/layout=USA<wait>",
142 " keyboard-configuration/variant=USA<wait>",
143 " passwd/user-fullname={{user `user`}} ",
144 " passwd/user-password-again={{user `password`}} ",
145 " passwd/user-password={{user `password`}} ",
146 " passwd/username={{user `user`}} ",
147 " locale=en_US<wait>",
148 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100149 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100150 " noapic<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +0200151 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100152 " -- <wait>",
153 "<enter><wait>"
154 ],
155 "boot_wait": "5s",
156 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200157 "disk_type_id": 4,
158 "vmdk_name": "{{ user `distro`}}",
159 "output_directory": "images/{{ user `distro` }}-vmware-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100160 "guest_os_type": "linux",
161 "http_directory": "http",
jan kaufmandfc08f02015-04-29 20:17:55 +0200162 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100163 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200164 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100165 "ssh_username": "{{user `user`}}",
166 "ssh_password": "{{user `password`}}",
167 "ssh_port": 22,
168 "ssh_wait_timeout": "10000s",
169 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
170 "vmx_data": {
jan kaufmandfc08f02015-04-29 20:17:55 +0200171 "memsize": "1024",
jan kaufmana519d7b2015-03-04 00:51:47 +0100172 "numvcpus": "1",
173 "cpuid.coresPerSocket": "1"
174 }
175 },
176 {
177 "type": "qemu",
178 "vm_name": "{{ user `distro` }}-{{ timestamp }}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200179 "output_directory": "images/{{ user `distro` }}-qemu-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100180 "format": "qcow2",
181 "accelerator": "kvm",
182 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200183 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100184 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200185 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100186 "http_directory": "http",
jan kaufman64b9f972015-03-11 11:31:28 +0100187 "headless": true,
jan kaufmana519d7b2015-03-04 00:51:47 +0100188 "ssh_username": "{{user `user`}}",
189 "ssh_password": "{{user `password`}}",
190 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
191 "boot_wait": "2s",
192 "boot_command": [
193 "<esc><wait>",
194 "<esc><wait>",
195 "<enter><wait>",
196 "/install/vmlinuz<wait>",
197 " auto<wait>",
198 " console-setup/ask_detect=false<wait>",
199 " console-setup/layoutcode=us<wait>",
200 " console-setup/modelcode=pc105<wait>",
201 " debconf/frontend=noninteractive<wait>",
202 " debian-installer=en_US<wait>",
203 " fb=false<wait>",
204 " initrd=/install/initrd.gz<wait>",
205 " kbd-chooser/method=us<wait>",
206 " keyboard-configuration/layout=USA<wait>",
207 " keyboard-configuration/variant=USA<wait>",
208 " passwd/user-fullname={{user `user`}} ",
209 " passwd/user-password-again={{user `password`}} ",
210 " passwd/user-password={{user `password`}} ",
211 " passwd/username={{user `user`}} ",
212 " locale=en_US<wait>",
213 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100214 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100215 " noapic<wait>",
jan kaufman757e3322015-03-11 11:30:59 +0100216 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100217 " -- <wait>",
218 "<enter><wait>"
219 ]
220 },
221 {
222 "type": "digitalocean",
223 "api_token": "{{user `do_api_token`}}",
224 "image": "{{user `distro`}}",
225 "snapshot_name": "{{ user `distro` }}-{{ timestamp }}",
226 "region" : "ams2",
227 "size" : "1gb"
228 }
229 ]
230}