blob: dfeb46e152a1a3e84d0a146190d5751960f8a627 [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",
Jakub Josef6bcf3862017-05-03 16:16:39 +020018 "scripts/salt.sh",
19 "scripts/network.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010020 "scripts/vagrant.sh",
21 "scripts/virtualbox.sh",
22 "scripts/security.sh",
23 "scripts/cleanup.sh",
24 "scripts/zerodisk.sh"
25 ]
26 },
27 "vmware-iso": {
28 "scripts": [
29 "scripts/base.sh",
30 "scripts/salt.sh",
31 "scripts/vmware.sh",
32 "scripts/security.sh",
33 "scripts/cleanup.sh",
34 "scripts/zerodisk.sh"
35 ]
36 },
37 "qemu": {
38 "scripts": [
39 "scripts/base.sh",
Jakub Josef6bcf3862017-05-03 16:16:39 +020040 "scripts/salt.sh",
41 "scripts/network.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010042 "scripts/security.sh",
43 "scripts/cleanup.sh",
44 "scripts/zerodisk.sh"
45 ]
46 },
47 "docker": {
48 "scripts": [
49 "scripts/docker.sh",
50 "scripts/base.sh",
Jakub Josef6bcf3862017-05-03 16:16:39 +020051 "scripts/salt.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010052 "scripts/cleanup.sh"
53 ]
54 },
55 "digitalocean": {
56 "scripts": [
57 "scripts/base.sh",
58 "scripts/salt.sh",
59 "scripts/security.sh",
60 "scripts/cleanup.sh"
61 ]
62 }
63 }
64 },
65 {
66 "type": "file",
67 "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
68 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
69 },
70 {
71 "type": "file",
72 "source": "configs/cloud/cloud.cfg",
73 "destination": "/etc/cloud/cloud.cfg"
74 }
75 ],
76 "post-processors": [
77 {
78 "type": "vagrant",
79 "keep_input_artifact": true,
Filip Pytloun451bc982017-03-13 16:21:24 +010080 "output": "images/{{ user `distro` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010081 "except": [ "digitalocean", "docker" ]
82 },
83 {
84 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +020085 "repository": "tcpcloud/ubuntu",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010086 "tag": "16.04",
87 "only": ["docker"]
88 },
89 {
90 "type": "docker-save",
Filip Pytloun451bc982017-03-13 16:21:24 +010091 "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601021504\" }}.tar",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010092 "only": ["docker"]
93 }
94 ],
95 "builders": [
96 {
97 "type": "virtualbox-iso",
98 "boot_command": [
99 "<esc><wait>",
100 "<esc><wait>",
101 "<enter><wait>",
102 "/install/vmlinuz<wait>",
103 " auto<wait>",
104 " console-setup/ask_detect=false<wait>",
105 " console-setup/layoutcode=us<wait>",
106 " console-setup/modelcode=pc105<wait>",
107 " debconf/frontend=noninteractive<wait>",
108 " debian-installer=en_US<wait>",
109 " fb=false<wait>",
110 " initrd=/install/initrd.gz<wait>",
111 " kbd-chooser/method=us<wait>",
112 " keyboard-configuration/layout=USA<wait>",
113 " keyboard-configuration/variant=USA<wait>",
114 " passwd/root-password={{user `password`}} ",
115 " passwd/root-password-again={{user `password`}} ",
116 " locale=en_US<wait>",
117 " netcfg/get_hostname=ubuntu-1604<wait>",
118 " netcfg/get_domain=cloudlab.cz<wait>",
119 " noapic<wait>",
120 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
121 " -- <wait>",
122 "<enter><wait>"
123 ],
124 "boot_wait": "5s",
125 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100126 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100127 "guest_os_type": "Ubuntu_64",
128 "http_directory": "http",
Jakub Josefa59d0fb2017-09-04 13:26:15 +0200129 "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100130 "iso_checksum_type": "md5",
Jakub Josefa59d0fb2017-09-04 13:26:15 +0200131 "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100132 "ssh_username": "{{user `user`}}",
133 "ssh_password": "{{user `password`}}",
134 "ssh_port": 22,
135 "ssh_wait_timeout": "10000s",
136 "shutdown_command": "shutdown -P now",
137 "headless": true,
138 "vboxmanage": [
139 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
140 [ "modifyvm", "{{.Name}}", "--cpus", "2" ],
141 [ "modifyvm", "{{.Name}}", "--vrde", "on" ],
142 [ "modifyvm", "{{.Name}}", "--vrdeport", "5000-5050" ],
143 [ "modifyvm", "{{.Name}}", "--vrdeaddress", "127.0.0.1" ]
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>",
164 " passwd/root-password={{user `password`}} ",
165 " passwd/root-password-again={{user `password`}} ",
166 " locale=en_US<wait>",
167 " netcfg/get_hostname=ubuntu-1604<wait>",
168 " netcfg/get_domain=changeme<wait>",
169 " noapic<wait>",
170 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
171 " -- <wait>",
172 "<enter><wait>"
173 ],
174 "boot_wait": "5s",
175 "disk_size": "{{ user `disk_size`}}",
176 "disk_type_id": 4,
177 "vmdk_name": "{{ user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100178 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100179 "guest_os_type": "linux",
180 "http_directory": "http",
Jakub Josefd65a5fb2017-09-04 16:03:17 +0200181 "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100182 "iso_checksum_type": "md5",
Jakub Josefd65a5fb2017-09-04 16:03:17 +0200183 "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100184 "ssh_username": "{{user `user`}}",
185 "ssh_password": "{{user `password`}}",
186 "ssh_port": 22,
187 "ssh_wait_timeout": "10000s",
188 "shutdown_command": "shutdown -P now",
189 "vmx_data": {
190 "memsize": "1024",
191 "numvcpus": "1",
192 "cpuid.coresPerSocket": "1"
193 }
194 },
195 {
196 "type": "qemu",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100197 "qemuargs": [
198 [ "-m", "1024M" ]
199 ],
Filip Pytloun451bc982017-03-13 16:21:24 +0100200 "vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
201 "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100202 "format": "qcow2",
203 "accelerator": "kvm",
204 "disk_size": "{{ user `disk_size`}}",
Jakub Josefd65a5fb2017-09-04 16:03:17 +0200205 "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100206 "iso_checksum_type": "md5",
Jakub Josefd65a5fb2017-09-04 16:03:17 +0200207 "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100208 "http_directory": "http",
209 "headless": true,
210 "ssh_username": "{{user `user`}}",
211 "ssh_password": "{{user `password`}}",
212 "shutdown_command": "shutdown -P now",
213 "boot_wait": "2s",
214 "ssh_wait_timeout": "10000s",
215 "boot_command": [
216 "<enter><wait>",
217 "<f6><esc>",
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><bs><bs><bs><bs><bs><bs><bs>",
225 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
226 "<bs><bs><bs>",
227 "/install/vmlinuz<wait>",
228 " auto<wait>",
229 " console-setup/ask_detect=false<wait>",
230 " console-setup/layoutcode=us<wait>",
231 " console-setup/modelcode=pc105<wait>",
232 " debconf/frontend=noninteractive<wait>",
233 " debian-installer=en_US<wait>",
234 " fb=false<wait>",
235 " initrd=/install/initrd.gz<wait>",
236 " kbd-chooser/method=us<wait>",
237 " keyboard-configuration/layout=USA<wait>",
238 " keyboard-configuration/variant=USA<wait>",
239 " passwd/root-password={{user `password`}} ",
240 " passwd/root-password-again={{user `password`}} ",
241 " locale=en_US<wait>",
242 " netcfg/get_hostname=ubuntu-1604<wait>",
243 " netcfg/get_domain=changeme<wait>",
244 " noapic<wait>",
245 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
246 " -- <wait>",
247 "<enter><wait>"
248 ]
249 },
250 {
251 "type": "docker",
252 "image": "ubuntu:16.04",
253 "commit": true
254 },
255 {
256 "type": "digitalocean",
257 "api_token": "{{user `do_api_token`}}",
258 "image": "{{user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100259 "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100260 "region" : "ams2",
261 "size" : "1gb"
262 }
263 ]
264}