| { |
| "variables": { |
| "user": "{{ env `BUILD_USER` }}", |
| "password": "{{ env `BUILD_PASSWORD` }}", |
| "do_api_token": "{{ env `DO_API_TOKEN` }}", |
| "distro": "Centos-7", |
| "disk_size": 8000 |
| }, |
| "provisioners": [ |
| { |
| "type": "shell", |
| "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", |
| "override": { |
| "virtualbox-iso": { |
| "scripts": [ |
| "scripts/base.sh", |
| "scripts/vagrant.sh", |
| "scripts/virtualbox.sh", |
| "scripts/cleanup.sh" |
| ] |
| }, |
| "vmware-iso": { |
| "scripts": [ |
| "scripts/base.sh", |
| "scripts/vagrant.sh", |
| "scripts/vmware.sh", |
| "scripts/cleanup.sh" |
| ] |
| }, |
| "qemu": { |
| "scripts": [ |
| "scripts/base.sh", |
| "scripts/salt.sh", |
| "scripts/cleanup.sh", |
| "scripts/zerodisk.sh" |
| ] |
| } |
| } |
| } |
| ], |
| "post-processors": [ |
| { |
| "type": "vagrant", |
| "override": { |
| "virtualbox": { |
| "output": "centos-7-0-x64-virtualbox.box" |
| }, |
| "vmware": { |
| "output": "centos-7-0-x64-vmware.box" |
| } |
| } |
| } |
| ], |
| "builders": [ |
| { |
| "type": "virtualbox-iso", |
| "boot_command": [ |
| "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| ], |
| "boot_wait": "10s", |
| "disk_size": 5020, |
| "guest_os_type": "RedHat_64", |
| "http_directory": "http", |
| "iso_checksum": "99e450fb1b22d2e528757653fcbf5fdc", |
| "iso_checksum_type": "sha1", |
| "iso_url": "http://ftp.fi.muni.cz/pub/linux/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1503.iso", |
| "ssh_username": "{{user `user`}}", |
| "ssh_password": "{{user `password`}}", |
| "ssh_port": 22, |
| "ssh_wait_timeout": "10000s", |
| "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", |
| "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", |
| "virtualbox_version_file": ".vbox_version", |
| "vboxmanage": [ |
| [ "modifyvm", "{{.Name}}", "--memory", "512" ], |
| [ "modifyvm", "{{.Name}}", "--cpus", "1" ] |
| ] |
| }, |
| { |
| "type": "qemu", |
| "vm_name": "{{ user `distro` }}-{{ timestamp }}", |
| "output_directory": "images/{{ user `distro` }}-{{ timestamp }}", |
| "format": "qcow2", |
| "accelerator": "kvm", |
| "disk_size": "{{ user `disk_size`}}", |
| "iso_checksum": "99e450fb1b22d2e528757653fcbf5fdc", |
| "iso_checksum_type": "md5", |
| "iso_url": "http://ftp.fi.muni.cz/pub/linux/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1503-01.iso", |
| "http_directory": "http", |
| "headless": false, |
| "ssh_username": "{{user `user`}}", |
| "ssh_password": "{{user `password`}}", |
| "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now", |
| "boot_wait": "2s", |
| "boot_command": [ |
| "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| ] |
| }, |
| { |
| "type": "vmware-iso", |
| "boot_command": [ |
| "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| ], |
| "boot_wait": "10s", |
| "disk_size": 40520, |
| "guest_os_type": "centos-64", |
| "http_directory": "http", |
| "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806", |
| "iso_checksum_type": "sha1", |
| "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso", |
| "ssh_username": "{{user `user`}}", |
| "ssh_password": "{{user `password`}}", |
| "ssh_port": 22, |
| "ssh_wait_timeout": "10000s", |
| "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", |
| "tools_upload_flavor": "linux", |
| "vmx_data": { |
| "memsize": "512", |
| "numvcpus": "1", |
| "cpuid.coresPerSocket": "1" |
| } |
| } |
| ] |
| } |