Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
| 3 | "user": "root", |
| 4 | "password": "ho5uo7Uome5d", |
| 5 | "do_api_token": "{{ env `DO_API_TOKEN` }}", |
Filip Pytloun | 9f6608e | 2016-02-16 16:04:29 +0100 | [diff] [blame] | 6 | "distro": "centos-7-x64", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 7 | "disk_size": "8000" |
| 8 | }, |
| 9 | "provisioners": [ |
| 10 | { |
| 11 | "type": "shell", |
| 12 | "execute_command": "sh '{{.Path}}'", |
| 13 | "override": { |
| 14 | "virtualbox-iso": { |
| 15 | "scripts": [ |
| 16 | "scripts/base.sh", |
| 17 | "scripts/salt.sh", |
| 18 | "scripts/vagrant.sh", |
| 19 | "scripts/virtualbox.sh", |
| 20 | "scripts/security.sh", |
| 21 | "scripts/cleanup.sh", |
| 22 | "scripts/zerodisk.sh" |
| 23 | ] |
| 24 | }, |
| 25 | "vmware-iso": { |
| 26 | "scripts": [ |
| 27 | "scripts/base.sh", |
| 28 | "scripts/salt.sh", |
| 29 | "scripts/vmware.sh", |
| 30 | "scripts/security.sh", |
| 31 | "scripts/cleanup.sh", |
| 32 | "scripts/zerodisk.sh" |
| 33 | ] |
| 34 | }, |
| 35 | "qemu": { |
| 36 | "scripts": [ |
| 37 | "scripts/base.sh", |
| 38 | "scripts/salt.sh", |
| 39 | "scripts/security.sh", |
| 40 | "scripts/cleanup.sh", |
| 41 | "scripts/zerodisk.sh" |
| 42 | ] |
Filip Pytloun | 9c35d48 | 2016-02-16 14:43:50 +0100 | [diff] [blame] | 43 | }, |
| 44 | "docker": { |
| 45 | "scripts": [ |
| 46 | "scripts/docker.sh", |
| 47 | "scripts/base.sh", |
| 48 | "scripts/salt.sh", |
| 49 | "scripts/cleanup.sh" |
| 50 | ] |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 51 | } |
| 52 | } |
| 53 | } |
| 54 | ], |
| 55 | "post-processors": [ |
| 56 | { |
| 57 | "type": "vagrant", |
| 58 | "keep_input_artifact": true, |
Filip Pytloun | 85822d3 | 2016-02-16 14:52:51 +0100 | [diff] [blame] | 59 | "output": "images/{{ user `distro` }}-{{.Provider}}-{{ timestamp }}.box", |
| 60 | "except": [ "docker" ] |
Filip Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 61 | }, |
| 62 | { |
| 63 | "type": "docker-tag", |
| 64 | "repository": "cloudlab/centos", |
| 65 | "tag": "7", |
| 66 | "only": ["docker"] |
| 67 | }, |
| 68 | { |
| 69 | "type": "docker-save", |
| 70 | "path": "images/{{ user `distro` }}-docker-{{ timestamp }}.tar", |
| 71 | "only": ["docker"] |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 72 | } |
| 73 | ], |
| 74 | "builders": [ |
| 75 | { |
| 76 | "type": "virtualbox-iso", |
| 77 | "boot_command": [ |
| 78 | "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| 79 | ], |
| 80 | "boot_wait": "10s", |
| 81 | "disk_size": 5020, |
Filip Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 82 | "output_directory": "images/{{ user `distro` }}-vbox-{{ timestamp }}", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 83 | "guest_os_type": "RedHat_64", |
| 84 | "http_directory": "http", |
| 85 | "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67", |
| 86 | "iso_checksum_type": "sha1", |
| 87 | "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso", |
| 88 | "ssh_username": "{{user `user`}}", |
| 89 | "ssh_password": "{{user `password`}}", |
| 90 | "ssh_port": 22, |
| 91 | "ssh_wait_timeout": "10000s", |
| 92 | "shutdown_command": "shutdown -P now", |
| 93 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", |
| 94 | "virtualbox_version_file": ".vbox_version", |
| 95 | "vboxmanage": [ |
Jiri Konecny | 05b8946 | 2016-02-18 16:38:32 +0100 | [diff] [blame] | 96 | [ "modifyvm", "{{.Name}}", "--memory", "1024" ], |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 97 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] |
| 98 | ] |
| 99 | }, |
| 100 | { |
| 101 | "type": "qemu", |
| 102 | "vm_name": "{{ user `distro` }}-{{ timestamp }}", |
Filip Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 103 | "output_directory": "images/{{ user `distro` }}-qemu-{{ timestamp }}", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 104 | "format": "qcow2", |
| 105 | "accelerator": "kvm", |
| 106 | "disk_size": "{{ user `disk_size`}}", |
| 107 | "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67", |
| 108 | "iso_checksum_type": "md5", |
| 109 | "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso", |
| 110 | "http_directory": "http", |
| 111 | "headless": true, |
| 112 | "ssh_username": "{{user `user`}}", |
| 113 | "ssh_password": "{{user `password`}}", |
| 114 | "ssh_wait_timeout": "10000s", |
| 115 | "shutdown_command": "shutdown -P now", |
| 116 | "boot_wait": "2s", |
| 117 | "boot_command": [ |
| 118 | "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| 119 | ] |
| 120 | }, |
| 121 | { |
Filip Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 122 | "type": "docker", |
| 123 | "image": "centos:7", |
| 124 | "commit": true |
| 125 | }, |
| 126 | { |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 127 | "type": "vmware-iso", |
| 128 | "boot_command": [ |
| 129 | "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>" |
| 130 | ], |
| 131 | "boot_wait": "10s", |
| 132 | "disk_size": 40520, |
Filip Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 133 | "output_directory": "images/{{ user `distro` }}-vmware-{{ timestamp }}", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 134 | "guest_os_type": "centos-64", |
| 135 | "http_directory": "http", |
| 136 | "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806", |
| 137 | "iso_checksum_type": "sha1", |
| 138 | "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso", |
| 139 | "ssh_username": "{{user `user`}}", |
| 140 | "ssh_password": "{{user `password`}}", |
| 141 | "ssh_port": 22, |
| 142 | "ssh_wait_timeout": "10000s", |
| 143 | "shutdown_command": "shutdown -P now", |
| 144 | "tools_upload_flavor": "linux", |
| 145 | "vmx_data": { |
Filip Pytloun | cfb10d7 | 2016-02-18 18:33:31 +0100 | [diff] [blame] | 146 | "memsize": "1024", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 147 | "numvcpus": "1", |
| 148 | "cpuid.coresPerSocket": "1" |
| 149 | } |
| 150 | } |
| 151 | ] |
| 152 | } |