blob: 400a2376d6f53ebbdbb104d89b132a428509cd8c [file] [log] [blame]
Filip Pytloun7ae5c752016-01-15 13:48:38 +01001{
azvyagintsevd8f85232017-10-02 15:30:28 +03002 "variables": {
3 "user": "root",
4 "password": "ho5uo7Uome5d",
azvyagintsevd8f85232017-10-02 15:30:28 +03005 "distro": "ubuntu-16-04-x64",
azvyagintsev4053eb22018-03-29 16:21:51 +03006 "disk_size": "8000",
7 "ubuntu_baseurl": "https://mirror.mirantis.com/proposed/",
8 "saltstack_repo": "deb [arch=amd64] https://mirror.mirantis.com/proposed/saltstack-2016.3/xenial/ xenial main",
9 "do_api_token": "{{ env `DO_API_TOKEN` }}",
10 "image_name": "ubuntu-16-04-x64",
11 "os_username": "{{ env `OS_USERNAME` }}",
12 "os_password": "{{ env `OS_PASSWORD` }}",
13 "os_image": "7451fac0-0ce5-4d30-ae36-cd9a90e7948e",
14 "os_endpoint": "https://cloud-cz.bud.mirantis.net:5000/v2.0",
15 "os_zone": "mcp-mk",
16 "os_floating_ip_pool": "public",
17 "os_tenant": "26e4dd19485249608ee3685f254f3909",
18 "os_network": "772f8ca6-1f4a-4535-99d0-880d6ead9a82"
azvyagintsevd8f85232017-10-02 15:30:28 +030019 },
Filip Pytloun7ae5c752016-01-15 13:48:38 +010020 "provisioners": [
21 {
azvyagintsev4053eb22018-03-29 16:21:51 +030022 "environment_vars": [
23 "UBUNTU_BASEURL={{ user `ubuntu_baseurl` }}",
24 "SALTSTACK_GPG={{ user `saltstack_gpg` }}"
25 ],
Filip Pytloun7ae5c752016-01-15 13:48:38 +010026 "type": "shell",
27 "execute_command": "sh '{{.Path}}'",
28 "override": {
29 "virtualbox-iso": {
30 "scripts": [
31 "scripts/base.sh",
azvyagintsevc0d1b8a2018-03-22 19:05:03 +020032 "scripts/motd.sh",
Jakub Josef6bcf3862017-05-03 16:16:39 +020033 "scripts/salt.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030034 "scripts/network.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010035 "scripts/vagrant.sh",
36 "scripts/virtualbox.sh",
37 "scripts/security.sh",
38 "scripts/cleanup.sh",
39 "scripts/zerodisk.sh"
40 ]
41 },
42 "vmware-iso": {
43 "scripts": [
44 "scripts/base.sh",
azvyagintsevc0d1b8a2018-03-22 19:05:03 +020045 "scripts/motd.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010046 "scripts/salt.sh",
47 "scripts/vmware.sh",
48 "scripts/security.sh",
49 "scripts/cleanup.sh",
50 "scripts/zerodisk.sh"
51 ]
52 },
azvyagintsevd8f85232017-10-02 15:30:28 +030053 "qemu": {
Filip Pytloun7ae5c752016-01-15 13:48:38 +010054 "scripts": [
55 "scripts/base.sh",
azvyagintsevc0d1b8a2018-03-22 19:05:03 +020056 "scripts/motd.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030057 "scripts/salt.sh",
Jakub Josef6bcf3862017-05-03 16:16:39 +020058 "scripts/network.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010059 "scripts/security.sh",
60 "scripts/cleanup.sh",
azvyagintsev4053eb22018-03-29 16:21:51 +030061 "scripts/info.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010062 "scripts/zerodisk.sh"
63 ]
azvyagintsevd8f85232017-10-02 15:30:28 +030064 },
azvyagintsev4053eb22018-03-29 16:21:51 +030065 "openstack": {
66 "scripts": [
67 "scripts/base.sh",
68 "scripts/motd.sh",
69 "scripts/salt.sh",
70 "scripts/network.sh",
71 "scripts/security.sh",
72 "scripts/cleanup.sh",
73 "scripts/info.sh"
74 ]
75 },
azvyagintsevd8f85232017-10-02 15:30:28 +030076 "docker": {
Filip Pytloun7ae5c752016-01-15 13:48:38 +010077 "scripts": [
78 "scripts/docker.sh",
79 "scripts/base.sh",
azvyagintsevc0d1b8a2018-03-22 19:05:03 +020080 "scripts/motd.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030081 "scripts/salt.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010082 "scripts/cleanup.sh"
83 ]
azvyagintsevd8f85232017-10-02 15:30:28 +030084 },
85 "digitalocean": {
86 "scripts": [
87 "scripts/base.sh",
azvyagintsevc0d1b8a2018-03-22 19:05:03 +020088 "scripts/motd.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030089 "scripts/salt.sh",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010090 "scripts/security.sh",
azvyagintsevd8f85232017-10-02 15:30:28 +030091 "scripts/cleanup.sh"
92 ]
93 }
Filip Pytloun7ae5c752016-01-15 13:48:38 +010094 }
95 },
96 {
97 "type": "file",
alexz5b795142018-02-13 15:59:28 +010098 "source": "files/etc/cloud/cloud.cfg.d/99_tcp.cfg",
Filip Pytloun7ae5c752016-01-15 13:48:38 +010099 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
100 },
101 {
102 "type": "file",
alexz5b795142018-02-13 15:59:28 +0100103 "source": "files/etc/cloud/cloud.cfg",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100104 "destination": "/etc/cloud/cloud.cfg"
105 }
106 ],
107 "post-processors": [
108 {
109 "type": "vagrant",
110 "keep_input_artifact": true,
Filip Pytloun451bc982017-03-13 16:21:24 +0100111 "output": "images/{{ user `distro` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
azvyagintsevd8f85232017-10-02 15:30:28 +0300112 "except": [
113 "digitalocean",
114 "docker"
115 ]
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100116 },
117 {
118 "type": "docker-tag",
Filip Pytlounc2b0ca02016-06-09 16:26:30 +0200119 "repository": "tcpcloud/ubuntu",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100120 "tag": "16.04",
azvyagintsevd8f85232017-10-02 15:30:28 +0300121 "only": [
122 "docker"
123 ]
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100124 },
125 {
126 "type": "docker-save",
Filip Pytloun451bc982017-03-13 16:21:24 +0100127 "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601021504\" }}.tar",
azvyagintsevd8f85232017-10-02 15:30:28 +0300128 "only": [
129 "docker"
130 ]
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100131 }
132 ],
133 "builders": [
134 {
135 "type": "virtualbox-iso",
136 "boot_command": [
137 "<esc><wait>",
138 "<esc><wait>",
139 "<enter><wait>",
140 "/install/vmlinuz<wait>",
141 " auto<wait>",
142 " console-setup/ask_detect=false<wait>",
143 " console-setup/layoutcode=us<wait>",
144 " console-setup/modelcode=pc105<wait>",
145 " debconf/frontend=noninteractive<wait>",
146 " debian-installer=en_US<wait>",
147 " fb=false<wait>",
148 " initrd=/install/initrd.gz<wait>",
149 " kbd-chooser/method=us<wait>",
150 " keyboard-configuration/layout=USA<wait>",
151 " keyboard-configuration/variant=USA<wait>",
152 " passwd/root-password={{user `password`}} ",
153 " passwd/root-password-again={{user `password`}} ",
154 " locale=en_US<wait>",
155 " netcfg/get_hostname=ubuntu-1604<wait>",
156 " netcfg/get_domain=cloudlab.cz<wait>",
157 " noapic<wait>",
158 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
159 " -- <wait>",
160 "<enter><wait>"
161 ],
162 "boot_wait": "5s",
163 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100164 "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100165 "guest_os_type": "Ubuntu_64",
166 "http_directory": "http",
Jakub Josefa59d0fb2017-09-04 13:26:15 +0200167 "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100168 "iso_checksum_type": "md5",
Jakub Josefa59d0fb2017-09-04 13:26:15 +0200169 "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100170 "ssh_username": "{{user `user`}}",
171 "ssh_password": "{{user `password`}}",
172 "ssh_port": 22,
173 "ssh_wait_timeout": "10000s",
174 "shutdown_command": "shutdown -P now",
175 "headless": true,
176 "vboxmanage": [
azvyagintsevd8f85232017-10-02 15:30:28 +0300177 [
178 "modifyvm",
179 "{{.Name}}",
180 "--memory",
181 "1024"
182 ],
183 [
184 "modifyvm",
185 "{{.Name}}",
186 "--cpus",
187 "2"
188 ],
189 [
190 "modifyvm",
191 "{{.Name}}",
192 "--vrde",
193 "on"
194 ],
195 [
196 "modifyvm",
197 "{{.Name}}",
198 "--vrdeport",
199 "5000-5050"
200 ],
201 [
202 "modifyvm",
203 "{{.Name}}",
204 "--vrdeaddress",
205 "127.0.0.1"
206 ]
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100207 ]
208 },
209 {
210 "type": "vmware-iso",
211 "boot_command": [
212 "<esc><wait>",
213 "<esc><wait>",
214 "<enter><wait>",
215 "/install/vmlinuz<wait>",
216 " auto<wait>",
217 " console-setup/ask_detect=false<wait>",
218 " console-setup/layoutcode=us<wait>",
219 " console-setup/modelcode=pc105<wait>",
220 " debconf/frontend=noninteractive<wait>",
221 " debian-installer=en_US<wait>",
222 " fb=false<wait>",
223 " initrd=/install/initrd.gz<wait>",
224 " kbd-chooser/method=us<wait>",
225 " keyboard-configuration/layout=USA<wait>",
226 " keyboard-configuration/variant=USA<wait>",
227 " passwd/root-password={{user `password`}} ",
228 " passwd/root-password-again={{user `password`}} ",
229 " locale=en_US<wait>",
230 " netcfg/get_hostname=ubuntu-1604<wait>",
231 " netcfg/get_domain=changeme<wait>",
232 " noapic<wait>",
233 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
234 " -- <wait>",
235 "<enter><wait>"
236 ],
237 "boot_wait": "5s",
238 "disk_size": "{{ user `disk_size`}}",
239 "disk_type_id": 4,
240 "vmdk_name": "{{ user `distro`}}",
Filip Pytloun451bc982017-03-13 16:21:24 +0100241 "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100242 "guest_os_type": "linux",
243 "http_directory": "http",
Jakub Josefd65a5fb2017-09-04 16:03:17 +0200244 "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100245 "iso_checksum_type": "md5",
Jakub Josefd65a5fb2017-09-04 16:03:17 +0200246 "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100247 "ssh_username": "{{user `user`}}",
248 "ssh_password": "{{user `password`}}",
249 "ssh_port": 22,
250 "ssh_wait_timeout": "10000s",
251 "shutdown_command": "shutdown -P now",
252 "vmx_data": {
253 "memsize": "1024",
254 "numvcpus": "1",
255 "cpuid.coresPerSocket": "1"
256 }
257 },
258 {
azvyagintsev4053eb22018-03-29 16:21:51 +0300259 "type": "docker",
260 "image": "ubuntu:16.04",
261 "commit": true
262 },
263 {
264 "type": "digitalocean",
265 "api_token": "{{user `do_api_token`}}",
266 "image": "{{user `distro`}}",
267 "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
268 "region": "ams2",
269 "size": "1gb"
270 },
271 {
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100272 "type": "qemu",
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100273 "qemuargs": [
alexz5b795142018-02-13 15:59:28 +0100274 [ "-m", "1024M" ],
275 [ "-fda", "config-drive/cloudata.iso" ]
Filip Pytloun56cf9e32016-02-19 09:56:08 +0100276 ],
azvyagintsev4053eb22018-03-29 16:21:51 +0300277 "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
278 "output_directory": "images/{{ user `image_name` }}-qemu-{{ isotime \"200601021504\" }}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100279 "format": "qcow2",
Richard Felkla5a44262018-03-12 15:11:32 +0100280 "iso_checksum": "566efef1d6f12e7d3a994c2405bdb642",
alexz5b795142018-02-13 15:59:28 +0100281 "iso_checksum_type": "md5",
alexz8c4cfc72018-03-23 13:56:10 +0100282 "iso_url": "http://cloud-images.ubuntu.com/releases/xenial/release-20180306/ubuntu-16.04-server-cloudimg-amd64-disk1.img",
alexz5b795142018-02-13 15:59:28 +0100283 "disk_image": true,
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100284 "accelerator": "kvm",
285 "disk_size": "{{ user `disk_size`}}",
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100286 "headless": true,
287 "ssh_username": "{{user `user`}}",
288 "ssh_password": "{{user `password`}}",
289 "shutdown_command": "shutdown -P now",
290 "boot_wait": "2s",
alexz5b795142018-02-13 15:59:28 +0100291 "ssh_wait_timeout": "360s"
azvyagintsevd8f85232017-10-02 15:30:28 +0300292 },
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100293 {
azvyagintsev4053eb22018-03-29 16:21:51 +0300294 "type": "openstack",
295 "ssh_username": "{{user `user`}}",
296 "ssh_password": "{{user `password`}}",
297 "image_name": "{{user `image_name`}}",
298 "floating_ip_pool": "{{user `os_floating_ip_pool`}}",
299 "reuse_ips": "true",
300 "source_image": "{{ user `os_image` }}",
301 "flavor": "{{ user `os_flavor` }}",
302 "user_data_file": "config-drive/user-data.yaml",
303 "tenant_id": "{{ user `os_tenant` }}",
304 "networks": ["{{ user `os_network` }}"],
305 "availability_zone": "{{user `os_zone`}}",
306 "identity_endpoint": "{{user `os_endpoint`}}",
307 "username": "{{user `os_username`}}",
308 "password": "{{user `os_password`}}"
Filip Pytloun7ae5c752016-01-15 13:48:38 +0100309 }
310 ]
alexz5b795142018-02-13 15:59:28 +0100311}