jan kaufman | 3ea7ab5 | 2015-04-10 10:58:00 +0200 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
| 3 | "user": "{{ env `BUILD_USER` }}", |
| 4 | "password": "{{ env `BUILD_PASSWORD` }}", |
| 5 | "do_api_token": "{{ env `DO_API_TOKEN` }}", |
| 6 | "distro": "Centos-7", |
| 7 | "disk_size": 8000 |
| 8 | }, |
| 9 | "provisioners": [ |
| 10 | { |
| 11 | "type": "shell", |
| 12 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", |
| 13 | "override": { |
| 14 | "virtualbox-iso": { |
| 15 | "scripts": [ |
| 16 | "scripts/base.sh", |
| 17 | "scripts/vagrant.sh", |
| 18 | "scripts/virtualbox.sh", |
| 19 | "scripts/cleanup.sh" |
| 20 | ] |
| 21 | }, |
| 22 | "vmware-iso": { |
| 23 | "scripts": [ |
| 24 | "scripts/base.sh", |
| 25 | "scripts/vagrant.sh", |
| 26 | "scripts/vmware.sh", |
| 27 | "scripts/cleanup.sh" |
| 28 | ] |
| 29 | }, |
| 30 | "qemu": { |
| 31 | "scripts": [ |
| 32 | "scripts/base.sh", |
| 33 | "scripts/salt.sh", |
| 34 | "scripts/cleanup.sh", |
| 35 | "scripts/zerodisk.sh" |
| 36 | ] |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | ], |
| 41 | "post-processors": [ |
| 42 | { |
| 43 | "type": "vagrant", |
| 44 | "override": { |
| 45 | "virtualbox": { |
| 46 | "output": "centos-7-0-x64-virtualbox.box" |
| 47 | }, |
| 48 | "vmware": { |
| 49 | "output": "centos-7-0-x64-vmware.box" |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | ], |
| 54 | "builders": [ |
| 55 | { |
| 56 | "type": "virtualbox-iso", |
| 57 | "boot_command": [ |
| 58 | "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| 59 | ], |
| 60 | "boot_wait": "10s", |
| 61 | "disk_size": 5020, |
| 62 | "guest_os_type": "RedHat_64", |
| 63 | "http_directory": "http", |
| 64 | "iso_checksum": "99e450fb1b22d2e528757653fcbf5fdc", |
| 65 | "iso_checksum_type": "sha1", |
| 66 | "iso_url": "http://ftp.fi.muni.cz/pub/linux/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1503.iso", |
| 67 | "ssh_username": "{{user `user`}}", |
| 68 | "ssh_password": "{{user `password`}}", |
| 69 | "ssh_port": 22, |
| 70 | "ssh_wait_timeout": "10000s", |
| 71 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", |
| 72 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", |
| 73 | "virtualbox_version_file": ".vbox_version", |
| 74 | "vboxmanage": [ |
| 75 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], |
| 76 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] |
| 77 | ] |
| 78 | }, |
| 79 | { |
| 80 | "type": "qemu", |
| 81 | "vm_name": "{{ user `distro` }}-{{ timestamp }}", |
| 82 | "output_directory": "images/{{ user `distro` }}-{{ timestamp }}", |
| 83 | "format": "qcow2", |
| 84 | "accelerator": "kvm", |
| 85 | "disk_size": "{{ user `disk_size`}}", |
jan kaufman | 88f4142 | 2015-05-06 10:17:55 +0200 | [diff] [blame^] | 86 | "iso_checksum": "99e450fb1b22d2e528757653fcbf5fdc", |
| 87 | "iso_checksum_type": "md5", |
| 88 | "iso_url": "http://ftp.fi.muni.cz/pub/linux/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1503-01.iso", |
jan kaufman | 3ea7ab5 | 2015-04-10 10:58:00 +0200 | [diff] [blame] | 89 | "http_directory": "http", |
jan kaufman | 88f4142 | 2015-05-06 10:17:55 +0200 | [diff] [blame^] | 90 | "headless": false, |
jan kaufman | 3ea7ab5 | 2015-04-10 10:58:00 +0200 | [diff] [blame] | 91 | "ssh_username": "{{user `user`}}", |
| 92 | "ssh_password": "{{user `password`}}", |
| 93 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now", |
| 94 | "boot_wait": "2s", |
| 95 | "boot_command": [ |
| 96 | "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| 97 | ] |
| 98 | }, |
| 99 | { |
| 100 | "type": "vmware-iso", |
| 101 | "boot_command": [ |
| 102 | "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| 103 | ], |
| 104 | "boot_wait": "10s", |
| 105 | "disk_size": 40520, |
| 106 | "guest_os_type": "centos-64", |
| 107 | "http_directory": "http", |
| 108 | "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806", |
| 109 | "iso_checksum_type": "sha1", |
| 110 | "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso", |
| 111 | "ssh_username": "{{user `user`}}", |
| 112 | "ssh_password": "{{user `password`}}", |
| 113 | "ssh_port": 22, |
| 114 | "ssh_wait_timeout": "10000s", |
| 115 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", |
| 116 | "tools_upload_flavor": "linux", |
| 117 | "vmx_data": { |
| 118 | "memsize": "512", |
| 119 | "numvcpus": "1", |
| 120 | "cpuid.coresPerSocket": "1" |
| 121 | } |
| 122 | } |
| 123 | ] |
| 124 | } |