jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
Filip Pytloun | 077322e | 2015-06-25 19:18:33 +0200 | [diff] [blame] | 3 | "user": "{{ env `BUILD_USER` }}", |
| 4 | "password": "{{ env `BUILD_PASSWORD` }}", |
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", |
| 13 | "execute_command": "echo '{{user `user`}}' |sudo -S sh '{{.Path}}'", |
| 14 | "override": { |
| 15 | "virtualbox-iso": { |
| 16 | "scripts": [ |
| 17 | "scripts/base.sh", |
| 18 | "scripts/salt.sh", |
| 19 | "scripts/vagrant.sh", |
| 20 | "scripts/virtualbox.sh", |
| 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", |
| 30 | "scripts/cleanup.sh", |
| 31 | "scripts/zerodisk.sh" |
| 32 | ] |
| 33 | }, |
| 34 | "qemu": { |
| 35 | "scripts": [ |
| 36 | "scripts/base.sh", |
| 37 | "scripts/salt.sh", |
| 38 | "scripts/cleanup.sh", |
| 39 | "scripts/zerodisk.sh" |
| 40 | ] |
| 41 | }, |
| 42 | "digitalocean": { |
| 43 | "scripts": [ |
| 44 | "scripts/base.sh", |
| 45 | "scripts/salt.sh", |
| 46 | "scripts/cleanup.sh" |
| 47 | ] |
| 48 | } |
| 49 | } |
jan kaufman | 0fcf1a7 | 2015-05-06 10:16:12 +0200 | [diff] [blame] | 50 | }, |
| 51 | { |
| 52 | "type": "file", |
| 53 | "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg", |
| 54 | "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg" |
Filip Pytloun | 60411d1 | 2015-06-25 21:14:41 +0200 | [diff] [blame] | 55 | }, |
| 56 | { |
| 57 | "type": "file", |
| 58 | "source": "configs/cloud/cloud.cfg", |
| 59 | "destination": "/etc/cloud/cloud.cfg" |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 60 | } |
| 61 | ], |
| 62 | "post-processors": [ |
| 63 | { |
| 64 | "type": "vagrant", |
| 65 | "keep_input_artifact": true, |
| 66 | "except": "digitalocean", |
| 67 | "override": { |
| 68 | "virtualbox": { |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 69 | "output": "images/{{ user `distro` }}-vbox-{{ timestamp }}.box" |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 70 | }, |
| 71 | "vmware": { |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 72 | "output": "images/{{ user `distro` }}-vmware-{{ timestamp }}.box" |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 73 | }, |
| 74 | "qemu": { |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 75 | "output": "images/{{ user `distro` }}-qemu-{{ timestamp }}.box" |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 76 | } |
| 77 | }, |
| 78 | "except": [ "digitalocean" ] |
| 79 | } |
| 80 | ], |
| 81 | "builders": [ |
| 82 | { |
| 83 | "type": "virtualbox-iso", |
| 84 | "boot_command": [ |
| 85 | "<esc><wait>", |
| 86 | "<esc><wait>", |
| 87 | "<enter><wait>", |
| 88 | "/install/vmlinuz<wait>", |
| 89 | " auto<wait>", |
| 90 | " console-setup/ask_detect=false<wait>", |
| 91 | " console-setup/layoutcode=us<wait>", |
| 92 | " console-setup/modelcode=pc105<wait>", |
| 93 | " debconf/frontend=noninteractive<wait>", |
| 94 | " debian-installer=en_US<wait>", |
| 95 | " fb=false<wait>", |
| 96 | " initrd=/install/initrd.gz<wait>", |
| 97 | " kbd-chooser/method=us<wait>", |
| 98 | " keyboard-configuration/layout=USA<wait>", |
| 99 | " keyboard-configuration/variant=USA<wait>", |
Filip Pytloun | 077322e | 2015-06-25 19:18:33 +0200 | [diff] [blame] | 100 | " passwd/user-fullname={{user `user`}} ", |
| 101 | " passwd/user-password-again={{user `password`}} ", |
| 102 | " passwd/user-password={{user `password`}} ", |
| 103 | " passwd/username={{user `user`}} ", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 104 | " locale=en_US<wait>", |
| 105 | " netcfg/get_hostname=ubuntu-1404<wait>", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 106 | " netcfg/get_domain=cloudlab.cz<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 107 | " noapic<wait>", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 108 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 109 | " -- <wait>", |
| 110 | "<enter><wait>" |
| 111 | ], |
| 112 | "boot_wait": "5s", |
| 113 | "disk_size": "{{ user `disk_size`}}", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 114 | "output_directory": "images/{{ user `distro` }}-vbox-{{ timestamp }}", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 115 | "guest_os_type": "Ubuntu_64", |
| 116 | "http_directory": "http", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 117 | "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 118 | "iso_checksum_type": "md5", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 119 | "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 120 | "ssh_username": "{{user `user`}}", |
| 121 | "ssh_password": "{{user `password`}}", |
| 122 | "ssh_port": 22, |
| 123 | "ssh_wait_timeout": "10000s", |
| 124 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now", |
| 125 | "vboxmanage": [ |
| 126 | [ "modifyvm", "{{.Name}}", "--memory", "1024" ], |
| 127 | [ "modifyvm", "{{.Name}}", "--cpus", "2" ] |
| 128 | ] |
| 129 | }, |
| 130 | { |
| 131 | "type": "vmware-iso", |
| 132 | "boot_command": [ |
| 133 | "<esc><wait>", |
| 134 | "<esc><wait>", |
| 135 | "<enter><wait>", |
| 136 | "/install/vmlinuz<wait>", |
| 137 | " auto<wait>", |
| 138 | " console-setup/ask_detect=false<wait>", |
| 139 | " console-setup/layoutcode=us<wait>", |
| 140 | " console-setup/modelcode=pc105<wait>", |
| 141 | " debconf/frontend=noninteractive<wait>", |
| 142 | " debian-installer=en_US<wait>", |
| 143 | " fb=false<wait>", |
| 144 | " initrd=/install/initrd.gz<wait>", |
| 145 | " kbd-chooser/method=us<wait>", |
| 146 | " keyboard-configuration/layout=USA<wait>", |
| 147 | " keyboard-configuration/variant=USA<wait>", |
Filip Pytloun | 077322e | 2015-06-25 19:18:33 +0200 | [diff] [blame] | 148 | " passwd/user-fullname={{user `user`}} ", |
| 149 | " passwd/user-password-again={{user `password`}} ", |
| 150 | " passwd/user-password={{user `password`}} ", |
| 151 | " passwd/username={{user `user`}} ", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 152 | " locale=en_US<wait>", |
| 153 | " netcfg/get_hostname=ubuntu-1404<wait>", |
jan kaufman | 605c249 | 2015-03-10 15:35:43 +0100 | [diff] [blame] | 154 | " netcfg/get_domain=changeme<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 155 | " noapic<wait>", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 156 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 157 | " -- <wait>", |
| 158 | "<enter><wait>" |
| 159 | ], |
| 160 | "boot_wait": "5s", |
| 161 | "disk_size": "{{ user `disk_size`}}", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 162 | "disk_type_id": 4, |
| 163 | "vmdk_name": "{{ user `distro`}}", |
| 164 | "output_directory": "images/{{ user `distro` }}-vmware-{{ timestamp }}", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 165 | "guest_os_type": "linux", |
| 166 | "http_directory": "http", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 167 | "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 168 | "iso_checksum_type": "md5", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 169 | "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 170 | "ssh_username": "{{user `user`}}", |
| 171 | "ssh_password": "{{user `password`}}", |
| 172 | "ssh_port": 22, |
| 173 | "ssh_wait_timeout": "10000s", |
| 174 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now", |
| 175 | "vmx_data": { |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 176 | "memsize": "1024", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 177 | "numvcpus": "1", |
| 178 | "cpuid.coresPerSocket": "1" |
| 179 | } |
| 180 | }, |
| 181 | { |
| 182 | "type": "qemu", |
| 183 | "vm_name": "{{ user `distro` }}-{{ timestamp }}", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 184 | "output_directory": "images/{{ user `distro` }}-qemu-{{ timestamp }}", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 185 | "format": "qcow2", |
| 186 | "accelerator": "kvm", |
| 187 | "disk_size": "{{ user `disk_size`}}", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 188 | "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 189 | "iso_checksum_type": "md5", |
jan kaufman | dfc08f0 | 2015-04-29 20:17:55 +0200 | [diff] [blame] | 190 | "iso_checksum": "83aabd8dcf1e8f469f3c72fff2375195", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 191 | "http_directory": "http", |
jan kaufman | 64b9f97 | 2015-03-11 11:31:28 +0100 | [diff] [blame] | 192 | "headless": true, |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 193 | "ssh_username": "{{user `user`}}", |
| 194 | "ssh_password": "{{user `password`}}", |
| 195 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now", |
| 196 | "boot_wait": "2s", |
Filip Pytloun | 3983236 | 2015-06-25 18:05:47 +0200 | [diff] [blame] | 197 | "ssh_wait_timeout": "10000s", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 198 | "boot_command": [ |
| 199 | "<esc><wait>", |
| 200 | "<esc><wait>", |
| 201 | "<enter><wait>", |
| 202 | "/install/vmlinuz<wait>", |
| 203 | " auto<wait>", |
| 204 | " console-setup/ask_detect=false<wait>", |
| 205 | " console-setup/layoutcode=us<wait>", |
| 206 | " console-setup/modelcode=pc105<wait>", |
| 207 | " debconf/frontend=noninteractive<wait>", |
| 208 | " debian-installer=en_US<wait>", |
| 209 | " fb=false<wait>", |
| 210 | " initrd=/install/initrd.gz<wait>", |
| 211 | " kbd-chooser/method=us<wait>", |
| 212 | " keyboard-configuration/layout=USA<wait>", |
| 213 | " keyboard-configuration/variant=USA<wait>", |
Filip Pytloun | 077322e | 2015-06-25 19:18:33 +0200 | [diff] [blame] | 214 | " passwd/user-fullname={{user `user`}} ", |
| 215 | " passwd/user-password-again={{user `password`}} ", |
| 216 | " passwd/user-password={{user `password`}} ", |
| 217 | " passwd/username={{user `user`}} ", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 218 | " locale=en_US<wait>", |
| 219 | " netcfg/get_hostname=ubuntu-1404<wait>", |
jan kaufman | 605c249 | 2015-03-10 15:35:43 +0100 | [diff] [blame] | 220 | " netcfg/get_domain=changeme<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 221 | " noapic<wait>", |
jan kaufman | 757e332 | 2015-03-11 11:30:59 +0100 | [diff] [blame] | 222 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-lvm.cfg<wait>", |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 223 | " -- <wait>", |
| 224 | "<enter><wait>" |
| 225 | ] |
| 226 | }, |
Filip Pytloun | 077322e | 2015-06-25 19:18:33 +0200 | [diff] [blame] | 227 | { |
jan kaufman | a519d7b | 2015-03-04 00:51:47 +0100 | [diff] [blame] | 228 | "type": "digitalocean", |
| 229 | "api_token": "{{user `do_api_token`}}", |
| 230 | "image": "{{user `distro`}}", |
| 231 | "snapshot_name": "{{ user `distro` }}-{{ timestamp }}", |
| 232 | "region" : "ams2", |
| 233 | "size" : "1gb" |
| 234 | } |
| 235 | ] |
| 236 | } |