blob: d7ac736fffa8f01495e7cf97eb1b4f5fedd8d5c3 [file] [log] [blame]
jan kaufmana519d7b2015-03-04 00:51:47 +01001{
2 "variables": {
Filip Pytloun077322e2015-06-25 19:18:33 +02003 "user": "{{ env `BUILD_USER` }}",
4 "password": "{{ env `BUILD_PASSWORD` }}",
jan kaufmana519d7b2015-03-04 00:51:47 +01005 "do_api_token": "{{ env `DO_API_TOKEN` }}",
6 "distro": "ubuntu-14-04-x64",
Filip Pytloun39832362015-06-25 18:05:47 +02007 "disk_size": "8000"
jan kaufmana519d7b2015-03-04 00:51:47 +01008 },
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 },
Filip Pytloun7b48fd22015-06-30 23:34:01 +020042 "docker": {
43 "scripts": [
44 "scripts/docker.sh",
45 "scripts/base.sh",
46 "scripts/salt.sh",
47 "scripts/cleanup.sh"
48 ]
49 },
jan kaufmana519d7b2015-03-04 00:51:47 +010050 "digitalocean": {
51 "scripts": [
52 "scripts/base.sh",
53 "scripts/salt.sh",
54 "scripts/cleanup.sh"
55 ]
56 }
57 }
jan kaufman0fcf1a72015-05-06 10:16:12 +020058 },
59 {
60 "type": "file",
61 "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
62 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
Filip Pytloun60411d12015-06-25 21:14:41 +020063 },
64 {
65 "type": "file",
66 "source": "configs/cloud/cloud.cfg",
67 "destination": "/etc/cloud/cloud.cfg"
jan kaufmana519d7b2015-03-04 00:51:47 +010068 }
69 ],
70 "post-processors": [
71 {
72 "type": "vagrant",
73 "keep_input_artifact": true,
74 "except": "digitalocean",
75 "override": {
76 "virtualbox": {
jan kaufmandfc08f02015-04-29 20:17:55 +020077 "output": "images/{{ user `distro` }}-vbox-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010078 },
79 "vmware": {
jan kaufmandfc08f02015-04-29 20:17:55 +020080 "output": "images/{{ user `distro` }}-vmware-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010081 },
82 "qemu": {
jan kaufmandfc08f02015-04-29 20:17:55 +020083 "output": "images/{{ user `distro` }}-qemu-{{ timestamp }}.box"
Filip Pytloun7b48fd22015-06-30 23:34:01 +020084 },
85 "qemu": {
86 "output": "images/{{ user `distro` }}-qemu-{{ timestamp }}.box"
jan kaufmana519d7b2015-03-04 00:51:47 +010087 }
88 },
Filip Pytloun7b48fd22015-06-30 23:34:01 +020089 "except": [ "digitalocean", "docker" ]
90 },
91 {
92 "type": "docker-tag",
93 "repository": "cloudlab/ubuntu",
Filip Pytloun7d733bc2015-07-11 08:34:49 +020094 "tag": "14.04",
95 "only": ["docker"]
jan kaufmana519d7b2015-03-04 00:51:47 +010096 }
97 ],
98 "builders": [
99 {
100 "type": "virtualbox-iso",
101 "boot_command": [
102 "<esc><wait>",
103 "<esc><wait>",
104 "<enter><wait>",
105 "/install/vmlinuz<wait>",
106 " auto<wait>",
107 " console-setup/ask_detect=false<wait>",
108 " console-setup/layoutcode=us<wait>",
109 " console-setup/modelcode=pc105<wait>",
110 " debconf/frontend=noninteractive<wait>",
111 " debian-installer=en_US<wait>",
112 " fb=false<wait>",
113 " initrd=/install/initrd.gz<wait>",
114 " kbd-chooser/method=us<wait>",
115 " keyboard-configuration/layout=USA<wait>",
116 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun077322e2015-06-25 19:18:33 +0200117 " passwd/user-fullname={{user `user`}} ",
118 " passwd/user-password-again={{user `password`}} ",
119 " passwd/user-password={{user `password`}} ",
120 " passwd/username={{user `user`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100121 " locale=en_US<wait>",
122 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +0200123 " netcfg/get_domain=cloudlab.cz<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100124 " noapic<wait>",
Filip Pytloun5bfc1df2015-07-13 14:36:46 +0200125 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100126 " -- <wait>",
127 "<enter><wait>"
128 ],
129 "boot_wait": "5s",
130 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200131 "output_directory": "images/{{ user `distro` }}-vbox-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100132 "guest_os_type": "Ubuntu_64",
133 "http_directory": "http",
jan kaufmandfc08f02015-04-29 20:17:55 +0200134 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100135 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200136 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100137 "ssh_username": "{{user `user`}}",
138 "ssh_password": "{{user `password`}}",
139 "ssh_port": 22,
140 "ssh_wait_timeout": "10000s",
141 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
142 "vboxmanage": [
143 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
144 [ "modifyvm", "{{.Name}}", "--cpus", "2" ]
145 ]
146 },
147 {
148 "type": "vmware-iso",
149 "boot_command": [
150 "<esc><wait>",
151 "<esc><wait>",
152 "<enter><wait>",
153 "/install/vmlinuz<wait>",
154 " auto<wait>",
155 " console-setup/ask_detect=false<wait>",
156 " console-setup/layoutcode=us<wait>",
157 " console-setup/modelcode=pc105<wait>",
158 " debconf/frontend=noninteractive<wait>",
159 " debian-installer=en_US<wait>",
160 " fb=false<wait>",
161 " initrd=/install/initrd.gz<wait>",
162 " kbd-chooser/method=us<wait>",
163 " keyboard-configuration/layout=USA<wait>",
164 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun077322e2015-06-25 19:18:33 +0200165 " passwd/user-fullname={{user `user`}} ",
166 " passwd/user-password-again={{user `password`}} ",
167 " passwd/user-password={{user `password`}} ",
168 " passwd/username={{user `user`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100169 " locale=en_US<wait>",
170 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100171 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100172 " noapic<wait>",
Filip Pytloun5bfc1df2015-07-13 14:36:46 +0200173 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100174 " -- <wait>",
175 "<enter><wait>"
176 ],
177 "boot_wait": "5s",
178 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200179 "disk_type_id": 4,
180 "vmdk_name": "{{ user `distro`}}",
181 "output_directory": "images/{{ user `distro` }}-vmware-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100182 "guest_os_type": "linux",
183 "http_directory": "http",
jan kaufmandfc08f02015-04-29 20:17:55 +0200184 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100185 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200186 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100187 "ssh_username": "{{user `user`}}",
188 "ssh_password": "{{user `password`}}",
189 "ssh_port": 22,
190 "ssh_wait_timeout": "10000s",
191 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
192 "vmx_data": {
jan kaufmandfc08f02015-04-29 20:17:55 +0200193 "memsize": "1024",
jan kaufmana519d7b2015-03-04 00:51:47 +0100194 "numvcpus": "1",
195 "cpuid.coresPerSocket": "1"
196 }
197 },
198 {
199 "type": "qemu",
200 "vm_name": "{{ user `distro` }}-{{ timestamp }}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200201 "output_directory": "images/{{ user `distro` }}-qemu-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100202 "format": "qcow2",
203 "accelerator": "kvm",
204 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200205 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100206 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200207 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100208 "http_directory": "http",
jan kaufman64b9f972015-03-11 11:31:28 +0100209 "headless": true,
jan kaufmana519d7b2015-03-04 00:51:47 +0100210 "ssh_username": "{{user `user`}}",
211 "ssh_password": "{{user `password`}}",
212 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
213 "boot_wait": "2s",
Filip Pytloun39832362015-06-25 18:05:47 +0200214 "ssh_wait_timeout": "10000s",
jan kaufmana519d7b2015-03-04 00:51:47 +0100215 "boot_command": [
216 "<esc><wait>",
217 "<esc><wait>",
218 "<enter><wait>",
219 "/install/vmlinuz<wait>",
220 " auto<wait>",
221 " console-setup/ask_detect=false<wait>",
222 " console-setup/layoutcode=us<wait>",
223 " console-setup/modelcode=pc105<wait>",
224 " debconf/frontend=noninteractive<wait>",
225 " debian-installer=en_US<wait>",
226 " fb=false<wait>",
227 " initrd=/install/initrd.gz<wait>",
228 " kbd-chooser/method=us<wait>",
229 " keyboard-configuration/layout=USA<wait>",
230 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun077322e2015-06-25 19:18:33 +0200231 " passwd/user-fullname={{user `user`}} ",
232 " passwd/user-password-again={{user `password`}} ",
233 " passwd/user-password={{user `password`}} ",
234 " passwd/username={{user `user`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100235 " locale=en_US<wait>",
236 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100237 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100238 " noapic<wait>",
Filip Pytloun5bfc1df2015-07-13 14:36:46 +0200239 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100240 " -- <wait>",
241 "<enter><wait>"
242 ]
243 },
Filip Pytloun7b48fd22015-06-30 23:34:01 +0200244 {
245 "type": "docker",
246 "image": "ubuntu:14.04",
247 "commit": true
248 },
249 {
jan kaufmana519d7b2015-03-04 00:51:47 +0100250 "type": "digitalocean",
251 "api_token": "{{user `do_api_token`}}",
252 "image": "{{user `distro`}}",
253 "snapshot_name": "{{ user `distro` }}-{{ timestamp }}",
254 "region" : "ams2",
255 "size" : "1gb"
256 }
257 ]
258}