blob: b91fa95882d65c7d9531349ff03131e42c2efcad [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",
Jiri Broulik0b211672018-04-11 09:35:47 +02007 "image_name": "{{ env `IMAGE_NAME` }}",
azvyagintsevd8f85232017-10-02 15:30:28 +03008 "disk_size": "8000"
9 },
jan kaufmana519d7b2015-03-04 00:51:47 +010010 "provisioners": [
11 {
12 "type": "shell",
Filip Pytloune7dce992016-01-08 12:52:57 +010013 "execute_command": "sh '{{.Path}}'",
jan kaufmana519d7b2015-03-04 00:51:47 +010014 "override": {
15 "virtualbox-iso": {
16 "scripts": [
17 "scripts/base.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030018 "scripts/salt.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010019 "scripts/vagrant.sh",
20 "scripts/virtualbox.sh",
Filip Pytloun896f37b2015-06-25 18:35:42 +020021 "scripts/security.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010022 "scripts/cleanup.sh",
23 "scripts/zerodisk.sh"
24 ]
25 },
26 "vmware-iso": {
27 "scripts": [
28 "scripts/base.sh",
jan kaufmandfc08f02015-04-29 20:17:55 +020029 "scripts/salt.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010030 "scripts/vmware.sh",
Filip Pytloun896f37b2015-06-25 18:35:42 +020031 "scripts/security.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010032 "scripts/cleanup.sh",
33 "scripts/zerodisk.sh"
34 ]
35 },
azvyagintsevd8f85232017-10-02 15:30:28 +030036 "qemu": {
jan kaufmana519d7b2015-03-04 00:51:47 +010037 "scripts": [
38 "scripts/base.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030039 "scripts/salt.sh",
Filip Pytloun896f37b2015-06-25 18:35:42 +020040 "scripts/security.sh",
jan kaufmana519d7b2015-03-04 00:51:47 +010041 "scripts/cleanup.sh",
42 "scripts/zerodisk.sh"
43 ]
azvyagintsevd8f85232017-10-02 15:30:28 +030044 },
45 "docker": {
Filip Pytloun7b48fd22015-06-30 23:34:01 +020046 "scripts": [
47 "scripts/docker.sh",
48 "scripts/base.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030049 "scripts/salt.sh",
Filip Pytloun7b48fd22015-06-30 23:34:01 +020050 "scripts/cleanup.sh"
51 ]
azvyagintsevd8f85232017-10-02 15:30:28 +030052 },
53 "digitalocean": {
54 "scripts": [
55 "scripts/base.sh",
56 "scripts/salt.sh",
Filip Pytloun896f37b2015-06-25 18:35:42 +020057 "scripts/security.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030058 "scripts/cleanup.sh"
59 ]
60 }
jan kaufmana519d7b2015-03-04 00:51:47 +010061 }
jan kaufman0fcf1a72015-05-06 10:16:12 +020062 },
63 {
64 "type": "file",
65 "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
66 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
Filip Pytloun60411d12015-06-25 21:14:41 +020067 },
68 {
69 "type": "file",
70 "source": "configs/cloud/cloud.cfg",
71 "destination": "/etc/cloud/cloud.cfg"
jan kaufmana519d7b2015-03-04 00:51:47 +010072 }
73 ],
74 "post-processors": [
75 {
76 "type": "vagrant",
77 "keep_input_artifact": true,
Jiri Broulik0b211672018-04-11 09:35:47 +020078 "output": "images/{{ user `image_name` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
azvyagintsevd8f85232017-10-02 15:30:28 +030079 "except": [
80 "digitalocean",
81 "docker"
82 ]
Filip Pytloun7b48fd22015-06-30 23:34:01 +020083 },
84 {
Filip Pytloun6e4c3b72015-07-23 09:20:13 +020085 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +020086 "repository": "tcpcloud/ubuntu",
Filip Pytloun6e4c3b72015-07-23 09:20:13 +020087 "tag": "14.04",
azvyagintsevd8f85232017-10-02 15:30:28 +030088 "only": [
89 "docker"
90 ]
Filip Pytloun6e4c3b72015-07-23 09:20:13 +020091 },
92 {
Filip Pytloun62c8f832015-07-22 17:40:00 +020093 "type": "docker-save",
Jiri Broulik0b211672018-04-11 09:35:47 +020094 "path": "images/{{ user `image_name` }}-docker-{{ isotime \"200601021504\" }}.tar",
azvyagintsevd8f85232017-10-02 15:30:28 +030095 "only": [
96 "docker"
97 ]
jan kaufmana519d7b2015-03-04 00:51:47 +010098 }
99 ],
100 "builders": [
101 {
102 "type": "virtualbox-iso",
103 "boot_command": [
104 "<esc><wait>",
105 "<esc><wait>",
106 "<enter><wait>",
107 "/install/vmlinuz<wait>",
108 " auto<wait>",
109 " console-setup/ask_detect=false<wait>",
110 " console-setup/layoutcode=us<wait>",
111 " console-setup/modelcode=pc105<wait>",
112 " debconf/frontend=noninteractive<wait>",
113 " debian-installer=en_US<wait>",
114 " fb=false<wait>",
115 " initrd=/install/initrd.gz<wait>",
116 " kbd-chooser/method=us<wait>",
117 " keyboard-configuration/layout=USA<wait>",
118 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun896f37b2015-06-25 18:35:42 +0200119 " passwd/root-password={{user `password`}} ",
120 " passwd/root-password-again={{user `password`}} ",
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`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100131 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100132 "guest_os_type": "Ubuntu_64",
133 "http_directory": "http",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100134 "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f",
jan kaufmana519d7b2015-03-04 00:51:47 +0100135 "iso_checksum_type": "md5",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100136 "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 +0100137 "ssh_username": "{{user `user`}}",
138 "ssh_password": "{{user `password`}}",
139 "ssh_port": 22,
140 "ssh_wait_timeout": "10000s",
Filip Pytloune7dce992016-01-08 12:52:57 +0100141 "shutdown_command": "shutdown -P now",
Filip Pytloun019c5d42015-07-22 18:59:15 +0200142 "headless": true,
jan kaufmana519d7b2015-03-04 00:51:47 +0100143 "vboxmanage": [
azvyagintsevd8f85232017-10-02 15:30:28 +0300144 [
145 "modifyvm",
146 "{{.Name}}",
147 "--memory",
148 "1024"
149 ],
150 [
151 "modifyvm",
152 "{{.Name}}",
153 "--cpus",
154 "2"
155 ],
156 [
157 "modifyvm",
158 "{{.Name}}",
159 "--vrde",
160 "on"
161 ],
162 [
163 "modifyvm",
164 "{{.Name}}",
165 "--vrdeport",
166 "5000-5050"
167 ],
168 [
169 "modifyvm",
170 "{{.Name}}",
171 "--vrdeaddress",
172 "127.0.0.1"
173 ]
jan kaufmana519d7b2015-03-04 00:51:47 +0100174 ]
175 },
176 {
177 "type": "vmware-iso",
178 "boot_command": [
179 "<esc><wait>",
180 "<esc><wait>",
181 "<enter><wait>",
182 "/install/vmlinuz<wait>",
183 " auto<wait>",
184 " console-setup/ask_detect=false<wait>",
185 " console-setup/layoutcode=us<wait>",
186 " console-setup/modelcode=pc105<wait>",
187 " debconf/frontend=noninteractive<wait>",
188 " debian-installer=en_US<wait>",
189 " fb=false<wait>",
190 " initrd=/install/initrd.gz<wait>",
191 " kbd-chooser/method=us<wait>",
192 " keyboard-configuration/layout=USA<wait>",
193 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun896f37b2015-06-25 18:35:42 +0200194 " passwd/root-password={{user `password`}} ",
195 " passwd/root-password-again={{user `password`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100196 " locale=en_US<wait>",
197 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100198 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100199 " noapic<wait>",
Filip Pytloun5bfc1df2015-07-13 14:36:46 +0200200 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100201 " -- <wait>",
202 "<enter><wait>"
203 ],
204 "boot_wait": "5s",
205 "disk_size": "{{ user `disk_size`}}",
jan kaufmandfc08f02015-04-29 20:17:55 +0200206 "disk_type_id": 4,
Jiri Broulik0b211672018-04-11 09:35:47 +0200207 "vmdk_name": "{{ user `image_name`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100208 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100209 "guest_os_type": "linux",
210 "http_directory": "http",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100211 "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f",
jan kaufmana519d7b2015-03-04 00:51:47 +0100212 "iso_checksum_type": "md5",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100213 "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 +0100214 "ssh_username": "{{user `user`}}",
215 "ssh_password": "{{user `password`}}",
216 "ssh_port": 22,
217 "ssh_wait_timeout": "10000s",
Filip Pytloune7dce992016-01-08 12:52:57 +0100218 "shutdown_command": "shutdown -P now",
jan kaufmana519d7b2015-03-04 00:51:47 +0100219 "vmx_data": {
jan kaufmandfc08f02015-04-29 20:17:55 +0200220 "memsize": "1024",
jan kaufmana519d7b2015-03-04 00:51:47 +0100221 "numvcpus": "1",
222 "cpuid.coresPerSocket": "1"
223 }
224 },
225 {
226 "type": "qemu",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100227 "qemuargs": [
azvyagintsevd8f85232017-10-02 15:30:28 +0300228 [
229 "-m",
230 "1024M"
231 ]
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100232 ],
Jiri Broulik0b211672018-04-11 09:35:47 +0200233 "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100234 "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}",
jan kaufmana519d7b2015-03-04 00:51:47 +0100235 "format": "qcow2",
236 "accelerator": "kvm",
237 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100238 "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 +0100239 "iso_checksum_type": "md5",
Filip Pytloun8cef3dd2016-12-14 10:51:24 +0100240 "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f",
jan kaufmana519d7b2015-03-04 00:51:47 +0100241 "http_directory": "http",
jan kaufman64b9f972015-03-11 11:31:28 +0100242 "headless": true,
jan kaufmana519d7b2015-03-04 00:51:47 +0100243 "ssh_username": "{{user `user`}}",
244 "ssh_password": "{{user `password`}}",
Filip Pytloune7dce992016-01-08 12:52:57 +0100245 "shutdown_command": "shutdown -P now",
jan kaufmana519d7b2015-03-04 00:51:47 +0100246 "boot_wait": "2s",
Filip Pytloun39832362015-06-25 18:05:47 +0200247 "ssh_wait_timeout": "10000s",
jan kaufmana519d7b2015-03-04 00:51:47 +0100248 "boot_command": [
249 "<esc><wait>",
250 "<esc><wait>",
251 "<enter><wait>",
252 "/install/vmlinuz<wait>",
253 " auto<wait>",
254 " console-setup/ask_detect=false<wait>",
255 " console-setup/layoutcode=us<wait>",
256 " console-setup/modelcode=pc105<wait>",
257 " debconf/frontend=noninteractive<wait>",
258 " debian-installer=en_US<wait>",
259 " fb=false<wait>",
260 " initrd=/install/initrd.gz<wait>",
261 " kbd-chooser/method=us<wait>",
262 " keyboard-configuration/layout=USA<wait>",
263 " keyboard-configuration/variant=USA<wait>",
Filip Pytloun896f37b2015-06-25 18:35:42 +0200264 " passwd/root-password={{user `password`}} ",
265 " passwd/root-password-again={{user `password`}} ",
jan kaufmana519d7b2015-03-04 00:51:47 +0100266 " locale=en_US<wait>",
267 " netcfg/get_hostname=ubuntu-1404<wait>",
jan kaufman605c2492015-03-10 15:35:43 +0100268 " netcfg/get_domain=changeme<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100269 " noapic<wait>",
Filip Pytloun5bfc1df2015-07-13 14:36:46 +0200270 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
jan kaufmana519d7b2015-03-04 00:51:47 +0100271 " -- <wait>",
272 "<enter><wait>"
azvyagintsevd8f85232017-10-02 15:30:28 +0300273 ]
274 },
Filip Pytloun7b48fd22015-06-30 23:34:01 +0200275 {
276 "type": "docker",
277 "image": "ubuntu:14.04",
278 "commit": true
Filip Pytloun896f37b2015-06-25 18:35:42 +0200279 },
Filip Pytloun7b48fd22015-06-30 23:34:01 +0200280 {
jan kaufmana519d7b2015-03-04 00:51:47 +0100281 "type": "digitalocean",
282 "api_token": "{{user `do_api_token`}}",
Jiri Broulik0b211672018-04-11 09:35:47 +0200283 "image": "{{user `image_name`}}",
284 "snapshot_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
azvyagintsevd8f85232017-10-02 15:30:28 +0300285 "region": "ams2",
286 "size": "1gb"
jan kaufmana519d7b2015-03-04 00:51:47 +0100287 }
288 ]
azvyagintsevd8f85232017-10-02 15:30:28 +0300289}