blob: 50f1b532d43cdf2a8bf204f4ac5b90f3b43bd2cc [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` }}",
Filip Pytloun9f6608e2016-02-16 16:04:29 +01006 "distro": "centos-7-x64",
Filip Pytlouna20f9e22016-02-16 13:07:03 +01007 "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 Pytloun9c35d482016-02-16 14:43:50 +010043 },
44 "docker": {
45 "scripts": [
46 "scripts/docker.sh",
47 "scripts/base.sh",
48 "scripts/salt.sh",
49 "scripts/cleanup.sh"
50 ]
Filip Pytlouna20f9e22016-02-16 13:07:03 +010051 }
52 }
Filip Pytloun669bdad2016-02-19 16:20:11 +010053 },
54 {
55 "type": "file",
Filip Pytloun669bdad2016-02-19 16:20:11 +010056 "source": "configs/cloud/cloud.cfg",
57 "destination": "/etc/cloud/cloud.cfg"
Filip Pytlouna20f9e22016-02-16 13:07:03 +010058 }
59 ],
60 "post-processors": [
61 {
62 "type": "vagrant",
63 "keep_input_artifact": true,
Filip Pytloun4fc6b682016-08-23 11:04:17 +020064 "output": "images/{{ user `distro` }}-{{.Provider}}-{{ isotime \"200601020304\" }}.box",
Filip Pytloun85822d32016-02-16 14:52:51 +010065 "except": [ "docker" ]
Filip Pytloun0648fca2016-02-16 14:30:50 +010066 },
67 {
68 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +020069 "repository": "tcpcloud/centos",
Filip Pytloun0648fca2016-02-16 14:30:50 +010070 "tag": "7",
71 "only": ["docker"]
72 },
73 {
74 "type": "docker-save",
Filip Pytloun4fc6b682016-08-23 11:04:17 +020075 "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601020304\" }}.tar",
Filip Pytloun0648fca2016-02-16 14:30:50 +010076 "only": ["docker"]
Filip Pytlouna20f9e22016-02-16 13:07:03 +010077 }
78 ],
79 "builders": [
80 {
81 "type": "virtualbox-iso",
82 "boot_command": [
83 "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
84 ],
85 "boot_wait": "10s",
86 "disk_size": 5020,
Filip Pytloun4fc6b682016-08-23 11:04:17 +020087 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601020304\" }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +010088 "guest_os_type": "RedHat_64",
89 "http_directory": "http",
90 "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67",
91 "iso_checksum_type": "sha1",
92 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
93 "ssh_username": "{{user `user`}}",
94 "ssh_password": "{{user `password`}}",
95 "ssh_port": 22,
96 "ssh_wait_timeout": "10000s",
97 "shutdown_command": "shutdown -P now",
98 "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
99 "virtualbox_version_file": ".vbox_version",
100 "vboxmanage": [
Jiri Konecny05b89462016-02-18 16:38:32 +0100101 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100102 [ "modifyvm", "{{.Name}}", "--cpus", "1" ]
103 ]
104 },
105 {
106 "type": "qemu",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100107 "qemuargs": [
108 [ "-m", "1024M" ]
109 ],
Filip Pytloun4fc6b682016-08-23 11:04:17 +0200110 "vm_name": "{{ user `distro` }}-{{ isotime \"200601020304\" }}",
111 "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601020304\" }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100112 "format": "qcow2",
113 "accelerator": "kvm",
114 "disk_size": "{{ user `disk_size`}}",
115 "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67",
116 "iso_checksum_type": "md5",
117 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
118 "http_directory": "http",
119 "headless": true,
120 "ssh_username": "{{user `user`}}",
121 "ssh_password": "{{user `password`}}",
122 "ssh_wait_timeout": "10000s",
123 "shutdown_command": "shutdown -P now",
124 "boot_wait": "2s",
125 "boot_command": [
126 "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
127 ]
128 },
129 {
Filip Pytloun0648fca2016-02-16 14:30:50 +0100130 "type": "docker",
131 "image": "centos:7",
132 "commit": true
133 },
134 {
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100135 "type": "vmware-iso",
136 "boot_command": [
137 "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
138 ],
139 "boot_wait": "10s",
140 "disk_size": 40520,
Filip Pytloun4fc6b682016-08-23 11:04:17 +0200141 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601020304\" }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100142 "guest_os_type": "centos-64",
143 "http_directory": "http",
144 "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806",
145 "iso_checksum_type": "sha1",
146 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
147 "ssh_username": "{{user `user`}}",
148 "ssh_password": "{{user `password`}}",
149 "ssh_port": 22,
150 "ssh_wait_timeout": "10000s",
151 "shutdown_command": "shutdown -P now",
152 "tools_upload_flavor": "linux",
153 "vmx_data": {
Filip Pytlouncfb10d72016-02-18 18:33:31 +0100154 "memsize": "1024",
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100155 "numvcpus": "1",
156 "cpuid.coresPerSocket": "1"
157 }
158 }
159 ]
160}