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