jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 1 | { |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 2 | "variables": { |
| 3 | "user": "root", |
| 4 | "password": "ho5uo7Uome5d", |
| 5 | "do_api_token": "{{ env `DO_API_TOKEN` }}", |
| 6 | "distro": "ubuntu-14-04-x64", |
| 7 | "disk_size": "8000" |
| 8 | }, |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 9 | "provisioners": [ |
| 10 | { |
| 11 | "type": "shell", |
Filip Pytloun | e7dce99 | 2016-01-08 12:52:57 +0100 | [diff] [blame] | 12 | "execute_command": "sh '{{.Path}}'", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 13 | "override": { |
| 14 | "virtualbox-iso": { |
| 15 | "scripts": [ |
| 16 | "scripts/base.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 17 | "scripts/salt.sh", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 18 | "scripts/vagrant.sh", |
| 19 | "scripts/virtualbox.sh", |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 20 | "scripts/security.sh", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 21 | "scripts/cleanup.sh", |
| 22 | "scripts/zerodisk.sh" |
| 23 | ] |
| 24 | }, |
| 25 | "vmware-iso": { |
| 26 | "scripts": [ |
| 27 | "scripts/base.sh", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 28 | "scripts/salt.sh", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 29 | "scripts/vmware.sh", |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 30 | "scripts/security.sh", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 31 | "scripts/cleanup.sh", |
| 32 | "scripts/zerodisk.sh" |
| 33 | ] |
| 34 | }, |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 35 | "qemu": { |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 36 | "scripts": [ |
| 37 | "scripts/base.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 38 | "scripts/salt.sh", |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 39 | "scripts/security.sh", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 40 | "scripts/cleanup.sh", |
| 41 | "scripts/zerodisk.sh" |
| 42 | ] |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 43 | }, |
| 44 | "docker": { |
Filip Pytloun | 7b48fd2 | 2015-06-30 23:34:01 +0200 | [diff] [blame] | 45 | "scripts": [ |
| 46 | "scripts/docker.sh", |
| 47 | "scripts/base.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 48 | "scripts/salt.sh", |
Filip Pytloun | 7b48fd2 | 2015-06-30 23:34:01 +0200 | [diff] [blame] | 49 | "scripts/cleanup.sh" |
| 50 | ] |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 51 | }, |
| 52 | "digitalocean": { |
| 53 | "scripts": [ |
| 54 | "scripts/base.sh", |
| 55 | "scripts/salt.sh", |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 56 | "scripts/security.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 57 | "scripts/cleanup.sh" |
| 58 | ] |
| 59 | } |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 60 | } |
jan kaufman | 0fcf1a7 | 2015-05-06 10:16:12 +0200 | [diff] [blame] | 61 | }, |
| 62 | { |
| 63 | "type": "file", |
| 64 | "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg", |
| 65 | "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg" |
Filip Pytloun | 60411d1 | 2015-06-25 21:14:41 +0200 | [diff] [blame] | 66 | }, |
| 67 | { |
| 68 | "type": "file", |
| 69 | "source": "configs/cloud/cloud.cfg", |
| 70 | "destination": "/etc/cloud/cloud.cfg" |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 71 | } |
| 72 | ], |
| 73 | "post-processors": [ |
| 74 | { |
| 75 | "type": "vagrant", |
| 76 | "keep_input_artifact": true, |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 77 | "output": "images/{{ user `distro` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 78 | "except": [ |
| 79 | "digitalocean", |
| 80 | "docker" |
| 81 | ] |
Filip Pytloun | 7b48fd2 | 2015-06-30 23:34:01 +0200 | [diff] [blame] | 82 | }, |
| 83 | { |
Filip Pytloun | 6e4c3b7 | 2015-07-23 09:20:13 +0200 | [diff] [blame] | 84 | "type": "docker-tag", |
Filip Pytloun | c2b0ca0 | 2016-06-09 16:26:30 +0200 | [diff] [blame] | 85 | "repository": "tcpcloud/ubuntu", |
Filip Pytloun | 6e4c3b7 | 2015-07-23 09:20:13 +0200 | [diff] [blame] | 86 | "tag": "14.04", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 87 | "only": [ |
| 88 | "docker" |
| 89 | ] |
Filip Pytloun | 6e4c3b7 | 2015-07-23 09:20:13 +0200 | [diff] [blame] | 90 | }, |
| 91 | { |
Filip Pytloun | 62c8f83 | 2015-07-22 17:40:00 +0200 | [diff] [blame] | 92 | "type": "docker-save", |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 93 | "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601021504\" }}.tar", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 94 | "only": [ |
| 95 | "docker" |
| 96 | ] |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 97 | } |
| 98 | ], |
| 99 | "builders": [ |
| 100 | { |
| 101 | "type": "virtualbox-iso", |
| 102 | "boot_command": [ |
| 103 | "<esc><wait>", |
| 104 | "<esc><wait>", |
| 105 | "<enter><wait>", |
| 106 | "/install/vmlinuz<wait>", |
| 107 | " auto<wait>", |
| 108 | " console-setup/ask_detect=false<wait>", |
| 109 | " console-setup/layoutcode=us<wait>", |
| 110 | " console-setup/modelcode=pc105<wait>", |
| 111 | " debconf/frontend=noninteractive<wait>", |
| 112 | " debian-installer=en_US<wait>", |
| 113 | " fb=false<wait>", |
| 114 | " initrd=/install/initrd.gz<wait>", |
| 115 | " kbd-chooser/method=us<wait>", |
| 116 | " keyboard-configuration/layout=USA<wait>", |
| 117 | " keyboard-configuration/variant=USA<wait>", |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 118 | " passwd/root-password={{user `password`}} ", |
| 119 | " passwd/root-password-again={{user `password`}} ", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 120 | " locale=en_US<wait>", |
| 121 | " netcfg/get_hostname=ubuntu-1404<wait>", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 122 | " netcfg/get_domain=cloudlab.cz<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 123 | " noapic<wait>", |
Filip Pytloun | 5bfc1df | 2015-07-13 14:36:46 +0200 | [diff] [blame] | 124 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 125 | " -- <wait>", |
| 126 | "<enter><wait>" |
| 127 | ], |
| 128 | "boot_wait": "5s", |
| 129 | "disk_size": "{{ user `disk_size`}}", |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 130 | "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 131 | "guest_os_type": "Ubuntu_64", |
| 132 | "http_directory": "http", |
Filip Pytloun | 8cef3dd | 2016-12-14 10:51:24 +0100 | [diff] [blame] | 133 | "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 134 | "iso_checksum_type": "md5", |
Filip Pytloun | 8cef3dd | 2016-12-14 10:51:24 +0100 | [diff] [blame] | 135 | "iso_url": "http://releases.ubuntu.mirror.dkm.cz/releases/14.04/ubuntu-14.04.5-server-amd64.iso", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 136 | "ssh_username": "{{user `user`}}", |
| 137 | "ssh_password": "{{user `password`}}", |
| 138 | "ssh_port": 22, |
| 139 | "ssh_wait_timeout": "10000s", |
Filip Pytloun | e7dce99 | 2016-01-08 12:52:57 +0100 | [diff] [blame] | 140 | "shutdown_command": "shutdown -P now", |
Filip Pytloun | 019c5d4 | 2015-07-22 18:59:15 +0200 | [diff] [blame] | 141 | "headless": true, |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 142 | "vboxmanage": [ |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 143 | [ |
| 144 | "modifyvm", |
| 145 | "{{.Name}}", |
| 146 | "--memory", |
| 147 | "1024" |
| 148 | ], |
| 149 | [ |
| 150 | "modifyvm", |
| 151 | "{{.Name}}", |
| 152 | "--cpus", |
| 153 | "2" |
| 154 | ], |
| 155 | [ |
| 156 | "modifyvm", |
| 157 | "{{.Name}}", |
| 158 | "--vrde", |
| 159 | "on" |
| 160 | ], |
| 161 | [ |
| 162 | "modifyvm", |
| 163 | "{{.Name}}", |
| 164 | "--vrdeport", |
| 165 | "5000-5050" |
| 166 | ], |
| 167 | [ |
| 168 | "modifyvm", |
| 169 | "{{.Name}}", |
| 170 | "--vrdeaddress", |
| 171 | "127.0.0.1" |
| 172 | ] |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 173 | ] |
| 174 | }, |
| 175 | { |
| 176 | "type": "vmware-iso", |
| 177 | "boot_command": [ |
| 178 | "<esc><wait>", |
| 179 | "<esc><wait>", |
| 180 | "<enter><wait>", |
| 181 | "/install/vmlinuz<wait>", |
| 182 | " auto<wait>", |
| 183 | " console-setup/ask_detect=false<wait>", |
| 184 | " console-setup/layoutcode=us<wait>", |
| 185 | " console-setup/modelcode=pc105<wait>", |
| 186 | " debconf/frontend=noninteractive<wait>", |
| 187 | " debian-installer=en_US<wait>", |
| 188 | " fb=false<wait>", |
| 189 | " initrd=/install/initrd.gz<wait>", |
| 190 | " kbd-chooser/method=us<wait>", |
| 191 | " keyboard-configuration/layout=USA<wait>", |
| 192 | " keyboard-configuration/variant=USA<wait>", |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 193 | " passwd/root-password={{user `password`}} ", |
| 194 | " passwd/root-password-again={{user `password`}} ", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 195 | " locale=en_US<wait>", |
| 196 | " netcfg/get_hostname=ubuntu-1404<wait>", |
jan kaufman | 605c249 | 2015-03-10 15:35:43 +0100 | [diff] [blame] | 197 | " netcfg/get_domain=changeme<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 198 | " noapic<wait>", |
Filip Pytloun | 5bfc1df | 2015-07-13 14:36:46 +0200 | [diff] [blame] | 199 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 200 | " -- <wait>", |
| 201 | "<enter><wait>" |
| 202 | ], |
| 203 | "boot_wait": "5s", |
| 204 | "disk_size": "{{ user `disk_size`}}", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 205 | "disk_type_id": 4, |
| 206 | "vmdk_name": "{{ user `distro`}}", |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 207 | "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 208 | "guest_os_type": "linux", |
| 209 | "http_directory": "http", |
Filip Pytloun | 8cef3dd | 2016-12-14 10:51:24 +0100 | [diff] [blame] | 210 | "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 211 | "iso_checksum_type": "md5", |
Filip Pytloun | 8cef3dd | 2016-12-14 10:51:24 +0100 | [diff] [blame] | 212 | "iso_url": "http://releases.ubuntu.mirror.dkm.cz/releases/14.04/ubuntu-14.04.5-server-amd64.iso", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 213 | "ssh_username": "{{user `user`}}", |
| 214 | "ssh_password": "{{user `password`}}", |
| 215 | "ssh_port": 22, |
| 216 | "ssh_wait_timeout": "10000s", |
Filip Pytloun | e7dce99 | 2016-01-08 12:52:57 +0100 | [diff] [blame] | 217 | "shutdown_command": "shutdown -P now", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 218 | "vmx_data": { |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 219 | "memsize": "1024", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 220 | "numvcpus": "1", |
| 221 | "cpuid.coresPerSocket": "1" |
| 222 | } |
| 223 | }, |
| 224 | { |
| 225 | "type": "qemu", |
Filip Pytloun | 56cf9e3 | 2016-02-19 09:56:08 +0100 | [diff] [blame] | 226 | "qemuargs": [ |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 227 | [ |
| 228 | "-m", |
| 229 | "1024M" |
| 230 | ] |
Filip Pytloun | 56cf9e3 | 2016-02-19 09:56:08 +0100 | [diff] [blame] | 231 | ], |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 232 | "vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}", |
| 233 | "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 234 | "format": "qcow2", |
| 235 | "accelerator": "kvm", |
| 236 | "disk_size": "{{ user `disk_size`}}", |
Filip Pytloun | 8cef3dd | 2016-12-14 10:51:24 +0100 | [diff] [blame] | 237 | "iso_url": "http://releases.ubuntu.mirror.dkm.cz/releases/14.04/ubuntu-14.04.5-server-amd64.iso", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 238 | "iso_checksum_type": "md5", |
Filip Pytloun | 8cef3dd | 2016-12-14 10:51:24 +0100 | [diff] [blame] | 239 | "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 240 | "http_directory": "http", |
jan kaufman | 64b9f97 | 2015-03-11 11:31:28 +0100 | [diff] [blame] | 241 | "headless": true, |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 242 | "ssh_username": "{{user `user`}}", |
| 243 | "ssh_password": "{{user `password`}}", |
Filip Pytloun | e7dce99 | 2016-01-08 12:52:57 +0100 | [diff] [blame] | 244 | "shutdown_command": "shutdown -P now", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 245 | "boot_wait": "2s", |
Filip Pytloun | 3983236 | 2015-06-25 18:05:47 +0200 | [diff] [blame] | 246 | "ssh_wait_timeout": "10000s", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 247 | "boot_command": [ |
| 248 | "<esc><wait>", |
| 249 | "<esc><wait>", |
| 250 | "<enter><wait>", |
| 251 | "/install/vmlinuz<wait>", |
| 252 | " auto<wait>", |
| 253 | " console-setup/ask_detect=false<wait>", |
| 254 | " console-setup/layoutcode=us<wait>", |
| 255 | " console-setup/modelcode=pc105<wait>", |
| 256 | " debconf/frontend=noninteractive<wait>", |
| 257 | " debian-installer=en_US<wait>", |
| 258 | " fb=false<wait>", |
| 259 | " initrd=/install/initrd.gz<wait>", |
| 260 | " kbd-chooser/method=us<wait>", |
| 261 | " keyboard-configuration/layout=USA<wait>", |
| 262 | " keyboard-configuration/variant=USA<wait>", |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 263 | " passwd/root-password={{user `password`}} ", |
| 264 | " passwd/root-password-again={{user `password`}} ", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 265 | " locale=en_US<wait>", |
| 266 | " netcfg/get_hostname=ubuntu-1404<wait>", |
jan kaufman | 605c249 | 2015-03-10 15:35:43 +0100 | [diff] [blame] | 267 | " netcfg/get_domain=changeme<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 268 | " noapic<wait>", |
Filip Pytloun | 5bfc1df | 2015-07-13 14:36:46 +0200 | [diff] [blame] | 269 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 270 | " -- <wait>", |
| 271 | "<enter><wait>" |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 272 | ] |
| 273 | }, |
Filip Pytloun | 7b48fd2 | 2015-06-30 23:34:01 +0200 | [diff] [blame] | 274 | { |
| 275 | "type": "docker", |
| 276 | "image": "ubuntu:14.04", |
| 277 | "commit": true |
Filip Pytloun | 896f37b | 2015-06-25 18:35:42 +0200 | [diff] [blame] | 278 | }, |
Filip Pytloun | 7b48fd2 | 2015-06-30 23:34:01 +0200 | [diff] [blame] | 279 | { |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 280 | "type": "digitalocean", |
| 281 | "api_token": "{{user `do_api_token`}}", |
| 282 | "image": "{{user `distro`}}", |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 283 | "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 284 | "region": "ams2", |
| 285 | "size": "1gb" |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 286 | } |
| 287 | ] |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame^] | 288 | } |