Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 1 | { |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 2 | "variables": { |
| 3 | "user": "root", |
| 4 | "password": "ho5uo7Uome5d", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 5 | "distro": "ubuntu-16-04-x64", |
azvyagintsev | 4053eb2 | 2018-03-29 16:21:51 +0300 | [diff] [blame] | 6 | "disk_size": "8000", |
| 7 | "ubuntu_baseurl": "https://mirror.mirantis.com/proposed/", |
| 8 | "saltstack_repo": "deb [arch=amd64] https://mirror.mirantis.com/proposed/saltstack-2016.3/xenial/ xenial main", |
| 9 | "do_api_token": "{{ env `DO_API_TOKEN` }}", |
| 10 | "image_name": "ubuntu-16-04-x64", |
| 11 | "os_username": "{{ env `OS_USERNAME` }}", |
| 12 | "os_password": "{{ env `OS_PASSWORD` }}", |
| 13 | "os_image": "7451fac0-0ce5-4d30-ae36-cd9a90e7948e", |
| 14 | "os_endpoint": "https://cloud-cz.bud.mirantis.net:5000/v2.0", |
| 15 | "os_zone": "mcp-mk", |
| 16 | "os_floating_ip_pool": "public", |
| 17 | "os_tenant": "26e4dd19485249608ee3685f254f3909", |
| 18 | "os_network": "772f8ca6-1f4a-4535-99d0-880d6ead9a82" |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 19 | }, |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 20 | "provisioners": [ |
| 21 | { |
azvyagintsev | 4053eb2 | 2018-03-29 16:21:51 +0300 | [diff] [blame] | 22 | "environment_vars": [ |
| 23 | "UBUNTU_BASEURL={{ user `ubuntu_baseurl` }}", |
| 24 | "SALTSTACK_GPG={{ user `saltstack_gpg` }}" |
| 25 | ], |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 26 | "type": "shell", |
| 27 | "execute_command": "sh '{{.Path}}'", |
| 28 | "override": { |
| 29 | "virtualbox-iso": { |
| 30 | "scripts": [ |
| 31 | "scripts/base.sh", |
azvyagintsev | c0d1b8a | 2018-03-22 19:05:03 +0200 | [diff] [blame] | 32 | "scripts/motd.sh", |
Jakub Josef | 6bcf386 | 2017-05-03 16:16:39 +0200 | [diff] [blame] | 33 | "scripts/salt.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 34 | "scripts/network.sh", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 35 | "scripts/vagrant.sh", |
| 36 | "scripts/virtualbox.sh", |
| 37 | "scripts/security.sh", |
| 38 | "scripts/cleanup.sh", |
| 39 | "scripts/zerodisk.sh" |
| 40 | ] |
| 41 | }, |
| 42 | "vmware-iso": { |
| 43 | "scripts": [ |
| 44 | "scripts/base.sh", |
azvyagintsev | c0d1b8a | 2018-03-22 19:05:03 +0200 | [diff] [blame] | 45 | "scripts/motd.sh", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 46 | "scripts/salt.sh", |
| 47 | "scripts/vmware.sh", |
| 48 | "scripts/security.sh", |
| 49 | "scripts/cleanup.sh", |
| 50 | "scripts/zerodisk.sh" |
| 51 | ] |
| 52 | }, |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 53 | "qemu": { |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 54 | "scripts": [ |
| 55 | "scripts/base.sh", |
azvyagintsev | c0d1b8a | 2018-03-22 19:05:03 +0200 | [diff] [blame] | 56 | "scripts/motd.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 57 | "scripts/salt.sh", |
Jakub Josef | 6bcf386 | 2017-05-03 16:16:39 +0200 | [diff] [blame] | 58 | "scripts/network.sh", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 59 | "scripts/security.sh", |
| 60 | "scripts/cleanup.sh", |
azvyagintsev | 4053eb2 | 2018-03-29 16:21:51 +0300 | [diff] [blame] | 61 | "scripts/info.sh", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 62 | "scripts/zerodisk.sh" |
| 63 | ] |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 64 | }, |
azvyagintsev | 4053eb2 | 2018-03-29 16:21:51 +0300 | [diff] [blame] | 65 | "openstack": { |
| 66 | "scripts": [ |
| 67 | "scripts/base.sh", |
| 68 | "scripts/motd.sh", |
| 69 | "scripts/salt.sh", |
| 70 | "scripts/network.sh", |
| 71 | "scripts/security.sh", |
| 72 | "scripts/cleanup.sh", |
| 73 | "scripts/info.sh" |
| 74 | ] |
| 75 | }, |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 76 | "docker": { |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 77 | "scripts": [ |
| 78 | "scripts/docker.sh", |
| 79 | "scripts/base.sh", |
azvyagintsev | c0d1b8a | 2018-03-22 19:05:03 +0200 | [diff] [blame] | 80 | "scripts/motd.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 81 | "scripts/salt.sh", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 82 | "scripts/cleanup.sh" |
| 83 | ] |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 84 | }, |
| 85 | "digitalocean": { |
| 86 | "scripts": [ |
| 87 | "scripts/base.sh", |
azvyagintsev | c0d1b8a | 2018-03-22 19:05:03 +0200 | [diff] [blame] | 88 | "scripts/motd.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 89 | "scripts/salt.sh", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 90 | "scripts/security.sh", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 91 | "scripts/cleanup.sh" |
| 92 | ] |
| 93 | } |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 94 | } |
| 95 | }, |
| 96 | { |
| 97 | "type": "file", |
alexz | 5b79514 | 2018-02-13 15:59:28 +0100 | [diff] [blame] | 98 | "source": "files/etc/cloud/cloud.cfg.d/99_tcp.cfg", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 99 | "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg" |
| 100 | }, |
| 101 | { |
| 102 | "type": "file", |
alexz | 5b79514 | 2018-02-13 15:59:28 +0100 | [diff] [blame] | 103 | "source": "files/etc/cloud/cloud.cfg", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 104 | "destination": "/etc/cloud/cloud.cfg" |
| 105 | } |
| 106 | ], |
| 107 | "post-processors": [ |
| 108 | { |
| 109 | "type": "vagrant", |
| 110 | "keep_input_artifact": true, |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 111 | "output": "images/{{ user `distro` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 112 | "except": [ |
| 113 | "digitalocean", |
| 114 | "docker" |
| 115 | ] |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 116 | }, |
| 117 | { |
| 118 | "type": "docker-tag", |
Filip Pytloun | c2b0ca0 | 2016-06-09 16:26:30 +0200 | [diff] [blame] | 119 | "repository": "tcpcloud/ubuntu", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 120 | "tag": "16.04", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 121 | "only": [ |
| 122 | "docker" |
| 123 | ] |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 124 | }, |
| 125 | { |
| 126 | "type": "docker-save", |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 127 | "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601021504\" }}.tar", |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 128 | "only": [ |
| 129 | "docker" |
| 130 | ] |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 131 | } |
| 132 | ], |
| 133 | "builders": [ |
| 134 | { |
| 135 | "type": "virtualbox-iso", |
| 136 | "boot_command": [ |
| 137 | "<esc><wait>", |
| 138 | "<esc><wait>", |
| 139 | "<enter><wait>", |
| 140 | "/install/vmlinuz<wait>", |
| 141 | " auto<wait>", |
| 142 | " console-setup/ask_detect=false<wait>", |
| 143 | " console-setup/layoutcode=us<wait>", |
| 144 | " console-setup/modelcode=pc105<wait>", |
| 145 | " debconf/frontend=noninteractive<wait>", |
| 146 | " debian-installer=en_US<wait>", |
| 147 | " fb=false<wait>", |
| 148 | " initrd=/install/initrd.gz<wait>", |
| 149 | " kbd-chooser/method=us<wait>", |
| 150 | " keyboard-configuration/layout=USA<wait>", |
| 151 | " keyboard-configuration/variant=USA<wait>", |
| 152 | " passwd/root-password={{user `password`}} ", |
| 153 | " passwd/root-password-again={{user `password`}} ", |
| 154 | " locale=en_US<wait>", |
| 155 | " netcfg/get_hostname=ubuntu-1604<wait>", |
| 156 | " netcfg/get_domain=cloudlab.cz<wait>", |
| 157 | " noapic<wait>", |
| 158 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>", |
| 159 | " -- <wait>", |
| 160 | "<enter><wait>" |
| 161 | ], |
| 162 | "boot_wait": "5s", |
| 163 | "disk_size": "{{ user `disk_size`}}", |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 164 | "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 165 | "guest_os_type": "Ubuntu_64", |
| 166 | "http_directory": "http", |
Jakub Josef | a59d0fb | 2017-09-04 13:26:15 +0200 | [diff] [blame] | 167 | "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 168 | "iso_checksum_type": "md5", |
Jakub Josef | a59d0fb | 2017-09-04 13:26:15 +0200 | [diff] [blame] | 169 | "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +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": "shutdown -P now", |
| 175 | "headless": true, |
| 176 | "vboxmanage": [ |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 177 | [ |
| 178 | "modifyvm", |
| 179 | "{{.Name}}", |
| 180 | "--memory", |
| 181 | "1024" |
| 182 | ], |
| 183 | [ |
| 184 | "modifyvm", |
| 185 | "{{.Name}}", |
| 186 | "--cpus", |
| 187 | "2" |
| 188 | ], |
| 189 | [ |
| 190 | "modifyvm", |
| 191 | "{{.Name}}", |
| 192 | "--vrde", |
| 193 | "on" |
| 194 | ], |
| 195 | [ |
| 196 | "modifyvm", |
| 197 | "{{.Name}}", |
| 198 | "--vrdeport", |
| 199 | "5000-5050" |
| 200 | ], |
| 201 | [ |
| 202 | "modifyvm", |
| 203 | "{{.Name}}", |
| 204 | "--vrdeaddress", |
| 205 | "127.0.0.1" |
| 206 | ] |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 207 | ] |
| 208 | }, |
| 209 | { |
| 210 | "type": "vmware-iso", |
| 211 | "boot_command": [ |
| 212 | "<esc><wait>", |
| 213 | "<esc><wait>", |
| 214 | "<enter><wait>", |
| 215 | "/install/vmlinuz<wait>", |
| 216 | " auto<wait>", |
| 217 | " console-setup/ask_detect=false<wait>", |
| 218 | " console-setup/layoutcode=us<wait>", |
| 219 | " console-setup/modelcode=pc105<wait>", |
| 220 | " debconf/frontend=noninteractive<wait>", |
| 221 | " debian-installer=en_US<wait>", |
| 222 | " fb=false<wait>", |
| 223 | " initrd=/install/initrd.gz<wait>", |
| 224 | " kbd-chooser/method=us<wait>", |
| 225 | " keyboard-configuration/layout=USA<wait>", |
| 226 | " keyboard-configuration/variant=USA<wait>", |
| 227 | " passwd/root-password={{user `password`}} ", |
| 228 | " passwd/root-password-again={{user `password`}} ", |
| 229 | " locale=en_US<wait>", |
| 230 | " netcfg/get_hostname=ubuntu-1604<wait>", |
| 231 | " netcfg/get_domain=changeme<wait>", |
| 232 | " noapic<wait>", |
| 233 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>", |
| 234 | " -- <wait>", |
| 235 | "<enter><wait>" |
| 236 | ], |
| 237 | "boot_wait": "5s", |
| 238 | "disk_size": "{{ user `disk_size`}}", |
| 239 | "disk_type_id": 4, |
| 240 | "vmdk_name": "{{ user `distro`}}", |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 241 | "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 242 | "guest_os_type": "linux", |
| 243 | "http_directory": "http", |
Jakub Josef | d65a5fb | 2017-09-04 16:03:17 +0200 | [diff] [blame] | 244 | "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 245 | "iso_checksum_type": "md5", |
Jakub Josef | d65a5fb | 2017-09-04 16:03:17 +0200 | [diff] [blame] | 246 | "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 247 | "ssh_username": "{{user `user`}}", |
| 248 | "ssh_password": "{{user `password`}}", |
| 249 | "ssh_port": 22, |
| 250 | "ssh_wait_timeout": "10000s", |
| 251 | "shutdown_command": "shutdown -P now", |
| 252 | "vmx_data": { |
| 253 | "memsize": "1024", |
| 254 | "numvcpus": "1", |
| 255 | "cpuid.coresPerSocket": "1" |
| 256 | } |
| 257 | }, |
| 258 | { |
azvyagintsev | 4053eb2 | 2018-03-29 16:21:51 +0300 | [diff] [blame] | 259 | "type": "docker", |
| 260 | "image": "ubuntu:16.04", |
| 261 | "commit": true |
| 262 | }, |
| 263 | { |
| 264 | "type": "digitalocean", |
| 265 | "api_token": "{{user `do_api_token`}}", |
| 266 | "image": "{{user `distro`}}", |
| 267 | "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}", |
| 268 | "region": "ams2", |
| 269 | "size": "1gb" |
| 270 | }, |
| 271 | { |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 272 | "type": "qemu", |
Filip Pytloun | 56cf9e3 | 2016-02-19 09:56:08 +0100 | [diff] [blame] | 273 | "qemuargs": [ |
alexz | 5b79514 | 2018-02-13 15:59:28 +0100 | [diff] [blame] | 274 | [ "-m", "1024M" ], |
| 275 | [ "-fda", "config-drive/cloudata.iso" ] |
Filip Pytloun | 56cf9e3 | 2016-02-19 09:56:08 +0100 | [diff] [blame] | 276 | ], |
azvyagintsev | 4053eb2 | 2018-03-29 16:21:51 +0300 | [diff] [blame] | 277 | "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}", |
| 278 | "output_directory": "images/{{ user `image_name` }}-qemu-{{ isotime \"200601021504\" }}", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 279 | "format": "qcow2", |
Richard Felkl | a5a4426 | 2018-03-12 15:11:32 +0100 | [diff] [blame] | 280 | "iso_checksum": "566efef1d6f12e7d3a994c2405bdb642", |
alexz | 5b79514 | 2018-02-13 15:59:28 +0100 | [diff] [blame] | 281 | "iso_checksum_type": "md5", |
alexz | 8c4cfc7 | 2018-03-23 13:56:10 +0100 | [diff] [blame] | 282 | "iso_url": "http://cloud-images.ubuntu.com/releases/xenial/release-20180306/ubuntu-16.04-server-cloudimg-amd64-disk1.img", |
alexz | 5b79514 | 2018-02-13 15:59:28 +0100 | [diff] [blame] | 283 | "disk_image": true, |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 284 | "accelerator": "kvm", |
| 285 | "disk_size": "{{ user `disk_size`}}", |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 286 | "headless": true, |
| 287 | "ssh_username": "{{user `user`}}", |
| 288 | "ssh_password": "{{user `password`}}", |
| 289 | "shutdown_command": "shutdown -P now", |
| 290 | "boot_wait": "2s", |
alexz | 5b79514 | 2018-02-13 15:59:28 +0100 | [diff] [blame] | 291 | "ssh_wait_timeout": "360s" |
azvyagintsev | d8f8523 | 2017-10-02 15:30:28 +0300 | [diff] [blame] | 292 | }, |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 293 | { |
azvyagintsev | 4053eb2 | 2018-03-29 16:21:51 +0300 | [diff] [blame] | 294 | "type": "openstack", |
| 295 | "ssh_username": "{{user `user`}}", |
| 296 | "ssh_password": "{{user `password`}}", |
| 297 | "image_name": "{{user `image_name`}}", |
| 298 | "floating_ip_pool": "{{user `os_floating_ip_pool`}}", |
| 299 | "reuse_ips": "true", |
| 300 | "source_image": "{{ user `os_image` }}", |
| 301 | "flavor": "{{ user `os_flavor` }}", |
| 302 | "user_data_file": "config-drive/user-data.yaml", |
| 303 | "tenant_id": "{{ user `os_tenant` }}", |
| 304 | "networks": ["{{ user `os_network` }}"], |
| 305 | "availability_zone": "{{user `os_zone`}}", |
| 306 | "identity_endpoint": "{{user `os_endpoint`}}", |
| 307 | "username": "{{user `os_username`}}", |
| 308 | "password": "{{user `os_password`}}" |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 309 | } |
| 310 | ] |
alexz | 5b79514 | 2018-02-13 15:59:28 +0100 | [diff] [blame] | 311 | } |