blob: d0047b9321c5b072b8ff93983b75c995d212a48e [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",
Jiri Broulik0b211672018-04-11 09:35:47 +02007 "image_name": "{{ env `IMAGE_NAME` }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +01008 "disk_size": "8000"
9 },
10 "provisioners": [
11 {
12 "type": "shell",
13 "execute_command": "sh '{{.Path}}'",
14 "override": {
15 "virtualbox-iso": {
16 "scripts": [
17 "scripts/base.sh",
18 "scripts/salt.sh",
19 "scripts/vagrant.sh",
20 "scripts/virtualbox.sh",
21 "scripts/security.sh",
22 "scripts/cleanup.sh",
23 "scripts/zerodisk.sh"
24 ]
25 },
26 "vmware-iso": {
27 "scripts": [
28 "scripts/base.sh",
29 "scripts/salt.sh",
30 "scripts/vmware.sh",
31 "scripts/security.sh",
32 "scripts/cleanup.sh",
33 "scripts/zerodisk.sh"
34 ]
35 },
36 "qemu": {
37 "scripts": [
38 "scripts/base.sh",
39 "scripts/salt.sh",
40 "scripts/security.sh",
41 "scripts/cleanup.sh",
42 "scripts/zerodisk.sh"
43 ]
Filip Pytloun9c35d482016-02-16 14:43:50 +010044 },
45 "docker": {
46 "scripts": [
47 "scripts/docker.sh",
48 "scripts/base.sh",
49 "scripts/salt.sh",
50 "scripts/cleanup.sh"
51 ]
Filip Pytlouna20f9e22016-02-16 13:07:03 +010052 }
53 }
Filip Pytloun669bdad2016-02-19 16:20:11 +010054 },
55 {
56 "type": "file",
Filip Pytloun669bdad2016-02-19 16:20:11 +010057 "source": "configs/cloud/cloud.cfg",
58 "destination": "/etc/cloud/cloud.cfg"
Filip Pytlouna20f9e22016-02-16 13:07:03 +010059 }
60 ],
61 "post-processors": [
62 {
63 "type": "vagrant",
64 "keep_input_artifact": true,
Jiri Broulik0b211672018-04-11 09:35:47 +020065 "output": "images/{{ user `image_name` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
Filip Pytloun85822d32016-02-16 14:52:51 +010066 "except": [ "docker" ]
Filip Pytloun0648fca2016-02-16 14:30:50 +010067 },
68 {
69 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +020070 "repository": "tcpcloud/centos",
Filip Pytloun0648fca2016-02-16 14:30:50 +010071 "tag": "7",
72 "only": ["docker"]
73 },
74 {
75 "type": "docker-save",
Jiri Broulik0b211672018-04-11 09:35:47 +020076 "path": "images/{{ user `image_name` }}-docker-{{ isotime \"200601021504\" }}.tar",
Filip Pytloun0648fca2016-02-16 14:30:50 +010077 "only": ["docker"]
Filip Pytlouna20f9e22016-02-16 13:07:03 +010078 }
79 ],
80 "builders": [
81 {
82 "type": "virtualbox-iso",
83 "boot_command": [
84 "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
85 ],
86 "boot_wait": "10s",
87 "disk_size": 5020,
Filip Pytloun451bc982017-03-13 16:21:24 +010088 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +010089 "guest_os_type": "RedHat_64",
90 "http_directory": "http",
91 "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67",
92 "iso_checksum_type": "sha1",
93 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
94 "ssh_username": "{{user `user`}}",
95 "ssh_password": "{{user `password`}}",
96 "ssh_port": 22,
97 "ssh_wait_timeout": "10000s",
98 "shutdown_command": "shutdown -P now",
99 "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
100 "virtualbox_version_file": ".vbox_version",
101 "vboxmanage": [
Jiri Konecny05b89462016-02-18 16:38:32 +0100102 [ "modifyvm", "{{.Name}}", "--memory", "1024" ],
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100103 [ "modifyvm", "{{.Name}}", "--cpus", "1" ]
104 ]
105 },
106 {
107 "type": "qemu",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100108 "qemuargs": [
109 [ "-m", "1024M" ]
110 ],
Jiri Broulik0b211672018-04-11 09:35:47 +0200111 "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100112 "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100113 "format": "qcow2",
114 "accelerator": "kvm",
115 "disk_size": "{{ user `disk_size`}}",
116 "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67",
117 "iso_checksum_type": "md5",
118 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
119 "http_directory": "http",
120 "headless": true,
121 "ssh_username": "{{user `user`}}",
122 "ssh_password": "{{user `password`}}",
123 "ssh_wait_timeout": "10000s",
124 "shutdown_command": "shutdown -P now",
125 "boot_wait": "2s",
126 "boot_command": [
127 "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
128 ]
129 },
130 {
Filip Pytloun0648fca2016-02-16 14:30:50 +0100131 "type": "docker",
132 "image": "centos:7",
133 "commit": true
134 },
135 {
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100136 "type": "vmware-iso",
137 "boot_command": [
138 "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
139 ],
140 "boot_wait": "10s",
141 "disk_size": 40520,
Filip Pytloun451bc982017-03-13 16:21:24 +0100142 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}",
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100143 "guest_os_type": "centos-64",
144 "http_directory": "http",
145 "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806",
146 "iso_checksum_type": "sha1",
147 "iso_url": "http://ftp.cvut.cz/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
148 "ssh_username": "{{user `user`}}",
149 "ssh_password": "{{user `password`}}",
150 "ssh_port": 22,
151 "ssh_wait_timeout": "10000s",
152 "shutdown_command": "shutdown -P now",
153 "tools_upload_flavor": "linux",
154 "vmx_data": {
Filip Pytlouncfb10d72016-02-18 18:33:31 +0100155 "memsize": "1024",
Filip Pytlouna20f9e22016-02-16 13:07:03 +0100156 "numvcpus": "1",
157 "cpuid.coresPerSocket": "1"
158 }
159 }
160 ]
161}