blob: 47cf5de15a1eec4be28d8d1c92336bdc7179fc56 [file] [log] [blame]
Filip Pytlouna20f9e22016-02-16 13:07:03 +01001{
2 "variables": {
3 "user": "root",
4 "password": "ho5uo7Uome5d",
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": "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 ]
43 }
44 }
45 }
46 ],
47 "post-processors": [
48 {
49 "type": "vagrant",
50 "keep_input_artifact": true,
51 "output": "images/{{ user `distro` }}-{{.Provider}}-{{ timestamp }}.box"
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": "88c0437f0a14c6e2c94426df9d43cd67",
65 "iso_checksum_type": "sha1",
66 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
67 "ssh_username": "{{user `user`}}",
68 "ssh_password": "{{user `password`}}",
69 "ssh_port": 22,
70 "ssh_wait_timeout": "10000s",
71 "shutdown_command": "shutdown -P now",
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`}}",
86 "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67",
87 "iso_checksum_type": "md5",
88 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
89 "http_directory": "http",
90 "headless": true,
91 "ssh_username": "{{user `user`}}",
92 "ssh_password": "{{user `password`}}",
93 "ssh_wait_timeout": "10000s",
94 "shutdown_command": "shutdown -P now",
95 "boot_wait": "2s",
96 "boot_command": [
97 "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
98 ]
99 },
100 {
101 "type": "vmware-iso",
102 "boot_command": [
103 "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
104 ],
105 "boot_wait": "10s",
106 "disk_size": 40520,
107 "guest_os_type": "centos-64",
108 "http_directory": "http",
109 "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806",
110 "iso_checksum_type": "sha1",
111 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
112 "ssh_username": "{{user `user`}}",
113 "ssh_password": "{{user `password`}}",
114 "ssh_port": 22,
115 "ssh_wait_timeout": "10000s",
116 "shutdown_command": "shutdown -P now",
117 "tools_upload_flavor": "linux",
118 "vmx_data": {
119 "memsize": "512",
120 "numvcpus": "1",
121 "cpuid.coresPerSocket": "1"
122 }
123 }
124 ]
125}