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