Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
| 3 | "user": "root", |
| 4 | "password": "ho5uo7Uome5d", |
| 5 | "do_api_token": "{{ env `DO_API_TOKEN` }}", |
Filip Pytloun | 9f6608e | 2016-02-16 16:04:29 +0100 | [diff] [blame] | 6 | "distro": "centos-7-x64", |
Jiri Broulik | 0b21167 | 2018-04-11 09:35:47 +0200 | [diff] [blame] | 7 | "image_name": "{{ env `IMAGE_NAME` }}", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 8 | "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 Pytloun | 9c35d48 | 2016-02-16 14:43:50 +0100 | [diff] [blame] | 44 | }, |
| 45 | "docker": { |
| 46 | "scripts": [ |
| 47 | "scripts/docker.sh", |
| 48 | "scripts/base.sh", |
| 49 | "scripts/salt.sh", |
| 50 | "scripts/cleanup.sh" |
| 51 | ] |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 52 | } |
| 53 | } |
Filip Pytloun | 669bdad | 2016-02-19 16:20:11 +0100 | [diff] [blame] | 54 | }, |
| 55 | { |
| 56 | "type": "file", |
Filip Pytloun | 669bdad | 2016-02-19 16:20:11 +0100 | [diff] [blame] | 57 | "source": "configs/cloud/cloud.cfg", |
| 58 | "destination": "/etc/cloud/cloud.cfg" |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 59 | } |
| 60 | ], |
| 61 | "post-processors": [ |
| 62 | { |
| 63 | "type": "vagrant", |
| 64 | "keep_input_artifact": true, |
Jiri Broulik | 0b21167 | 2018-04-11 09:35:47 +0200 | [diff] [blame] | 65 | "output": "images/{{ user `image_name` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box", |
Filip Pytloun | 85822d3 | 2016-02-16 14:52:51 +0100 | [diff] [blame] | 66 | "except": [ "docker" ] |
Filip Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 67 | }, |
| 68 | { |
| 69 | "type": "docker-tag", |
Filip Pytloun | c2b0ca0 | 2016-06-09 16:26:30 +0200 | [diff] [blame] | 70 | "repository": "tcpcloud/centos", |
Filip Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 71 | "tag": "7", |
| 72 | "only": ["docker"] |
| 73 | }, |
| 74 | { |
| 75 | "type": "docker-save", |
Jiri Broulik | 0b21167 | 2018-04-11 09:35:47 +0200 | [diff] [blame] | 76 | "path": "images/{{ user `image_name` }}-docker-{{ isotime \"200601021504\" }}.tar", |
Filip Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 77 | "only": ["docker"] |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 78 | } |
| 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 Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 88 | "output_directory": "images/{{ user `distro` }}-vbox-{{ isotime \"200601021504\" }}", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 89 | "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 Konecny | 05b8946 | 2016-02-18 16:38:32 +0100 | [diff] [blame] | 102 | [ "modifyvm", "{{.Name}}", "--memory", "1024" ], |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 103 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] |
| 104 | ] |
| 105 | }, |
| 106 | { |
| 107 | "type": "qemu", |
Filip Pytloun | 56cf9e3 | 2016-02-19 09:56:08 +0100 | [diff] [blame] | 108 | "qemuargs": [ |
| 109 | [ "-m", "1024M" ] |
| 110 | ], |
Jiri Broulik | 0b21167 | 2018-04-11 09:35:47 +0200 | [diff] [blame] | 111 | "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}", |
Filip Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 112 | "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 113 | "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 Pytloun | 0648fca | 2016-02-16 14:30:50 +0100 | [diff] [blame] | 131 | "type": "docker", |
| 132 | "image": "centos:7", |
| 133 | "commit": true |
| 134 | }, |
| 135 | { |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 136 | "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 Pytloun | 451bc98 | 2017-03-13 16:21:24 +0100 | [diff] [blame] | 142 | "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\" }}", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 143 | "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 Pytloun | cfb10d7 | 2016-02-18 18:33:31 +0100 | [diff] [blame] | 155 | "memsize": "1024", |
Filip Pytloun | a20f9e2 | 2016-02-16 13:07:03 +0100 | [diff] [blame] | 156 | "numvcpus": "1", |
| 157 | "cpuid.coresPerSocket": "1" |
| 158 | } |
| 159 | } |
| 160 | ] |
| 161 | } |