blob: 1677300807ae4c743058e74e7d7ced9aed5283e8 [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",
94 "tag": "14.04"
jan kaufmana519d7b2015-03-04 00:51:47 +010095 }
96 ],
97 "builders": [
98 {
99 "type": "virtualbox-iso",
100 "boot_command": [
101 "<esc><wait>",
102 "<esc><wait>",
103 "<enter><wait>",
104 "/install/vmlinuz<wait>",
105 " auto<wait>",
106 " console-setup/ask_detect=false<wait>",
107 " console-setup/layoutcode=us<wait>",
108 " console-setup/modelcode=pc105<wait>",
109 " debconf/frontend=noninteractive<wait>",
110 " debian-installer=en_US<wait>",
111 " fb=false<wait>",
112 " initrd=/install/initrd.gz<wait>",
113 " kbd-chooser/method=us<wait>",
114 " keyboard-configuration/layout=USA<wait>",
115 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun077322e2015-06-25 19:18:33 +0200116 " passwd/user-fullname={{user `user`}} ",
117 " passwd/user-password-again={{user `password`}} ",
118 " passwd/user-password={{user `password`}} ",
119 " passwd/username={{user `user`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100120 " locale=en_US<wait>",
121 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +0200122 " netcfg/get_domain=cloudlab.cz<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100123 " noapic<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +0200124 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100125 " -- <wait>",
126 "<enter><wait>"
127 ],
128 "boot_wait": "5s",
129 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200130 "output_directory": "images/{{ user `distro` }}-vbox-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100131 "guest_os_type": "Ubuntu_64",
132 "http_directory": "http",
jan kaufmandfc08f02015-04-29 20:17:55 +0200133 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100134 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200135 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100136 "ssh_username": "{{user `user`}}",
137 "ssh_password": "{{user `password`}}",
138 "ssh_port": 22,
139 "ssh_wait_timeout": "10000s",
140 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
141 "vboxmanage": [
142 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
143 [ "modifyvm", "{{.Name}}", "--cpus", "2" ]
144 ]
145 },
146 {
147 "type": "vmware-iso",
148 "boot_command": [
149 "<esc><wait>",
150 "<esc><wait>",
151 "<enter><wait>",
152 "/install/vmlinuz<wait>",
153 " auto<wait>",
154 " console-setup/ask_detect=false<wait>",
155 " console-setup/layoutcode=us<wait>",
156 " console-setup/modelcode=pc105<wait>",
157 " debconf/frontend=noninteractive<wait>",
158 " debian-installer=en_US<wait>",
159 " fb=false<wait>",
160 " initrd=/install/initrd.gz<wait>",
161 " kbd-chooser/method=us<wait>",
162 " keyboard-configuration/layout=USA<wait>",
163 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun077322e2015-06-25 19:18:33 +0200164 " passwd/user-fullname={{user `user`}} ",
165 " passwd/user-password-again={{user `password`}} ",
166 " passwd/user-password={{user `password`}} ",
167 " passwd/username={{user `user`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100168 " locale=en_US<wait>",
169 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100170 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100171 " noapic<wait>",
jan kaufmandfc08f02015-04-29 20:17:55 +0200172 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100173 " -- <wait>",
174 "<enter><wait>"
175 ],
176 "boot_wait": "5s",
177 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200178 "disk_type_id": 4,
179 "vmdk_name": "{{ user `distro`}}",
180 "output_directory": "images/{{ user `distro` }}-vmware-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100181 "guest_os_type": "linux",
182 "http_directory": "http",
jan kaufmandfc08f02015-04-29 20:17:55 +0200183 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100184 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200185 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100186 "ssh_username": "{{user `user`}}",
187 "ssh_password": "{{user `password`}}",
188 "ssh_port": 22,
189 "ssh_wait_timeout": "10000s",
190 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
191 "vmx_data": {
jan kaufmandfc08f02015-04-29 20:17:55 +0200192 "memsize": "1024",
jan kaufmana519d7b2015-03-04 00:51:47 +0100193 "numvcpus": "1",
194 "cpuid.coresPerSocket": "1"
195 }
196 },
197 {
198 "type": "qemu",
199 "vm_name": "{{ user `distro` }}-{{ timestamp }}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200200 "output_directory": "images/{{ user `distro` }}-qemu-{{ timestamp }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100201 "format": "qcow2",
202 "accelerator": "kvm",
203 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200204 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100205 "iso_checksum_type": "md5",
jan kaufmandfc08f02015-04-29 20:17:55 +0200206 "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195",
jan kaufmana519d7b2015-03-04 00:51:47 +0100207 "http_directory": "http",
jan kaufman64b9f972015-03-11 11:31:28 +0100208 "headless": true,
jan kaufmana519d7b2015-03-04 00:51:47 +0100209 "ssh_username": "{{user `user`}}",
210 "ssh_password": "{{user `password`}}",
211 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
212 "boot_wait": "2s",
Filip Pytloun39832362015-06-25 18:05:47 +0200213 "ssh_wait_timeout": "10000s",
jan kaufmana519d7b2015-03-04 00:51:47 +0100214 "boot_command": [
215 "<esc><wait>",
216 "<esc><wait>",
217 "<enter><wait>",
218 "/install/vmlinuz<wait>",
219 " auto<wait>",
220 " console-setup/ask_detect=false<wait>",
221 " console-setup/layoutcode=us<wait>",
222 " console-setup/modelcode=pc105<wait>",
223 " debconf/frontend=noninteractive<wait>",
224 " debian-installer=en_US<wait>",
225 " fb=false<wait>",
226 " initrd=/install/initrd.gz<wait>",
227 " kbd-chooser/method=us<wait>",
228 " keyboard-configuration/layout=USA<wait>",
229 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun077322e2015-06-25 19:18:33 +0200230 " passwd/user-fullname={{user `user`}} ",
231 " passwd/user-password-again={{user `password`}} ",
232 " passwd/user-password={{user `password`}} ",
233 " passwd/username={{user `user`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100234 " locale=en_US<wait>",
235 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100236 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100237 " noapic<wait>",
jan kaufman757e3322015-03-11 11:30:59 +0100238 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100239 " -- <wait>",
240 "<enter><wait>"
241 ]
242 },
Filip Pytloun7b48fd22015-06-30 23:34:01 +0200243 {
244 "type": "docker",
245 "image": "ubuntu:14.04",
246 "commit": true
247 },
248 {
jan kaufmana519d7b2015-03-04 00:51:47 +0100249 "type": "digitalocean",
250 "api_token": "{{user `do_api_token`}}",
251 "image": "{{user `distro`}}",
252 "snapshot_name": "{{ user `distro` }}-{{ timestamp }}",
253 "region" : "ams2",
254 "size" : "1gb"
255 }
256 ]
257}