blob: 1204a48813172eb2fa4cbe4387ca1bb94dd6c3ae [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 }
53 }
54 ],
55 "post-processors": [
56 {
57 "type": "vagrant",
58 "keep_input_artifact": true,
Filip Pytloun85822d32016-02-16 14:52:51 +010059 "output": "images/{{ user `distro` }}-{{.Provider}}-{{ timestamp }}.box",
60 "except": [ "docker" ]
Filip Pytloun0648fca2016-02-16 14:30:50 +010061 },
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 Pytlouna20f9e22016-02-16 13:07:03 +010072 }
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 Pytloun0648fca2016-02-16 14:30:50 +010082 "output_directory": "images/{{ user `distro` }}-vbox-{{ timestamp }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +010083 "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": [
96 [ "modifyvm", "{{.Name}}", "--memory", "512" ],
97 [ "modifyvm", "{{.Name}}", "--cpus", "1" ]
98 ]
99 },
100 {
101 "type": "qemu",
102 "vm_name": "{{ user `distro` }}-{{ timestamp }}",
Filip Pytloun0648fca2016-02-16 14:30:50 +0100103 "output_directory": "images/{{ user `distro` }}-qemu-{{ timestamp }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100104 "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 Pytloun0648fca2016-02-16 14:30:50 +0100122 "type": "docker",
123 "image": "centos:7",
124 "commit": true
125 },
126 {
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100127 "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 Pytloun0648fca2016-02-16 14:30:50 +0100133 "output_directory": "images/{{ user `distro` }}-vmware-{{ timestamp }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100134 "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": {
146 "memsize": "512",
147 "numvcpus": "1",
148 "cpuid.coresPerSocket": "1"
149 }
150 }
151 ]
152}