blob: 62ff82e9c723e80001f4ebf07661c0eb01cb6b10 [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",
40 "scripts/foreman.sh",
41 "scripts/security.sh",
42 "scripts/cleanup.sh",
43 "scripts/zerodisk.sh"
44 ]
45 },
46 "docker": {
47 "scripts": [
48 "scripts/docker.sh",
49 "scripts/base.sh",
50 "scripts/salt.sh",
51 "scripts/cleanup.sh"
52 ]
53 },
54 "digitalocean": {
55 "scripts": [
56 "scripts/base.sh",
57 "scripts/salt.sh",
58 "scripts/security.sh",
59 "scripts/cleanup.sh"
60 ]
61 }
62 }
63 },
64 {
65 "type": "file",
66 "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
67 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
68 },
69 {
70 "type": "file",
71 "source": "configs/cloud/cloud.cfg",
72 "destination": "/etc/cloud/cloud.cfg"
73 }
74 ],
75 "post-processors": [
76 {
77 "type": "vagrant",
78 "keep_input_artifact": true,
79 "output": "images/{{ user `distro` }}-{{.Provider}}-{{ timestamp }}.box",
80 "except": [ "digitalocean", "docker" ]
81 },
82 {
83 "type": "docker-tag",
84 "repository": "cloudlab/debian",
85 "tag": "8",
86 "only": ["docker"]
87 },
88 {
89 "type": "docker-save",
90 "path": "images/{{ user `distro` }}-docker-{{ timestamp }}.tar",
91 "only": ["docker"]
92 }
93 ],
94 "builders": [
95 {
96 "type": "virtualbox-iso",
97 "boot_command": [
98 "<esc><wait>",
99 "install<wait>",
100 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
101 " debian-installer=en_US<wait>",
102 " auto<wait>",
103 " locale=en_US<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 " fb=false<wait>",
109 " initrd=/install/initrd.gz<wait>",
110 " kbd-chooser/method=us<wait>",
111 " keyboard-configuration/xkb-keymap=us <wait>",
112 " passwd/root-password={{user `password`}} ",
113 " passwd/root-password-again={{user `password`}} ",
114 " netcfg/get_hostname=debian-8<wait>",
115 " netcfg/get_domain=cloudlab.cz<wait>",
116 " noapic<wait>",
117 "<enter><wait>"
118 ],
119 "boot_wait": "5s",
120 "disk_size": "{{ user `disk_size`}}",
121 "output_directory": "images/{{ user `distro` }}-vbox-{{ timestamp }}",
122 "guest_os_type": "Debian_64",
123 "http_directory": "http",
Filip Pytloun30ec1852016-02-18 15:22:09 +0100124 "iso_checksum": "a9b490b4215d1e72e876b031dafa7184",
Filip Pytlounac2be792016-01-08 12:09:49 +0100125 "iso_checksum_type": "md5",
Filip Pytloun30ec1852016-02-18 15:22:09 +0100126 "iso_url": "http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-cd/debian-8.3.0-amd64-netinst.iso",
Filip Pytlounac2be792016-01-08 12:09:49 +0100127 "ssh_username": "{{user `user`}}",
128 "ssh_password": "{{user `password`}}",
129 "ssh_port": 22,
130 "ssh_wait_timeout": "10000s",
Filip Pytloune7dce992016-01-08 12:52:57 +0100131 "shutdown_command": "shutdown -P now",
Filip Pytlounac2be792016-01-08 12:09:49 +0100132 "headless": true,
133 "vboxmanage": [
134 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
135 [ "modifyvm", "{{.Name}}", "--cpus", "2" ],
136 [ "modifyvm", "{{.Name}}", "--vrde", "on" ],
137 [ "modifyvm", "{{.Name}}", "--vrdeport", "5000-5050" ],
138 [ "modifyvm", "{{.Name}}", "--vrdeaddress", "127.0.0.1" ]
139 ]
140 },
141 {
142 "type": "vmware-iso",
143 "boot_command": [
144 "<esc><wait>",
145 "install<wait>",
146 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
147 " debian-installer=en_US<wait>",
148 " auto<wait>",
149 " locale=en_US<wait>",
150 " console-setup/ask_detect=false<wait>",
151 " console-setup/layoutcode=us<wait>",
152 " console-setup/modelcode=pc105<wait>",
153 " debconf/frontend=noninteractive<wait>",
154 " fb=false<wait>",
155 " initrd=/install/initrd.gz<wait>",
156 " kbd-chooser/method=us<wait>",
157 " keyboard-configuration/xkb-keymap=us <wait>",
158 " passwd/root-password={{user `password`}} ",
159 " passwd/root-password-again={{user `password`}} ",
160 " netcfg/get_hostname=debian-8<wait>",
161 " netcfg/get_domain=cloudlab.cz<wait>",
162 " noapic<wait>",
163 "<enter><wait>"
164 ],
165 "boot_wait": "5s",
166 "disk_size": "{{ user `disk_size`}}",
167 "disk_type_id": 4,
168 "vmdk_name": "{{ user `distro`}}",
169 "output_directory": "images/{{ user `distro` }}-vmware-{{ timestamp }}",
170 "guest_os_type": "linux",
171 "http_directory": "http",
Filip Pytloun30ec1852016-02-18 15:22:09 +0100172 "iso_checksum": "a9b490b4215d1e72e876b031dafa7184",
Filip Pytlounac2be792016-01-08 12:09:49 +0100173 "iso_checksum_type": "md5",
Filip Pytloun30ec1852016-02-18 15:22:09 +0100174 "iso_url": "http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-cd/debian-8.3.0-amd64-netinst.iso",
Filip Pytlounac2be792016-01-08 12:09:49 +0100175 "ssh_username": "{{user `user`}}",
176 "ssh_password": "{{user `password`}}",
177 "ssh_port": 22,
178 "ssh_wait_timeout": "10000s",
Filip Pytloune7dce992016-01-08 12:52:57 +0100179 "shutdown_command": "shutdown -P now",
Filip Pytlounac2be792016-01-08 12:09:49 +0100180 "vmx_data": {
181 "memsize": "1024",
182 "numvcpus": "1",
183 "cpuid.coresPerSocket": "1"
184 }
185 },
186 {
187 "type": "qemu",
188 "vm_name": "{{ user `distro` }}-{{ timestamp }}",
189 "output_directory": "images/{{ user `distro` }}-qemu-{{ timestamp }}",
190 "format": "qcow2",
191 "accelerator": "kvm",
192 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun30ec1852016-02-18 15:22:09 +0100193 "iso_url": "http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-cd/debian-8.3.0-amd64-netinst.iso",
Filip Pytlounac2be792016-01-08 12:09:49 +0100194 "iso_checksum_type": "md5",
Filip Pytloun30ec1852016-02-18 15:22:09 +0100195 "iso_checksum": "a9b490b4215d1e72e876b031dafa7184",
Filip Pytlounac2be792016-01-08 12:09:49 +0100196 "http_directory": "http",
197 "headless": true,
198 "ssh_username": "{{user `user`}}",
199 "ssh_password": "{{user `password`}}",
Filip Pytloune7dce992016-01-08 12:52:57 +0100200 "shutdown_command": "shutdown -P now",
Filip Pytlounac2be792016-01-08 12:09:49 +0100201 "boot_wait": "2s",
202 "ssh_wait_timeout": "10000s",
203 "boot_command": [
204 "<esc><wait>",
205 "install<wait>",
206 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
207 " debian-installer=en_US<wait>",
208 " auto<wait>",
209 " locale=en_US<wait>",
210 " console-setup/ask_detect=false<wait>",
211 " console-setup/layoutcode=us<wait>",
212 " console-setup/modelcode=pc105<wait>",
213 " debconf/frontend=noninteractive<wait>",
214 " fb=false<wait>",
215 " initrd=/install/initrd.gz<wait>",
216 " kbd-chooser/method=us<wait>",
217 " keyboard-configuration/xkb-keymap=us <wait>",
218 " passwd/root-password={{user `password`}} ",
219 " passwd/root-password-again={{user `password`}} ",
220 " netcfg/get_hostname=debian-8<wait>",
221 " netcfg/get_domain=cloudlab.cz<wait>",
222 " noapic<wait>",
223 "<enter><wait>"
224 ]
225 },
226 {
227 "type": "docker",
228 "image": "debian:8",
229 "commit": true
230 },
231 {
232 "type": "digitalocean",
233 "api_token": "{{user `do_api_token`}}",
234 "image": "{{user `distro`}}",
235 "snapshot_name": "{{ user `distro` }}-{{ timestamp }}",
236 "region" : "ams2",
237 "size" : "1gb"
238 }
239 ]
240}