blob: 13d878cbabc3e008df48a916d0e2fae4e9956e3f [file] [log] [blame]
jan kaufmana519d7b2015-03-04 00:51:47 +01001{
azvyagintsevd8f85232017-10-02 15:30:28 +03002 "variables": {
3 "user": "root",
4 "password": "ho5uo7Uome5d",
5 "do_api_token": "{{ env `DO_API_TOKEN` }}",
6 "distro": "ubuntu-14-04-x64",
7 "disk_size": "8000"
8 },
jan kaufmana519d7b2015-03-04 00:51:47 +01009 "provisioners": [
10 {
11 "type": "shell",
Filip Pytloune7dce992016-01-08 12:52:57 +010012 "execute_command": "sh '{{.Path}}'",
jan kaufmana519d7b2015-03-04 00:51:47 +010013 "override": {
14 "virtualbox-iso": {
15 "scripts": [
16 "scripts/base.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030017 "scripts/salt.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010018 "scripts/vagrant.sh",
19 "scripts/virtualbox.sh",
Filip Pytloun896f37b2015-06-25 18:35:42 +020020 "scripts/security.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010021 "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",
Filip Pytloun896f37b2015-06-25 18:35:42 +020030 "scripts/security.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010031 "scripts/cleanup.sh",
32 "scripts/zerodisk.sh"
33 ]
34 },
azvyagintsevd8f85232017-10-02 15:30:28 +030035 "qemu": {
jan kaufmana519d7b2015-03-04 00:51:47 +010036 "scripts": [
37 "scripts/base.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030038 "scripts/salt.sh",
Filip Pytloun896f37b2015-06-25 18:35:42 +020039 "scripts/security.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010040 "scripts/cleanup.sh",
41 "scripts/zerodisk.sh"
42 ]
azvyagintsevd8f85232017-10-02 15:30:28 +030043 },
44 "docker": {
Filip Pytloun7b48fd22015-06-30 23:34:01 +020045 "scripts": [
46 "scripts/docker.sh",
47 "scripts/base.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030048 "scripts/salt.sh",
Filip Pytloun7b48fd22015-06-30 23:34:01 +020049 "scripts/cleanup.sh"
50 ]
azvyagintsevd8f85232017-10-02 15:30:28 +030051 },
52 "digitalocean": {
53 "scripts": [
54 "scripts/base.sh",
55 "scripts/salt.sh",
Filip Pytloun896f37b2015-06-25 18:35:42 +020056 "scripts/security.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030057 "scripts/cleanup.sh"
58 ]
59 }
jan kaufmana519d7b2015-03-04 00:51:47 +010060 }
jan kaufman0fcf1a72015-05-06 10:16:12 +020061 },
62 {
63 "type": "file",
64 "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
65 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
Filip Pytloun60411d12015-06-25 21:14:41 +020066 },
67 {
68 "type": "file",
69 "source": "configs/cloud/cloud.cfg",
70 "destination": "/etc/cloud/cloud.cfg"
jan kaufmana519d7b2015-03-04 00:51:47 +010071 }
72 ],
73 "post-processors": [
74 {
75 "type": "vagrant",
76 "keep_input_artifact": true,
Filip Pytloun451bc982017-03-13 16:21:24 +010077 "output": "images/{{ user `distro` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
azvyagintsevd8f85232017-10-02 15:30:28 +030078 "except": [
79 "digitalocean",
80 "docker"
81 ]
Filip Pytloun7b48fd22015-06-30 23:34:01 +020082 },
83 {
Filip Pytloun6e4c3b72015-07-23 09:20:13 +020084 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +020085 "repository": "tcpcloud/ubuntu",
Filip Pytloun6e4c3b72015-07-23 09:20:13 +020086 "tag": "14.04",
azvyagintsevd8f85232017-10-02 15:30:28 +030087 "only": [
88 "docker"
89 ]
Filip Pytloun6e4c3b72015-07-23 09:20:13 +020090 },
91 {
Filip Pytloun62c8f832015-07-22 17:40:00 +020092 "type": "docker-save",
Filip Pytloun451bc982017-03-13 16:21:24 +010093 "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601021504\" }}.tar",
azvyagintsevd8f85232017-10-02 15:30:28 +030094 "only": [
95 "docker"
96 ]
jan kaufmana519d7b2015-03-04 00:51:47 +010097 }
98 ],
99 "builders": [
100 {
101 "type": "virtualbox-iso",
102 "boot_command": [
103 "<esc><wait>",
104 "<esc><wait>",
105 "<enter><wait>",
106 "/install/vmlinuz<wait>",
107 " auto<wait>",
108 " console-setup/ask_detect=false<wait>",
109 " console-setup/layoutcode=us<wait>",
110 " console-setup/modelcode=pc105<wait>",
111 " debconf/frontend=noninteractive<wait>",
112 " debian-installer=en_US<wait>",
113 " fb=false<wait>",
114 " initrd=/install/initrd.gz<wait>",
115 " kbd-chooser/method=us<wait>",
116 " keyboard-configuration/layout=USA<wait>",
117 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun896f37b2015-06-25 18:35:42 +0200118 " passwd/root-password={{user `password`}} ",
119 " passwd/root-password-again={{user `password`}} ",
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>",
Filip Pytloun5bfc1df2015-07-13 14:36:46 +0200124 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.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`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100130 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100131 "guest_os_type": "Ubuntu_64",
132 "http_directory": "http",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100133 "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f",
jan kaufmana519d7b2015-03-04 00:51:47 +0100134 "iso_checksum_type": "md5",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100135 "iso_url": "http://releases.ubuntu.mirror.dkm.cz/releases/14.04/ubuntu-14.04.5-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",
Filip Pytloune7dce992016-01-08 12:52:57 +0100140 "shutdown_command": "shutdown -P now",
Filip Pytloun019c5d42015-07-22 18:59:15 +0200141 "headless": true,
jan kaufmana519d7b2015-03-04 00:51:47 +0100142 "vboxmanage": [
azvyagintsevd8f85232017-10-02 15:30:28 +0300143 [
144 "modifyvm",
145 "{{.Name}}",
146 "--memory",
147 "1024"
148 ],
149 [
150 "modifyvm",
151 "{{.Name}}",
152 "--cpus",
153 "2"
154 ],
155 [
156 "modifyvm",
157 "{{.Name}}",
158 "--vrde",
159 "on"
160 ],
161 [
162 "modifyvm",
163 "{{.Name}}",
164 "--vrdeport",
165 "5000-5050"
166 ],
167 [
168 "modifyvm",
169 "{{.Name}}",
170 "--vrdeaddress",
171 "127.0.0.1"
172 ]
jan kaufmana519d7b2015-03-04 00:51:47 +0100173 ]
174 },
175 {
176 "type": "vmware-iso",
177 "boot_command": [
178 "<esc><wait>",
179 "<esc><wait>",
180 "<enter><wait>",
181 "/install/vmlinuz<wait>",
182 " auto<wait>",
183 " console-setup/ask_detect=false<wait>",
184 " console-setup/layoutcode=us<wait>",
185 " console-setup/modelcode=pc105<wait>",
186 " debconf/frontend=noninteractive<wait>",
187 " debian-installer=en_US<wait>",
188 " fb=false<wait>",
189 " initrd=/install/initrd.gz<wait>",
190 " kbd-chooser/method=us<wait>",
191 " keyboard-configuration/layout=USA<wait>",
192 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun896f37b2015-06-25 18:35:42 +0200193 " passwd/root-password={{user `password`}} ",
194 " passwd/root-password-again={{user `password`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100195 " locale=en_US<wait>",
196 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100197 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100198 " noapic<wait>",
Filip Pytloun5bfc1df2015-07-13 14:36:46 +0200199 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100200 " -- <wait>",
201 "<enter><wait>"
202 ],
203 "boot_wait": "5s",
204 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200205 "disk_type_id": 4,
206 "vmdk_name": "{{ user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100207 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100208 "guest_os_type": "linux",
209 "http_directory": "http",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100210 "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f",
jan kaufmana519d7b2015-03-04 00:51:47 +0100211 "iso_checksum_type": "md5",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100212 "iso_url": "http://releases.ubuntu.mirror.dkm.cz/releases/14.04/ubuntu-14.04.5-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100213 "ssh_username": "{{user `user`}}",
214 "ssh_password": "{{user `password`}}",
215 "ssh_port": 22,
216 "ssh_wait_timeout": "10000s",
Filip Pytloune7dce992016-01-08 12:52:57 +0100217 "shutdown_command": "shutdown -P now",
jan kaufmana519d7b2015-03-04 00:51:47 +0100218 "vmx_data": {
jan kaufmandfc08f02015-04-29 20:17:55 +0200219 "memsize": "1024",
jan kaufmana519d7b2015-03-04 00:51:47 +0100220 "numvcpus": "1",
221 "cpuid.coresPerSocket": "1"
222 }
223 },
224 {
225 "type": "qemu",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100226 "qemuargs": [
azvyagintsevd8f85232017-10-02 15:30:28 +0300227 [
228 "-m",
229 "1024M"
230 ]
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100231 ],
Filip Pytloun451bc982017-03-13 16:21:24 +0100232 "vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
233 "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100234 "format": "qcow2",
235 "accelerator": "kvm",
236 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100237 "iso_url": "http://releases.ubuntu.mirror.dkm.cz/releases/14.04/ubuntu-14.04.5-server-amd64.iso",
jan kaufmana519d7b2015-03-04 00:51:47 +0100238 "iso_checksum_type": "md5",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100239 "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f",
jan kaufmana519d7b2015-03-04 00:51:47 +0100240 "http_directory": "http",
jan kaufman64b9f972015-03-11 11:31:28 +0100241 "headless": true,
jan kaufmana519d7b2015-03-04 00:51:47 +0100242 "ssh_username": "{{user `user`}}",
243 "ssh_password": "{{user `password`}}",
Filip Pytloune7dce992016-01-08 12:52:57 +0100244 "shutdown_command": "shutdown -P now",
jan kaufmana519d7b2015-03-04 00:51:47 +0100245 "boot_wait": "2s",
Filip Pytloun39832362015-06-25 18:05:47 +0200246 "ssh_wait_timeout": "10000s",
jan kaufmana519d7b2015-03-04 00:51:47 +0100247 "boot_command": [
248 "<esc><wait>",
249 "<esc><wait>",
250 "<enter><wait>",
251 "/install/vmlinuz<wait>",
252 " auto<wait>",
253 " console-setup/ask_detect=false<wait>",
254 " console-setup/layoutcode=us<wait>",
255 " console-setup/modelcode=pc105<wait>",
256 " debconf/frontend=noninteractive<wait>",
257 " debian-installer=en_US<wait>",
258 " fb=false<wait>",
259 " initrd=/install/initrd.gz<wait>",
260 " kbd-chooser/method=us<wait>",
261 " keyboard-configuration/layout=USA<wait>",
262 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun896f37b2015-06-25 18:35:42 +0200263 " passwd/root-password={{user `password`}} ",
264 " passwd/root-password-again={{user `password`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100265 " locale=en_US<wait>",
266 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100267 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100268 " noapic<wait>",
Filip Pytloun5bfc1df2015-07-13 14:36:46 +0200269 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100270 " -- <wait>",
271 "<enter><wait>"
azvyagintsevd8f85232017-10-02 15:30:28 +0300272 ]
273 },
Filip Pytloun7b48fd22015-06-30 23:34:01 +0200274 {
275 "type": "docker",
276 "image": "ubuntu:14.04",
277 "commit": true
Filip Pytloun896f37b2015-06-25 18:35:42 +0200278 },
Filip Pytloun7b48fd22015-06-30 23:34:01 +0200279 {
jan kaufmana519d7b2015-03-04 00:51:47 +0100280 "type": "digitalocean",
281 "api_token": "{{user `do_api_token`}}",
282 "image": "{{user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100283 "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
azvyagintsevd8f85232017-10-02 15:30:28 +0300284 "region": "ams2",
285 "size": "1gb"
jan kaufmana519d7b2015-03-04 00:51:47 +0100286 }
287 ]
azvyagintsevd8f85232017-10-02 15:30:28 +0300288}