blob: b93c6a59bc4cb67bb6f358e4944bb4d5f34021c7 [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",
28 "scripts/vagrant.sh",
29 "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": {
59 "output": "{{ user `distro` }}-vbox-{{ timestamp }}.box"
60 },
61 "vmware": {
62 "output": "{{ user `distro` }}-vmware-{{ timestamp }}.box"
63 },
64 "qemu": {
65 "output": "{{ user `distro` }}-qemu-{{ timestamp }}.box"
66 }
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>",
96 " netcfg/get_domain=vagrantup.com<wait>",
97 " noapic<wait>",
98 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
99 " -- <wait>",
100 "<enter><wait>"
101 ],
102 "boot_wait": "5s",
103 "disk_size": "{{ user `disk_size`}}",
104 "output_directory": "images/{{ user `distro` }}-{{ timestamp }}",
105 "guest_os_type": "Ubuntu_64",
106 "http_directory": "http",
107 "iso_checksum": "01545fa976c8367b4f0d59169ac4866c",
108 "iso_checksum_type": "md5",
109 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso",
110 "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>",
144 " netcfg/get_domain=vagrantup.com<wait>",
145 " noapic<wait>",
146 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
147 " -- <wait>",
148 "<enter><wait>"
149 ],
150 "boot_wait": "5s",
151 "disk_size": "{{ user `disk_size`}}",
152 "guest_os_type": "linux",
153 "http_directory": "http",
154 "iso_checksum": "01545fa976c8367b4f0d59169ac4866c",
155 "iso_checksum_type": "md5",
156 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso",
157 "ssh_username": "{{user `user`}}",
158 "ssh_password": "{{user `password`}}",
159 "ssh_port": 22,
160 "ssh_wait_timeout": "10000s",
161 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
162 "vmx_data": {
163 "memsize": "512",
164 "numvcpus": "1",
165 "cpuid.coresPerSocket": "1"
166 }
167 },
168 {
169 "type": "qemu",
170 "vm_name": "{{ user `distro` }}-{{ timestamp }}",
171 "output_directory": "images/{{ user `distro` }}-{{ timestamp }}",
172 "format": "qcow2",
173 "accelerator": "kvm",
174 "disk_size": "{{ user `disk_size`}}",
175 "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso",
176 "iso_checksum_type": "md5",
177 "iso_checksum": "01545fa976c8367b4f0d59169ac4866c",
178 "http_directory": "http",
179 "ssh_username": "{{user `user`}}",
180 "ssh_password": "{{user `password`}}",
181 "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now",
182 "boot_wait": "2s",
183 "boot_command": [
184 "<esc><wait>",
185 "<esc><wait>",
186 "<enter><wait>",
187 "/install/vmlinuz<wait>",
188 " auto<wait>",
189 " console-setup/ask_detect=false<wait>",
190 " console-setup/layoutcode=us<wait>",
191 " console-setup/modelcode=pc105<wait>",
192 " debconf/frontend=noninteractive<wait>",
193 " debian-installer=en_US<wait>",
194 " fb=false<wait>",
195 " initrd=/install/initrd.gz<wait>",
196 " kbd-chooser/method=us<wait>",
197 " keyboard-configuration/layout=USA<wait>",
198 " keyboard-configuration/variant=USA<wait>",
199 " passwd/user-fullname={{user `user`}} ",
200 " passwd/user-password-again={{user `password`}} ",
201 " passwd/user-password={{user `password`}} ",
202 " passwd/username={{user `user`}} ",
203 " locale=en_US<wait>",
204 " netcfg/get_hostname=ubuntu-1404<wait>",
205 " netcfg/get_domain=vagrantup.com<wait>",
206 " noapic<wait>",
207 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
208 " -- <wait>",
209 "<enter><wait>"
210 ]
211 },
212 {
213 "type": "digitalocean",
214 "api_token": "{{user `do_api_token`}}",
215 "image": "{{user `distro`}}",
216 "snapshot_name": "{{ user `distro` }}-{{ timestamp }}",
217 "region" : "ams2",
218 "size" : "1gb"
219 }
220 ]
221}