| { |
| "variables": { |
| "user": "root", |
| "password": "ho5uo7Uome5d", |
| "do_api_token": "{{ env `DO_API_TOKEN` }}", |
| "distro": "centos-7-x64", |
| "image_name": "{{ env `IMAGE_NAME` }}", |
| "disk_size": "8000" |
| }, |
| "provisioners": [ |
| { |
| "type": "shell", |
| "execute_command": "sh '{{.Path}}'", |
| "override": { |
| "virtualbox-iso": { |
| "scripts": [ |
| "scripts/base.sh", |
| "scripts/salt.sh", |
| "scripts/vagrant.sh", |
| "scripts/virtualbox.sh", |
| "scripts/security.sh", |
| "scripts/cleanup.sh", |
| "scripts/zerodisk.sh" |
| ] |
| }, |
| "vmware-iso": { |
| "scripts": [ |
| "scripts/base.sh", |
| "scripts/salt.sh", |
| "scripts/vmware.sh", |
| "scripts/security.sh", |
| "scripts/cleanup.sh", |
| "scripts/zerodisk.sh" |
| ] |
| }, |
| "qemu": { |
| "scripts": [ |
| "scripts/base.sh", |
| "scripts/salt.sh", |
| "scripts/security.sh", |
| "scripts/cleanup.sh", |
| "scripts/zerodisk.sh" |
| ] |
| }, |
| "docker": { |
| "scripts": [ |
| "scripts/docker.sh", |
| "scripts/base.sh", |
| "scripts/salt.sh", |
| "scripts/cleanup.sh" |
| ] |
| } |
| } |
| }, |
| { |
| "type": "file", |
| "source": "configs/cloud/cloud.cfg", |
| "destination": "/etc/cloud/cloud.cfg" |
| } |
| ], |
| "post-processors": [ |
| { |
| "type": "vagrant", |
| "keep_input_artifact": true, |
| "output": "images/{{ user `image_name` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box", |
| "except": [ "docker" ] |
| }, |
| { |
| "type": "docker-tag", |
| "repository": "tcpcloud/centos", |
| "tag": "7", |
| "only": ["docker"] |
| }, |
| { |
| "type": "docker-save", |
| "path": "images/{{ user `image_name` }}-docker-{{ isotime \"200601021504\" }}.tar", |
| "only": ["docker"] |
| } |
| ], |
| "builders": [ |
| { |
| "type": "virtualbox-iso", |
| "boot_command": [ |
| "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| ], |
| "boot_wait": "10s", |
| "disk_size": 5020, |
| "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}", |
| "guest_os_type": "RedHat_64", |
| "http_directory": "http", |
| "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67", |
| "iso_checksum_type": "sha1", |
| "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso", |
| "ssh_username": "{{user `user`}}", |
| "ssh_password": "{{user `password`}}", |
| "ssh_port": 22, |
| "ssh_wait_timeout": "10000s", |
| "shutdown_command": "shutdown -P now", |
| "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", |
| "virtualbox_version_file": ".vbox_version", |
| "vboxmanage": [ |
| [ "modifyvm", "{{.Name}}", "--memory", "1024" ], |
| [ "modifyvm", "{{.Name}}", "--cpus", "1" ] |
| ] |
| }, |
| { |
| "type": "qemu", |
| "qemuargs": [ |
| [ "-m", "1024M" ] |
| ], |
| "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}", |
| "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}", |
| "format": "qcow2", |
| "accelerator": "kvm", |
| "disk_size": "{{ user `disk_size`}}", |
| "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67", |
| "iso_checksum_type": "md5", |
| "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso", |
| "http_directory": "http", |
| "headless": true, |
| "ssh_username": "{{user `user`}}", |
| "ssh_password": "{{user `password`}}", |
| "ssh_wait_timeout": "10000s", |
| "shutdown_command": "shutdown -P now", |
| "boot_wait": "2s", |
| "boot_command": [ |
| "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| ] |
| }, |
| { |
| "type": "docker", |
| "image": "centos:7", |
| "commit": true |
| }, |
| { |
| "type": "vmware-iso", |
| "boot_command": [ |
| "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| ], |
| "boot_wait": "10s", |
| "disk_size": 40520, |
| "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}", |
| "guest_os_type": "centos-64", |
| "http_directory": "http", |
| "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806", |
| "iso_checksum_type": "sha1", |
| "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso", |
| "ssh_username": "{{user `user`}}", |
| "ssh_password": "{{user `password`}}", |
| "ssh_port": 22, |
| "ssh_wait_timeout": "10000s", |
| "shutdown_command": "shutdown -P now", |
| "tools_upload_flavor": "linux", |
| "vmx_data": { |
| "memsize": "1024", |
| "numvcpus": "1", |
| "cpuid.coresPerSocket": "1" |
| } |
| } |
| ] |
| } |