blob: 96cd1d8a6a5ca79d4a1d1176715826c6b8589a9c [file] [log] [blame]
Filip Pytloun7ae5c752016-01-15 13:48:38 +01001{
2 "variables": {
3 "user": "root",
4 "password": "ho5uo7Uome5d",
5 "do_api_token": "{{ env `DO_API_TOKEN` }}",
6 "distro": "ubuntu-16-04-x64",
7 "disk_size": "8000"
8 },
9
10 "provisioners": [
11 {
12 "type": "shell",
13 "execute_command": "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/security.sh",
22 "scripts/cleanup.sh",
23 "scripts/zerodisk.sh"
24 ]
25 },
26 "vmware-iso": {
27 "scripts": [
28 "scripts/base.sh",
29 "scripts/salt.sh",
30 "scripts/vmware.sh",
31 "scripts/security.sh",
32 "scripts/cleanup.sh",
33 "scripts/zerodisk.sh"
34 ]
35 },
36 "qemu": {
37 "scripts": [
38 "scripts/base.sh",
39 "scripts/salt.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010040 "scripts/security.sh",
41 "scripts/cleanup.sh",
42 "scripts/zerodisk.sh"
43 ]
44 },
45 "docker": {
46 "scripts": [
47 "scripts/docker.sh",
48 "scripts/base.sh",
49 "scripts/salt.sh",
50 "scripts/cleanup.sh"
51 ]
52 },
53 "digitalocean": {
54 "scripts": [
55 "scripts/base.sh",
56 "scripts/salt.sh",
57 "scripts/security.sh",
58 "scripts/cleanup.sh"
59 ]
60 }
61 }
62 },
63 {
64 "type": "file",
65 "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
66 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
67 },
68 {
69 "type": "file",
70 "source": "configs/cloud/cloud.cfg",
71 "destination": "/etc/cloud/cloud.cfg"
72 }
73 ],
74 "post-processors": [
75 {
76 "type": "vagrant",
77 "keep_input_artifact": true,
Filip Pytloun451bc982017-03-13 16:21:24 +010078 "output": "images/{{ user `distro` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010079 "except": [ "digitalocean", "docker" ]
80 },
81 {
82 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +020083 "repository": "tcpcloud/ubuntu",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010084 "tag": "16.04",
85 "only": ["docker"]
86 },
87 {
88 "type": "docker-save",
Filip Pytloun451bc982017-03-13 16:21:24 +010089 "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601021504\" }}.tar",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010090 "only": ["docker"]
91 }
92 ],
93 "builders": [
94 {
95 "type": "virtualbox-iso",
96 "boot_command": [
97 "<esc><wait>",
98 "<esc><wait>",
99 "<enter><wait>",
100 "/install/vmlinuz<wait>",
101 " auto<wait>",
102 " console-setup/ask_detect=false<wait>",
103 " console-setup/layoutcode=us<wait>",
104 " console-setup/modelcode=pc105<wait>",
105 " debconf/frontend=noninteractive<wait>",
106 " debian-installer=en_US<wait>",
107 " fb=false<wait>",
108 " initrd=/install/initrd.gz<wait>",
109 " kbd-chooser/method=us<wait>",
110 " keyboard-configuration/layout=USA<wait>",
111 " keyboard-configuration/variant=USA<wait>",
112 " passwd/root-password={{user `password`}} ",
113 " passwd/root-password-again={{user `password`}} ",
114 " locale=en_US<wait>",
115 " netcfg/get_hostname=ubuntu-1604<wait>",
116 " netcfg/get_domain=cloudlab.cz<wait>",
117 " noapic<wait>",
118 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
119 " -- <wait>",
120 "<enter><wait>"
121 ],
122 "boot_wait": "5s",
123 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100124 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100125 "guest_os_type": "Ubuntu_64",
126 "http_directory": "http",
Jakub Josefb0de4e02017-02-17 14:43:01 +0100127 "iso_checksum": "2bce60d18248df9980612619ff0b34e6",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100128 "iso_checksum_type": "md5",
Jakub Josefb0de4e02017-02-17 14:43:01 +0100129 "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100130 "ssh_username": "{{user `user`}}",
131 "ssh_password": "{{user `password`}}",
132 "ssh_port": 22,
133 "ssh_wait_timeout": "10000s",
134 "shutdown_command": "shutdown -P now",
135 "headless": true,
136 "vboxmanage": [
137 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
138 [ "modifyvm", "{{.Name}}", "--cpus", "2" ],
139 [ "modifyvm", "{{.Name}}", "--vrde", "on" ],
140 [ "modifyvm", "{{.Name}}", "--vrdeport", "5000-5050" ],
141 [ "modifyvm", "{{.Name}}", "--vrdeaddress", "127.0.0.1" ]
142 ]
143 },
144 {
145 "type": "vmware-iso",
146 "boot_command": [
147 "<esc><wait>",
148 "<esc><wait>",
149 "<enter><wait>",
150 "/install/vmlinuz<wait>",
151 " auto<wait>",
152 " console-setup/ask_detect=false<wait>",
153 " console-setup/layoutcode=us<wait>",
154 " console-setup/modelcode=pc105<wait>",
155 " debconf/frontend=noninteractive<wait>",
156 " debian-installer=en_US<wait>",
157 " fb=false<wait>",
158 " initrd=/install/initrd.gz<wait>",
159 " kbd-chooser/method=us<wait>",
160 " keyboard-configuration/layout=USA<wait>",
161 " keyboard-configuration/variant=USA<wait>",
162 " passwd/root-password={{user `password`}} ",
163 " passwd/root-password-again={{user `password`}} ",
164 " locale=en_US<wait>",
165 " netcfg/get_hostname=ubuntu-1604<wait>",
166 " netcfg/get_domain=changeme<wait>",
167 " noapic<wait>",
168 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
169 " -- <wait>",
170 "<enter><wait>"
171 ],
172 "boot_wait": "5s",
173 "disk_size": "{{ user `disk_size`}}",
174 "disk_type_id": 4,
175 "vmdk_name": "{{ user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100176 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100177 "guest_os_type": "linux",
178 "http_directory": "http",
Jakub Josef911d40b2017-02-17 15:29:39 +0100179 "iso_checksum": "2bce60d18248df9980612619ff0b34e6",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100180 "iso_checksum_type": "md5",
Jakub Josef911d40b2017-02-17 15:29:39 +0100181 "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100182 "ssh_username": "{{user `user`}}",
183 "ssh_password": "{{user `password`}}",
184 "ssh_port": 22,
185 "ssh_wait_timeout": "10000s",
186 "shutdown_command": "shutdown -P now",
187 "vmx_data": {
188 "memsize": "1024",
189 "numvcpus": "1",
190 "cpuid.coresPerSocket": "1"
191 }
192 },
193 {
194 "type": "qemu",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100195 "qemuargs": [
196 [ "-m", "1024M" ]
197 ],
Filip Pytloun451bc982017-03-13 16:21:24 +0100198 "vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
199 "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100200 "format": "qcow2",
201 "accelerator": "kvm",
202 "disk_size": "{{ user `disk_size`}}",
Jakub Josef911d40b2017-02-17 15:29:39 +0100203 "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100204 "iso_checksum_type": "md5",
Jakub Josef911d40b2017-02-17 15:29:39 +0100205 "iso_checksum": "2bce60d18248df9980612619ff0b34e6",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100206 "http_directory": "http",
207 "headless": true,
208 "ssh_username": "{{user `user`}}",
209 "ssh_password": "{{user `password`}}",
210 "shutdown_command": "shutdown -P now",
211 "boot_wait": "2s",
212 "ssh_wait_timeout": "10000s",
213 "boot_command": [
214 "<enter><wait>",
215 "<f6><esc>",
216 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
217 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
218 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
219 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
220 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
221 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
222 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
223 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
224 "<bs><bs><bs>",
225 "/install/vmlinuz<wait>",
226 " auto<wait>",
227 " console-setup/ask_detect=false<wait>",
228 " console-setup/layoutcode=us<wait>",
229 " console-setup/modelcode=pc105<wait>",
230 " debconf/frontend=noninteractive<wait>",
231 " debian-installer=en_US<wait>",
232 " fb=false<wait>",
233 " initrd=/install/initrd.gz<wait>",
234 " kbd-chooser/method=us<wait>",
235 " keyboard-configuration/layout=USA<wait>",
236 " keyboard-configuration/variant=USA<wait>",
237 " passwd/root-password={{user `password`}} ",
238 " passwd/root-password-again={{user `password`}} ",
239 " locale=en_US<wait>",
240 " netcfg/get_hostname=ubuntu-1604<wait>",
241 " netcfg/get_domain=changeme<wait>",
242 " noapic<wait>",
243 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
244 " -- <wait>",
245 "<enter><wait>"
246 ]
247 },
248 {
249 "type": "docker",
250 "image": "ubuntu:16.04",
251 "commit": true
252 },
253 {
254 "type": "digitalocean",
255 "api_token": "{{user `do_api_token`}}",
256 "image": "{{user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100257 "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100258 "region" : "ams2",
259 "size" : "1gb"
260 }
261 ]
262}