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