blob: bfdea6dce799de544949589da1b33daebc570f35 [file] [log] [blame]
Filip Pytlounac2be792016-01-08 12:09:49 +01001{
2 "variables": {
3 "user": "root",
4 "password": "ho5uo7Uome5d",
5 "do_api_token": "{{ env `DO_API_TOKEN` }}",
6 "distro": "debian-8-x64",
7 "disk_size": "8000"
8 },
9
10 "provisioners": [
11 {
12 "type": "shell",
Filip Pytloune7dce992016-01-08 12:52:57 +010013 "execute_command": "sh '{{.Path}}'",
Filip Pytlounac2be792016-01-08 12:09:49 +010014 "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 Pytlounac2be792016-01-08 12:09:49 +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 Pytlounac2be792016-01-08 12:09:49 +010079 "except": [ "digitalocean", "docker" ]
80 },
81 {
82 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +020083 "repository": "tcpcloud/debian",
Filip Pytlounac2be792016-01-08 12:09:49 +010084 "tag": "8",
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 Pytlounac2be792016-01-08 12:09:49 +010090 "only": ["docker"]
91 }
92 ],
93 "builders": [
94 {
95 "type": "virtualbox-iso",
96 "boot_command": [
97 "<esc><wait>",
98 "install<wait>",
99 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
100 " debian-installer=en_US<wait>",
101 " auto<wait>",
102 " locale=en_US<wait>",
103 " console-setup/ask_detect=false<wait>",
104 " console-setup/layoutcode=us<wait>",
105 " console-setup/modelcode=pc105<wait>",
106 " debconf/frontend=noninteractive<wait>",
107 " fb=false<wait>",
108 " initrd=/install/initrd.gz<wait>",
109 " kbd-chooser/method=us<wait>",
110 " keyboard-configuration/xkb-keymap=us <wait>",
111 " passwd/root-password={{user `password`}} ",
112 " passwd/root-password-again={{user `password`}} ",
113 " netcfg/get_hostname=debian-8<wait>",
114 " netcfg/get_domain=cloudlab.cz<wait>",
115 " noapic<wait>",
116 "<enter><wait>"
117 ],
118 "boot_wait": "5s",
119 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100120 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}",
Filip Pytlounac2be792016-01-08 12:09:49 +0100121 "guest_os_type": "Debian_64",
122 "http_directory": "http",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100123 "iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
Filip Pytlounac2be792016-01-08 12:09:49 +0100124 "iso_checksum_type": "md5",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100125 "iso_url": "http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso",
Filip Pytlounac2be792016-01-08 12:09:49 +0100126 "ssh_username": "{{user `user`}}",
127 "ssh_password": "{{user `password`}}",
128 "ssh_port": 22,
129 "ssh_wait_timeout": "10000s",
Filip Pytloune7dce992016-01-08 12:52:57 +0100130 "shutdown_command": "shutdown -P now",
Filip Pytlounac2be792016-01-08 12:09:49 +0100131 "headless": true,
132 "vboxmanage": [
133 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
134 [ "modifyvm", "{{.Name}}", "--cpus", "2" ],
135 [ "modifyvm", "{{.Name}}", "--vrde", "on" ],
136 [ "modifyvm", "{{.Name}}", "--vrdeport", "5000-5050" ],
137 [ "modifyvm", "{{.Name}}", "--vrdeaddress", "127.0.0.1" ]
138 ]
139 },
140 {
141 "type": "vmware-iso",
142 "boot_command": [
143 "<esc><wait>",
144 "install<wait>",
145 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
146 " debian-installer=en_US<wait>",
147 " auto<wait>",
148 " locale=en_US<wait>",
149 " console-setup/ask_detect=false<wait>",
150 " console-setup/layoutcode=us<wait>",
151 " console-setup/modelcode=pc105<wait>",
152 " debconf/frontend=noninteractive<wait>",
153 " fb=false<wait>",
154 " initrd=/install/initrd.gz<wait>",
155 " kbd-chooser/method=us<wait>",
156 " keyboard-configuration/xkb-keymap=us <wait>",
157 " passwd/root-password={{user `password`}} ",
158 " passwd/root-password-again={{user `password`}} ",
159 " netcfg/get_hostname=debian-8<wait>",
160 " netcfg/get_domain=cloudlab.cz<wait>",
161 " noapic<wait>",
162 "<enter><wait>"
163 ],
164 "boot_wait": "5s",
165 "disk_size": "{{ user `disk_size`}}",
166 "disk_type_id": 4,
167 "vmdk_name": "{{ user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100168 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}",
Filip Pytlounac2be792016-01-08 12:09:49 +0100169 "guest_os_type": "linux",
170 "http_directory": "http",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100171 "iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
Filip Pytlounac2be792016-01-08 12:09:49 +0100172 "iso_checksum_type": "md5",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100173 "iso_url": "http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso",
Filip Pytlounac2be792016-01-08 12:09:49 +0100174 "ssh_username": "{{user `user`}}",
175 "ssh_password": "{{user `password`}}",
176 "ssh_port": 22,
177 "ssh_wait_timeout": "10000s",
Filip Pytloune7dce992016-01-08 12:52:57 +0100178 "shutdown_command": "shutdown -P now",
Filip Pytlounac2be792016-01-08 12:09:49 +0100179 "vmx_data": {
180 "memsize": "1024",
181 "numvcpus": "1",
182 "cpuid.coresPerSocket": "1"
183 }
184 },
185 {
186 "type": "qemu",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100187 "qemuargs": [
188 [ "-m", "1024M" ]
189 ],
Filip Pytloun451bc982017-03-13 16:21:24 +0100190 "vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
191 "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}",
Filip Pytlounac2be792016-01-08 12:09:49 +0100192 "format": "qcow2",
193 "accelerator": "kvm",
194 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100195 "iso_url": "http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso",
Filip Pytlounac2be792016-01-08 12:09:49 +0100196 "iso_checksum_type": "md5",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100197 "iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
Filip Pytlounac2be792016-01-08 12:09:49 +0100198 "http_directory": "http",
199 "headless": true,
200 "ssh_username": "{{user `user`}}",
201 "ssh_password": "{{user `password`}}",
Filip Pytloune7dce992016-01-08 12:52:57 +0100202 "shutdown_command": "shutdown -P now",
Filip Pytlounac2be792016-01-08 12:09:49 +0100203 "boot_wait": "2s",
204 "ssh_wait_timeout": "10000s",
205 "boot_command": [
206 "<esc><wait>",
207 "install<wait>",
208 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
209 " debian-installer=en_US<wait>",
210 " auto<wait>",
211 " locale=en_US<wait>",
212 " console-setup/ask_detect=false<wait>",
213 " console-setup/layoutcode=us<wait>",
214 " console-setup/modelcode=pc105<wait>",
215 " debconf/frontend=noninteractive<wait>",
216 " fb=false<wait>",
217 " initrd=/install/initrd.gz<wait>",
218 " kbd-chooser/method=us<wait>",
219 " keyboard-configuration/xkb-keymap=us <wait>",
220 " passwd/root-password={{user `password`}} ",
221 " passwd/root-password-again={{user `password`}} ",
222 " netcfg/get_hostname=debian-8<wait>",
223 " netcfg/get_domain=cloudlab.cz<wait>",
224 " noapic<wait>",
225 "<enter><wait>"
226 ]
227 },
228 {
229 "type": "docker",
230 "image": "debian:8",
231 "commit": true
232 },
233 {
234 "type": "digitalocean",
235 "api_token": "{{user `do_api_token`}}",
236 "image": "{{user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100237 "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
Filip Pytlounac2be792016-01-08 12:09:49 +0100238 "region" : "ams2",
239 "size" : "1gb"
240 }
241 ]
242}