blob: f8b07b2efdfd2917cb61f7ab0b02b3e14251b4e4 [file] [log] [blame]
Filip Pytlounac2be792016-01-08 12:09:49 +01001{
2 "variables": {
3 "user": "root",
4 "password": "ho5uo7Uome5d",
Jiri Broulik0b211672018-04-11 09:35:47 +02005 "do_api_token": "{{ env `DO_API_TOKEN` }}",
6 "distro": "debian-8-x64",
7 "image_name": "{{ env `IMAGE_NAME` }}",
Filip Pytlounac2be792016-01-08 12:09:49 +01008 "disk_size": "8000"
9 },
10
11 "provisioners": [
12 {
13 "type": "shell",
Filip Pytloune7dce992016-01-08 12:52:57 +010014 "execute_command": "sh '{{.Path}}'",
Filip Pytlounac2be792016-01-08 12:09:49 +010015 "override": {
16 "virtualbox-iso": {
17 "scripts": [
18 "scripts/base.sh",
19 "scripts/salt.sh",
20 "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",
40 "scripts/salt.sh",
Filip Pytlounac2be792016-01-08 12:09:49 +010041 "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,
Jiri Broulik0b211672018-04-11 09:35:47 +020079 "output": "images/{{ user `image_name` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
Filip Pytlounac2be792016-01-08 12:09:49 +010080 "except": [ "digitalocean", "docker" ]
81 },
82 {
83 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +020084 "repository": "tcpcloud/debian",
Filip Pytlounac2be792016-01-08 12:09:49 +010085 "tag": "8",
86 "only": ["docker"]
87 },
88 {
89 "type": "docker-save",
Jiri Broulik0b211672018-04-11 09:35:47 +020090 "path": "images/{{ user `image_name` }}-docker-{{ isotime \"200601021504\" }}.tar",
Filip Pytlounac2be792016-01-08 12:09:49 +010091 "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`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100121 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}",
Filip Pytlounac2be792016-01-08 12:09:49 +0100122 "guest_os_type": "Debian_64",
123 "http_directory": "http",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100124 "iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
Filip Pytlounac2be792016-01-08 12:09:49 +0100125 "iso_checksum_type": "md5",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100126 "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 +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,
Jiri Broulik0b211672018-04-11 09:35:47 +0200168 "vmdk_name": "{{ user `image_name`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100169 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}",
Filip Pytlounac2be792016-01-08 12:09:49 +0100170 "guest_os_type": "linux",
171 "http_directory": "http",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100172 "iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
Filip Pytlounac2be792016-01-08 12:09:49 +0100173 "iso_checksum_type": "md5",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100174 "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 +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",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100188 "qemuargs": [
189 [ "-m", "1024M" ]
190 ],
Jiri Broulik0b211672018-04-11 09:35:47 +0200191 "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100192 "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}",
Filip Pytlounac2be792016-01-08 12:09:49 +0100193 "format": "qcow2",
194 "accelerator": "kvm",
195 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100196 "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 +0100197 "iso_checksum_type": "md5",
Filip Pytloun8549f1f2017-03-08 15:16:55 +0100198 "iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
Filip Pytlounac2be792016-01-08 12:09:49 +0100199 "http_directory": "http",
200 "headless": true,
201 "ssh_username": "{{user `user`}}",
202 "ssh_password": "{{user `password`}}",
Filip Pytloune7dce992016-01-08 12:52:57 +0100203 "shutdown_command": "shutdown -P now",
Filip Pytlounac2be792016-01-08 12:09:49 +0100204 "boot_wait": "2s",
205 "ssh_wait_timeout": "10000s",
206 "boot_command": [
207 "<esc><wait>",
208 "install<wait>",
209 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
210 " debian-installer=en_US<wait>",
211 " auto<wait>",
212 " locale=en_US<wait>",
213 " console-setup/ask_detect=false<wait>",
214 " console-setup/layoutcode=us<wait>",
215 " console-setup/modelcode=pc105<wait>",
216 " debconf/frontend=noninteractive<wait>",
217 " fb=false<wait>",
218 " initrd=/install/initrd.gz<wait>",
219 " kbd-chooser/method=us<wait>",
220 " keyboard-configuration/xkb-keymap=us <wait>",
221 " passwd/root-password={{user `password`}} ",
222 " passwd/root-password-again={{user `password`}} ",
223 " netcfg/get_hostname=debian-8<wait>",
224 " netcfg/get_domain=cloudlab.cz<wait>",
225 " noapic<wait>",
226 "<enter><wait>"
227 ]
228 },
229 {
230 "type": "docker",
231 "image": "debian:8",
232 "commit": true
233 },
234 {
235 "type": "digitalocean",
236 "api_token": "{{user `do_api_token`}}",
Jiri Broulik0b211672018-04-11 09:35:47 +0200237 "image": "{{user `image_name`}}",
238 "snapshot_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
Filip Pytlounac2be792016-01-08 12:09:49 +0100239 "region" : "ams2",
240 "size" : "1gb"
241 }
242 ]
243}