├── .gitignore ├── LICENSE ├── README.rst ├── centos-6.4 ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh └── template.json ├── centos-6.5 ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh └── template.json ├── centos-6.6 ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh └── template.json ├── centos-6.7 ├── base.sh ├── cleanup.sh ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh ├── template.json ├── vagrant.sh ├── virtualbox.sh ├── vmware.sh └── zerodisk.sh ├── centos-7.0 ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh └── template.json ├── centos-7.1 ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh └── template.json ├── scientific-6.4 ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh └── template.json ├── scientific-6.5 ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh └── template.json ├── scientific-7.0 ├── http │ └── ks.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmware.sh │ └── zerodisk.sh └── template.json ├── ubuntu-12.04-docker ├── http │ └── preseed.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── docker.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh └── template.json ├── ubuntu-12.04 ├── http │ └── preseed.cfg ├── scripts │ ├── base.sh │ ├── cleanup.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh └── template.json └── ubuntu-14.04 ├── http └── preseed.cfg ├── scripts ├── base.sh ├── cleanup.sh ├── vagrant.sh ├── virtualbox.sh ├── vmware.sh └── zerodisk.sh └── template.json /.gitignore: -------------------------------------------------------------------------------- 1 | packer_cache 2 | *.box 3 | output-* 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ===================================== 2 | This repository has finished updating 3 | ===================================== 4 | 5 | Maybe you prefer official Ubuntu and CentOS vagrant boxes 6 | ========================================================= 7 | 8 | There are now official Ubuntu and CentOS vagrant boxes at `Vagrant Cloud `_. These boxes are regularly updated to have newer packages. 9 | If you don't need to build a customized box, maybe you can use those boxes instead of building boxes yourself using Packer and templates in this repository. 10 | 11 | * `ubuntu/trusty64 `_ 12 | * `ubuntu/trusty32 `_ 13 | * `centos/7 `_ 14 | -------------------------------------------------------------------------------- /centos-6.4/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /bin/sed -i -e 's/^mirrorlist=/#&/;s|^#baseurl=http://mirror.centos.org/centos/$releasever/|baseurl=http://vault.centos.org/6.4/|' /etc/yum.repos.d/CentOS-Base.repo 36 | /bin/sed -i -e 's/^enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf 37 | 38 | /usr/bin/yum -y install sudo 39 | /usr/sbin/groupadd -g 501 vagrant 40 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 41 | echo "vagrant"|passwd --stdin vagrant 42 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 43 | chmod 0440 /etc/sudoers.d/vagrant 44 | %end 45 | -------------------------------------------------------------------------------- /centos-6.4/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ \ 3 | http://vault.centos.org/6.4/os/x86_64/Packages/kernel-devel-`uname -r`.rpm \ 4 | perl 5 | 6 | -------------------------------------------------------------------------------- /centos-6.4/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /centos-6.4/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir -pm 700 /home/vagrant/.ssh 4 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 5 | chmod 0600 /home/vagrant/.ssh/authorized_keys 6 | chown -R vagrant:vagrant /home/vagrant/.ssh 7 | -------------------------------------------------------------------------------- /centos-6.4/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /centos-6.4/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /centos-6.4/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /centos-6.4/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "centos-6-4-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "centos-6-4-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "4a5fa01c81cc300f4729136e28ebe600", 50 | "iso_checksum_type": "md5", 51 | "iso_url": "http://archive.kernel.org/centos-vault/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "linux", 72 | "http_directory": "http", 73 | "iso_checksum": "4a5fa01c81cc300f4729136e28ebe600", 74 | "iso_checksum_type": "md5", 75 | "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /centos-6.5/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /usr/bin/yum -y install sudo 36 | /usr/sbin/groupadd -g 501 vagrant 37 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 38 | echo "vagrant"|passwd --stdin vagrant 39 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 40 | chmod 0440 /etc/sudoers.d/vagrant 41 | %end 42 | -------------------------------------------------------------------------------- /centos-6.5/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /centos-6.5/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /centos-6.5/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir -pm 700 /home/vagrant/.ssh 4 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 5 | chmod 0600 /home/vagrant/.ssh/authorized_keys 6 | chown -R vagrant:vagrant /home/vagrant/.ssh 7 | -------------------------------------------------------------------------------- /centos-6.5/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /centos-6.5/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /centos-6.5/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /centos-6.5/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "centos-6-5-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "centos-6-5-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "f21a71e8e31df73297bdd1ccd4a64a36831284bd", 50 | "iso_checksum_type": "sha1", 51 | "iso_url": "http://archive.kernel.org/centos-vault/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "centos-64", 72 | "http_directory": "http", 73 | "iso_checksum": "f21a71e8e31df73297bdd1ccd4a64a36831284bd", 74 | "iso_checksum_type": "sha1", 75 | "iso_url": "http://archive.kernel.org/centos-vault/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /centos-6.6/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /usr/bin/yum -y install sudo 36 | /usr/sbin/groupadd -g 501 vagrant 37 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 38 | echo "vagrant"|passwd --stdin vagrant 39 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 40 | chmod 0440 /etc/sudoers.d/vagrant 41 | %end 42 | -------------------------------------------------------------------------------- /centos-6.6/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /centos-6.6/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /centos-6.6/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir -pm 700 /home/vagrant/.ssh 4 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 5 | chmod 0600 /home/vagrant/.ssh/authorized_keys 6 | chown -R vagrant:vagrant /home/vagrant/.ssh 7 | -------------------------------------------------------------------------------- /centos-6.6/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /centos-6.6/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /centos-6.6/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /centos-6.6/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "centos-6-6-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "centos-6-6-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "4ed6c56d365bd3ab12cd88b8a480f4a62e7c66d2", 50 | "iso_checksum_type": "sha1", 51 | "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/6.6/isos/x86_64/CentOS-6.6-x86_64-minimal.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "RedHat_64", 72 | "http_directory": "http", 73 | "iso_checksum": "4ed6c56d365bd3ab12cd88b8a480f4a62e7c66d2", 74 | "iso_checksum_type": "sha1", 75 | "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/6.6/isos/x86_64/CentOS-6.6-x86_64-minimal.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /centos-6.7/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /centos-6.7/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /centos-6.7/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /usr/bin/yum -y install sudo 36 | /usr/sbin/groupadd -g 501 vagrant 37 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 38 | echo "vagrant"|passwd --stdin vagrant 39 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 40 | echo "Defaults:vagrant !requiretty" >> /etc/sudoers.d/vagrant 41 | chmod 0440 /etc/sudoers.d/vagrant 42 | %end 43 | -------------------------------------------------------------------------------- /centos-6.7/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /centos-6.7/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /centos-6.7/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir -pm 700 /home/vagrant/.ssh 4 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 5 | chmod 0600 /home/vagrant/.ssh/authorized_keys 6 | chown -R vagrant:vagrant /home/vagrant/.ssh 7 | -------------------------------------------------------------------------------- /centos-6.7/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /centos-6.7/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /centos-6.7/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /centos-6.7/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "centos-6-7-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "centos-6-7-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "2ed5ea551dffc3e4b82847b3cee1f6cd748e8071", 50 | "iso_checksum_type": "sha1", 51 | "iso_url": "http://mirror.hmc.edu/centos/6/isos/x86_64/CentOS-6.7-x86_64-minimal.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "RedHat_64", 72 | "http_directory": "http", 73 | "iso_checksum": "2ed5ea551dffc3e4b82847b3cee1f6cd748e8071", 74 | "iso_checksum_type": "sha1", 75 | "iso_url": "http://mirror.hmc.edu/centos/6/isos/x86_64/CentOS-6.7-x86_64-minimal.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /centos-6.7/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir -pm 700 /home/vagrant/.ssh 4 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 5 | chmod 0600 /home/vagrant/.ssh/authorized_keys 6 | chown -R vagrant:vagrant /home/vagrant/.ssh 7 | -------------------------------------------------------------------------------- /centos-6.7/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /centos-6.7/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /centos-6.7/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /centos-7.0/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /usr/bin/yum -y install sudo 36 | /usr/sbin/groupadd -g 501 vagrant 37 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 38 | echo "vagrant"|passwd --stdin vagrant 39 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 40 | chmod 0440 /etc/sudoers.d/vagrant 41 | %end 42 | -------------------------------------------------------------------------------- /centos-7.0/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /centos-7.0/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /centos-7.0/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir -pm 700 /home/vagrant/.ssh 4 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 5 | chmod 0600 /home/vagrant/.ssh/authorized_keys 6 | chown -R vagrant:vagrant /home/vagrant/.ssh 7 | -------------------------------------------------------------------------------- /centos-7.0/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /centos-7.0/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /centos-7.0/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /centos-7.0/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "centos-7-0-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "centos-7-0-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806", 50 | "iso_checksum_type": "sha1", 51 | "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "centos-64", 72 | "http_directory": "http", 73 | "iso_checksum": "154ba47b7a37e52e0100310c3aeb8f9d9daf4806", 74 | "iso_checksum_type": "sha1", 75 | "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /centos-7.1/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /usr/bin/yum -y install sudo 36 | /usr/sbin/groupadd -g 501 vagrant 37 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 38 | echo "vagrant"|passwd --stdin vagrant 39 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 40 | echo "Defaults:vagrant !requiretty" >> /etc/sudoers.d/vagrant 41 | chmod 0440 /etc/sudoers.d/vagrant 42 | %end 43 | -------------------------------------------------------------------------------- /centos-7.1/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /centos-7.1/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /centos-7.1/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir -pm 700 /home/vagrant/.ssh 4 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 5 | chmod 0600 /home/vagrant/.ssh/authorized_keys 6 | chown -R vagrant:vagrant /home/vagrant/.ssh 7 | -------------------------------------------------------------------------------- /centos-7.1/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | 3 | # required for VirtualBox 4.3.26 4 | yum install -y bzip2 5 | 6 | cd /tmp 7 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 8 | sh /mnt/VBoxLinuxAdditions.run 9 | umount /mnt 10 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 11 | 12 | -------------------------------------------------------------------------------- /centos-7.1/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs open-vm-tools 2 | -------------------------------------------------------------------------------- /centos-7.1/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /centos-7.1/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "centos-7-1-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "centos-7-1-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "1795184136b8bdddabe50453cc2cc2d46f0f7c5e", 50 | "iso_checksum_type": "sha1", 51 | "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/7.1.1503/isos/x86_64/CentOS-7-x86_64-DVD-1503-01.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "centos-64", 72 | "http_directory": "http", 73 | "iso_checksum": "1795184136b8bdddabe50453cc2cc2d46f0f7c5e", 74 | "iso_checksum_type": "sha1", 75 | "iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/7.1.1503/isos/x86_64/CentOS-7-x86_64-DVD-1503-01.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /scientific-6.4/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /usr/bin/yum -y install sudo 36 | /usr/sbin/groupadd -g 501 vagrant 37 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 38 | echo "vagrant"|passwd --stdin vagrant 39 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 40 | chmod 0440 /etc/sudoers.d/vagrant 41 | %end 42 | -------------------------------------------------------------------------------- /scientific-6.4/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /scientific-6.4/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /scientific-6.4/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | mkdir -pm 700 /home/vagrant/.ssh 6 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 7 | chmod 0600 /home/vagrant/.ssh/authorized_keys 8 | chown -R vagrant:vagrant /home/vagrant/.ssh 9 | -------------------------------------------------------------------------------- /scientific-6.4/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /scientific-6.4/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /scientific-6.4/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /scientific-6.4/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "scientific-6-4-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "scientific-6-4-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "99f2b481aaad90dfc3712e8d886cd0791626936e", 50 | "iso_checksum_type": "sha1", 51 | "iso_url": "http://ftp.riken.jp/Linux/scientific/6.4/x86_64/iso/SL-64-x86_64-2013-03-18-Install-DVD.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "RedHat_64", 72 | "http_directory": "http", 73 | "iso_checksum": "99f2b481aaad90dfc3712e8d886cd0791626936e", 74 | "iso_checksum_type": "sha1", 75 | "iso_url": "http://ftp.riken.jp/Linux/scientific/6.4/x86_64/iso/SL-64-x86_64-2013-03-18-Install-DVD.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | 91 | -------------------------------------------------------------------------------- /scientific-6.5/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /usr/bin/yum -y install sudo 36 | /usr/sbin/groupadd -g 501 vagrant 37 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 38 | echo "vagrant"|passwd --stdin vagrant 39 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 40 | chmod 0440 /etc/sudoers.d/vagrant 41 | %end 42 | -------------------------------------------------------------------------------- /scientific-6.5/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /scientific-6.5/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /scientific-6.5/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | mkdir -pm 700 /home/vagrant/.ssh 6 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 7 | chmod 0600 /home/vagrant/.ssh/authorized_keys 8 | chown -R vagrant:vagrant /home/vagrant/.ssh 9 | -------------------------------------------------------------------------------- /scientific-6.5/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /scientific-6.5/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /scientific-6.5/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /scientific-6.5/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "scientific-6-5-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "scientific-6-5-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "a95e182f6ed14a4fb36e448d6eb19a6a59a34778", 50 | "iso_checksum_type": "sha1", 51 | "iso_url": "http://ftp.riken.jp/Linux/scientific/6.5/x86_64/iso/SL-65-x86_64-2014-01-27-Install-DVD.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "RedHat_64", 72 | "http_directory": "http", 73 | "iso_checksum": "a95e182f6ed14a4fb36e448d6eb19a6a59a34778", 74 | "iso_checksum_type": "sha1", 75 | "iso_url": "http://ftp.riken.jp/Linux/scientific/6.5/x86_64/iso/SL-65-x86_64-2014-01-27-Install-DVD.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | 91 | -------------------------------------------------------------------------------- /scientific-7.0/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_US.UTF-8 4 | keyboard us 5 | network --onboot yes --device eth0 --bootproto dhcp --noipv6 6 | rootpw --plaintext vagrant 7 | firewall --enabled --service=ssh 8 | authconfig --enableshadow --passalgo=sha512 9 | selinux --disabled 10 | timezone Asia/Tokyo 11 | bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" 12 | 13 | text 14 | skipx 15 | zerombr 16 | 17 | clearpart --all --initlabel 18 | autopart 19 | 20 | auth --useshadow --enablemd5 21 | firstboot --disabled 22 | reboot 23 | 24 | %packages --ignoremissing 25 | @core 26 | bzip2 27 | kernel-devel 28 | kernel-headers 29 | -ipw2100-firmware 30 | -ipw2200-firmware 31 | -ivtv-firmware 32 | %end 33 | 34 | %post 35 | /usr/bin/yum -y install sudo 36 | /usr/sbin/groupadd -g 501 vagrant 37 | /usr/sbin/useradd vagrant -u 501 -g vagrant -G wheel 38 | echo "vagrant"|passwd --stdin vagrant 39 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 40 | chmod 0440 /etc/sudoers.d/vagrant 41 | %end 42 | -------------------------------------------------------------------------------- /scientific-7.0/scripts/base.sh: -------------------------------------------------------------------------------- 1 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 2 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl 3 | 4 | -------------------------------------------------------------------------------- /scientific-7.0/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | rm -rf /tmp/rubygems-* 5 | 6 | -------------------------------------------------------------------------------- /scientific-7.0/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | mkdir -pm 700 /home/vagrant/.ssh 6 | curl -L https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 7 | chmod 0600 /home/vagrant/.ssh/authorized_keys 8 | chown -R vagrant:vagrant /home/vagrant/.ssh 9 | -------------------------------------------------------------------------------- /scientific-7.0/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 2 | cd /tmp 3 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 4 | sh /mnt/VBoxLinuxAdditions.run 5 | umount /mnt 6 | rm -rf /home/vagrant/VBoxGuestAdditions_*.iso 7 | 8 | -------------------------------------------------------------------------------- /scientific-7.0/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | yum install -y fuse-libs 2 | mkdir -p /mnt/vmware 3 | mount -o loop /home/vagrant/linux.iso /mnt/vmware 4 | 5 | cd /tmp 6 | tar xzf /mnt/vmware/VMwareTools-*.tar.gz 7 | 8 | umount /mnt/vmware 9 | rm -fr /home/vagrant/linux.iso 10 | 11 | /tmp/vmware-tools-distrib/vmware-install.pl -d 12 | rm -fr /tmp/vmware-tools-distrib 13 | 14 | rm -rf /etc/udev/rules.d/70-persistent-net.rules 15 | sed -i "s/HWADDR=.*//" /etc/sysconfig/network-scripts/ifcfg-eth0 16 | -------------------------------------------------------------------------------- /scientific-7.0/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | 4 | -------------------------------------------------------------------------------- /scientific-7.0/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh" 13 | ] 14 | }, 15 | "vmware-iso": { 16 | "scripts": [ 17 | "scripts/base.sh", 18 | "scripts/vagrant.sh", 19 | "scripts/vmware.sh", 20 | "scripts/cleanup.sh" 21 | ] 22 | } 23 | } 24 | } 25 | ], 26 | "post-processors": [ 27 | { 28 | "type": "vagrant", 29 | "override": { 30 | "virtualbox": { 31 | "output": "scientific-7-0-x64-virtualbox.box" 32 | }, 33 | "vmware": { 34 | "output": "scientific-7-0-x64-vmware.box" 35 | } 36 | } 37 | } 38 | ], 39 | "builders": [ 40 | { 41 | "type": "virtualbox-iso", 42 | "boot_command": [ 43 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 44 | ], 45 | "boot_wait": "10s", 46 | "disk_size": 40520, 47 | "guest_os_type": "RedHat_64", 48 | "http_directory": "http", 49 | "iso_checksum": "ee345d72e4386f67697e46f3499a0a056e76499c", 50 | "iso_checksum_type": "sha1", 51 | "iso_url": "http://ftp.riken.jp/Linux/scientific/7.0/x86_64/iso/SL-7-x86_64-DVD.iso", 52 | "ssh_username": "vagrant", 53 | "ssh_password": "vagrant", 54 | "ssh_port": 22, 55 | "ssh_wait_timeout": "10000s", 56 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 57 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 58 | "virtualbox_version_file": ".vbox_version", 59 | "vboxmanage": [ 60 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 61 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 62 | ] 63 | }, 64 | { 65 | "type": "vmware-iso", 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 68 | ], 69 | "boot_wait": "10s", 70 | "disk_size": 40520, 71 | "guest_os_type": "RedHat_64", 72 | "http_directory": "http", 73 | "iso_checksum": "ee345d72e4386f67697e46f3499a0a056e76499c", 74 | "iso_checksum_type": "sha1", 75 | "iso_url": "http://ftp.riken.jp/Linux/scientific/7.0/x86_64/iso/SL-7-x86_64-DVD.iso", 76 | "ssh_username": "vagrant", 77 | "ssh_password": "vagrant", 78 | "ssh_port": 22, 79 | "ssh_wait_timeout": "10000s", 80 | "shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 81 | "tools_upload_flavor": "linux", 82 | "vmx_data": { 83 | "memsize": "512", 84 | "numvcpus": "1", 85 | "cpuid.coresPerSocket": "1" 86 | } 87 | } 88 | ] 89 | } 90 | 91 | -------------------------------------------------------------------------------- /ubuntu-12.04-docker/http/preseed.cfg: -------------------------------------------------------------------------------- 1 | debconf debconf/frontend select Noninteractive 2 | choose-mirror-bin mirror/http/proxy string 3 | d-i base-installer/kernel/override-image string linux-server 4 | d-i clock-setup/utc boolean true 5 | d-i clock-setup/utc-auto boolean true 6 | d-i finish-install/reboot_in_progress note 7 | d-i grub-installer/only_debian boolean true 8 | d-i grub-installer/with_other_os boolean true 9 | d-i partman-auto-lvm/guided_size string max 10 | d-i partman-auto/choose_recipe select atomic 11 | d-i partman-auto/method string lvm 12 | d-i partman-lvm/confirm boolean true 13 | d-i partman-lvm/confirm boolean true 14 | d-i partman-lvm/confirm_nooverwrite boolean true 15 | d-i partman-lvm/device_remove_lvm boolean true 16 | d-i partman/choose_partition select finish 17 | d-i partman/confirm boolean true 18 | d-i partman/confirm_nooverwrite boolean true 19 | d-i partman/confirm_write_new_label boolean true 20 | 21 | # Default user 22 | d-i passwd/user-fullname string vagrant 23 | d-i passwd/username string vagrant 24 | d-i passwd/user-password password vagrant 25 | d-i passwd/user-password-again password vagrant 26 | d-i passwd/username string vagrant 27 | 28 | # Minimum packages (see postinstall.sh) 29 | d-i pkgsel/include string openssh-server 30 | d-i pkgsel/install-language-support boolean false 31 | d-i pkgsel/update-policy select none 32 | d-i pkgsel/upgrade select none 33 | 34 | d-i time/zone string UTC 35 | d-i user-setup/allow-password-weak boolean true 36 | d-i user-setup/encrypt-home boolean false 37 | tasksel tasksel/first multiselect standard, server 38 | 39 | -------------------------------------------------------------------------------- /ubuntu-12.04-docker/scripts/base.sh: -------------------------------------------------------------------------------- 1 | apt-get update 2 | apt-get -y upgrade 3 | apt-get -y install linux-headers-$(uname -r) 4 | 5 | sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=sudo' /etc/sudoers 6 | sed -i -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers 7 | 8 | echo "UseDNS no" >> /etc/ssh/sshd_config 9 | -------------------------------------------------------------------------------- /ubuntu-12.04-docker/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | apt-get -y autoremove 2 | apt-get -y clean 3 | 4 | echo "cleaning up guest additions" 5 | rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? 6 | 7 | echo "cleaning up dhcp leases" 8 | rm /var/lib/dhcp/* 9 | 10 | echo "cleaning up udev rules" 11 | rm /etc/udev/rules.d/70-persistent-net.rules 12 | mkdir /etc/udev/rules.d/70-persistent-net.rules 13 | rm -rf /dev/.udev/ 14 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 15 | 16 | -------------------------------------------------------------------------------- /ubuntu-12.04-docker/scripts/docker.sh: -------------------------------------------------------------------------------- 1 | wget -q -O - https://get.docker.io/ubuntu/ | sh 2 | gpasswd -a vagrant docker 3 | -------------------------------------------------------------------------------- /ubuntu-12.04-docker/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir /home/vagrant/.ssh 4 | wget --no-check-certificate \ 5 | 'https://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' \ 6 | -O /home/vagrant/.ssh/authorized_keys 7 | chown -R vagrant /home/vagrant/.ssh 8 | chmod -R go-rwsx /home/vagrant/.ssh 9 | -------------------------------------------------------------------------------- /ubuntu-12.04-docker/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | apt-get -y install dkms 2 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 3 | cd /tmp 4 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 5 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 6 | sh /mnt/VBoxLinuxAdditions.run 7 | umount /mnt 8 | 9 | rm VBoxGuestAdditions_$VBOX_VERSION.iso 10 | -------------------------------------------------------------------------------- /ubuntu-12.04-docker/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | -------------------------------------------------------------------------------- /ubuntu-12.04-docker/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/docker.sh", 11 | "scripts/vagrant.sh", 12 | "scripts/virtualbox.sh", 13 | "scripts/cleanup.sh", 14 | "scripts/zerodisk.sh" 15 | ] 16 | }, 17 | "vmware-iso": { 18 | "scripts": [ 19 | "scripts/base.sh", 20 | "scripts/docker.sh", 21 | "scripts/vagrant.sh", 22 | "scripts/cleanup.sh", 23 | "scripts/zerodisk.sh" 24 | ] 25 | } 26 | } 27 | } 28 | ], 29 | "post-processors": [ 30 | { 31 | "type": "vagrant", 32 | "override": { 33 | "virtualbox": { 34 | "output": "ubuntu-12-04-x64-docker-virtualbox.box" 35 | }, 36 | "vmware": { 37 | "output": "ubuntu-12-04-x64-docker-vmware.box" 38 | } 39 | } 40 | } 41 | ], 42 | "builders": [ 43 | { 44 | "type": "virtualbox-iso", 45 | "boot_command": [ 46 | "", 47 | "", 48 | "", 49 | "/install/vmlinuz", 50 | " auto", 51 | " console-setup/ask_detect=false", 52 | " console-setup/layoutcode=us", 53 | " console-setup/modelcode=pc105", 54 | " debian-installer=en_US", 55 | " fb=false", 56 | " initrd=/install/initrd.gz", 57 | " kbd-chooser/method=us", 58 | " keyboard-configuration/layout=USA", 59 | " keyboard-configuration/variant=USA", 60 | " locale=en_US", 61 | " netcfg/get_hostname=ubuntu-1204", 62 | " netcfg/get_domain=vagrantup.com", 63 | " noapic", 64 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 65 | " -- ", 66 | "" 67 | ], 68 | "boot_wait": "10s", 69 | "disk_size": 40960, 70 | "guest_os_type": "Ubuntu_64", 71 | "http_directory": "http", 72 | "iso_url": "http://releases.ubuntu.com/12.04/ubuntu-12.04.4-server-amd64.iso", 73 | "iso_checksum": "3aeb42816253355394897ae80d99a9ba56217c0e98e05294b51f0f5b13bceb54", 74 | "iso_checksum_type": "sha256", 75 | "ssh_username": "vagrant", 76 | "ssh_password": "vagrant", 77 | "ssh_port": 22, 78 | "ssh_wait_timeout": "10000s", 79 | "shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 80 | "vboxmanage": [ 81 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 82 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 83 | ] 84 | }, 85 | { 86 | "type": "vmware-iso", 87 | "boot_command": [ 88 | "", 89 | "", 90 | "", 91 | "/install/vmlinuz", 92 | " auto", 93 | " console-setup/ask_detect=false", 94 | " console-setup/layoutcode=us", 95 | " console-setup/modelcode=pc105", 96 | " debian-installer=en_US", 97 | " fb=false", 98 | " initrd=/install/initrd.gz", 99 | " kbd-chooser/method=us", 100 | " keyboard-configuration/layout=USA", 101 | " keyboard-configuration/variant=USA", 102 | " locale=en_US", 103 | " netcfg/get_hostname=ubuntu-1204", 104 | " netcfg/get_domain=vagrantup.com", 105 | " noapic", 106 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 107 | " -- ", 108 | "" 109 | ], 110 | "boot_wait": "10s", 111 | "disk_size": 40960, 112 | "guest_os_type": "linux", 113 | "http_directory": "http", 114 | "iso_url": "http://releases.ubuntu.com/12.04/ubuntu-12.04.3-server-amd64.iso", 115 | "iso_checksum": "61d5e67c70d97b33c13537461a0b153b41304ef412bb0e9d813bb157068c3c65", 116 | "iso_checksum_type": "sha256", 117 | "ssh_username": "vagrant", 118 | "ssh_password": "vagrant", 119 | "ssh_port": 22, 120 | "ssh_wait_timeout": "10000s", 121 | "shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 122 | "vmx_data": { 123 | "memsize": "512", 124 | "numvcpus": "1", 125 | "cpuid.coresPerSocket": "1" 126 | } 127 | } 128 | ] 129 | } 130 | -------------------------------------------------------------------------------- /ubuntu-12.04/http/preseed.cfg: -------------------------------------------------------------------------------- 1 | debconf debconf/frontend select Noninteractive 2 | choose-mirror-bin mirror/http/proxy string 3 | d-i base-installer/kernel/override-image string linux-server 4 | d-i clock-setup/utc boolean true 5 | d-i clock-setup/utc-auto boolean true 6 | d-i finish-install/reboot_in_progress note 7 | d-i grub-installer/only_debian boolean true 8 | d-i grub-installer/with_other_os boolean true 9 | d-i partman-auto-lvm/guided_size string max 10 | d-i partman-auto/choose_recipe select atomic 11 | d-i partman-auto/method string lvm 12 | d-i partman-lvm/confirm boolean true 13 | d-i partman-lvm/confirm boolean true 14 | d-i partman-lvm/confirm_nooverwrite boolean true 15 | d-i partman-lvm/device_remove_lvm boolean true 16 | d-i partman/choose_partition select finish 17 | d-i partman/confirm boolean true 18 | d-i partman/confirm_nooverwrite boolean true 19 | d-i partman/confirm_write_new_label boolean true 20 | 21 | # Default user 22 | d-i passwd/user-fullname string vagrant 23 | d-i passwd/username string vagrant 24 | d-i passwd/user-password password vagrant 25 | d-i passwd/user-password-again password vagrant 26 | d-i passwd/username string vagrant 27 | 28 | # Minimum packages (see postinstall.sh) 29 | d-i pkgsel/include string openssh-server 30 | d-i pkgsel/install-language-support boolean false 31 | d-i pkgsel/update-policy select none 32 | d-i pkgsel/upgrade select none 33 | 34 | d-i time/zone string UTC 35 | d-i user-setup/allow-password-weak boolean true 36 | d-i user-setup/encrypt-home boolean false 37 | tasksel tasksel/first multiselect standard, server 38 | 39 | -------------------------------------------------------------------------------- /ubuntu-12.04/scripts/base.sh: -------------------------------------------------------------------------------- 1 | rm /var/lib/apt/lists/* 2 | apt-get update 3 | apt-get -y upgrade 4 | apt-get -y install linux-headers-$(uname -r) 5 | 6 | sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=sudo' /etc/sudoers 7 | sed -i -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers 8 | 9 | echo "UseDNS no" >> /etc/ssh/sshd_config 10 | -------------------------------------------------------------------------------- /ubuntu-12.04/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | apt-get -y autoremove 2 | apt-get -y clean 3 | 4 | echo "cleaning up guest additions" 5 | rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? 6 | 7 | echo "cleaning up dhcp leases" 8 | rm /var/lib/dhcp/* 9 | 10 | echo "cleaning up udev rules" 11 | rm /etc/udev/rules.d/70-persistent-net.rules 12 | mkdir /etc/udev/rules.d/70-persistent-net.rules 13 | rm -rf /dev/.udev/ 14 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 15 | 16 | -------------------------------------------------------------------------------- /ubuntu-12.04/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir /home/vagrant/.ssh 4 | wget --no-check-certificate \ 5 | 'https://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' \ 6 | -O /home/vagrant/.ssh/authorized_keys 7 | chown -R vagrant /home/vagrant/.ssh 8 | chmod -R go-rwsx /home/vagrant/.ssh 9 | -------------------------------------------------------------------------------- /ubuntu-12.04/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | apt-get -y install dkms 2 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 3 | cd /tmp 4 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 5 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 6 | sh /mnt/VBoxLinuxAdditions.run 7 | umount /mnt 8 | 9 | rm VBoxGuestAdditions_$VBOX_VERSION.iso 10 | -------------------------------------------------------------------------------- /ubuntu-12.04/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | -------------------------------------------------------------------------------- /ubuntu-12.04/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh", 13 | "scripts/zerodisk.sh" 14 | ] 15 | }, 16 | "vmware-iso": { 17 | "scripts": [ 18 | "scripts/base.sh", 19 | "scripts/vagrant.sh", 20 | "scripts/cleanup.sh", 21 | "scripts/zerodisk.sh" 22 | ] 23 | } 24 | } 25 | } 26 | ], 27 | "post-processors": [ 28 | { 29 | "type": "vagrant", 30 | "override": { 31 | "virtualbox": { 32 | "output": "ubuntu-12-04-x64-virtualbox.box" 33 | }, 34 | "vmware": { 35 | "output": "ubuntu-12-04-x64-vmware.box" 36 | } 37 | } 38 | } 39 | ], 40 | "builders": [ 41 | { 42 | "type": "virtualbox-iso", 43 | "boot_command": [ 44 | "", 45 | "", 46 | "", 47 | "/install/vmlinuz", 48 | " auto", 49 | " console-setup/ask_detect=false", 50 | " console-setup/layoutcode=us", 51 | " console-setup/modelcode=pc105", 52 | " debian-installer=en_US", 53 | " fb=false", 54 | " initrd=/install/initrd.gz", 55 | " kbd-chooser/method=us", 56 | " keyboard-configuration/layout=USA", 57 | " keyboard-configuration/variant=USA", 58 | " locale=en_US", 59 | " netcfg/get_hostname=ubuntu-1204", 60 | " netcfg/get_domain=vagrantup.com", 61 | " noapic", 62 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 63 | " -- ", 64 | "" 65 | ], 66 | "boot_wait": "10s", 67 | "disk_size": 40960, 68 | "guest_os_type": "Ubuntu_64", 69 | "http_directory": "http", 70 | "iso_url": "http://releases.ubuntu.com/12.04/ubuntu-12.04.5-server-amd64.iso", 71 | "iso_checksum": "af224223de99e2a730b67d7785b657f549be0d63221188e105445f75fb8305c9", 72 | "iso_checksum_type": "sha256", 73 | "ssh_username": "vagrant", 74 | "ssh_password": "vagrant", 75 | "ssh_port": 22, 76 | "ssh_wait_timeout": "10000s", 77 | "shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 78 | "vboxmanage": [ 79 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 80 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 81 | ] 82 | }, 83 | { 84 | "type": "vmware-iso", 85 | "boot_command": [ 86 | "", 87 | "", 88 | "", 89 | "/install/vmlinuz", 90 | " auto", 91 | " console-setup/ask_detect=false", 92 | " console-setup/layoutcode=us", 93 | " console-setup/modelcode=pc105", 94 | " debian-installer=en_US", 95 | " fb=false", 96 | " initrd=/install/initrd.gz", 97 | " kbd-chooser/method=us", 98 | " keyboard-configuration/layout=USA", 99 | " keyboard-configuration/variant=USA", 100 | " locale=en_US", 101 | " netcfg/get_hostname=ubuntu-1204", 102 | " netcfg/get_domain=vagrantup.com", 103 | " noapic", 104 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 105 | " -- ", 106 | "" 107 | ], 108 | "boot_wait": "10s", 109 | "disk_size": 40960, 110 | "guest_os_type": "linux", 111 | "http_directory": "http", 112 | "iso_url": "http://releases.ubuntu.com/12.04/ubuntu-12.04.5-server-amd64.iso", 113 | "iso_checksum": "af224223de99e2a730b67d7785b657f549be0d63221188e105445f75fb8305c9", 114 | "iso_checksum_type": "sha256", 115 | "ssh_username": "vagrant", 116 | "ssh_password": "vagrant", 117 | "ssh_port": 22, 118 | "ssh_wait_timeout": "10000s", 119 | "shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 120 | "vmx_data": { 121 | "memsize": "512", 122 | "numvcpus": "1", 123 | "cpuid.coresPerSocket": "1" 124 | } 125 | } 126 | ] 127 | } 128 | -------------------------------------------------------------------------------- /ubuntu-14.04/http/preseed.cfg: -------------------------------------------------------------------------------- 1 | debconf debconf/frontend select Noninteractive 2 | choose-mirror-bin mirror/http/proxy string 3 | d-i base-installer/kernel/override-image string linux-server 4 | d-i clock-setup/utc boolean true 5 | d-i clock-setup/utc-auto boolean true 6 | d-i finish-install/reboot_in_progress note 7 | d-i grub-installer/only_debian boolean true 8 | d-i grub-installer/with_other_os boolean true 9 | d-i partman-auto-lvm/guided_size string max 10 | d-i partman-auto/choose_recipe select atomic 11 | d-i partman-auto/method string lvm 12 | d-i partman-lvm/confirm boolean true 13 | d-i partman-lvm/confirm_nooverwrite boolean true 14 | d-i partman-lvm/device_remove_lvm boolean true 15 | d-i partman/choose_partition select finish 16 | d-i partman/confirm boolean true 17 | d-i partman/confirm_nooverwrite boolean true 18 | d-i partman/confirm_write_new_label boolean true 19 | 20 | # Default user 21 | d-i passwd/user-fullname string vagrant 22 | d-i passwd/username string vagrant 23 | d-i passwd/user-password password vagrant 24 | d-i passwd/user-password-again password vagrant 25 | d-i passwd/username string vagrant 26 | 27 | # Minimum packages (see postinstall.sh) 28 | d-i pkgsel/include string openssh-server 29 | d-i pkgsel/install-language-support boolean false 30 | d-i pkgsel/update-policy select none 31 | d-i pkgsel/upgrade select none 32 | 33 | d-i time/zone string UTC 34 | d-i user-setup/allow-password-weak boolean true 35 | d-i user-setup/encrypt-home boolean false 36 | tasksel tasksel/first multiselect standard, server 37 | -------------------------------------------------------------------------------- /ubuntu-14.04/scripts/base.sh: -------------------------------------------------------------------------------- 1 | apt-get update 2 | apt-get -y upgrade 3 | apt-get -y install linux-headers-$(uname -r) 4 | 5 | sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=sudo' /etc/sudoers 6 | sed -i -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers 7 | 8 | echo "UseDNS no" >> /etc/ssh/sshd_config 9 | -------------------------------------------------------------------------------- /ubuntu-14.04/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | apt-get -y autoremove 2 | apt-get -y clean 3 | 4 | echo "cleaning up guest additions" 5 | rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? 6 | 7 | echo "cleaning up dhcp leases" 8 | rm /var/lib/dhcp/* 9 | 10 | echo "cleaning up udev rules" 11 | rm /etc/udev/rules.d/70-persistent-net.rules 12 | mkdir /etc/udev/rules.d/70-persistent-net.rules 13 | rm -rf /dev/.udev/ 14 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 15 | -------------------------------------------------------------------------------- /ubuntu-14.04/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | mkdir /home/vagrant/.ssh 4 | wget --no-check-certificate \ 5 | 'https://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' \ 6 | -O /home/vagrant/.ssh/authorized_keys 7 | chown -R vagrant /home/vagrant/.ssh 8 | chmod -R go-rwsx /home/vagrant/.ssh 9 | -------------------------------------------------------------------------------- /ubuntu-14.04/scripts/virtualbox.sh: -------------------------------------------------------------------------------- 1 | apt-get -y install virtualbox-guest-utils 2 | -------------------------------------------------------------------------------- /ubuntu-14.04/scripts/vmware.sh: -------------------------------------------------------------------------------- 1 | apt-get -y install open-vm-tools 2 | echo -n ".host:/ /mnt/hgfs vmhgfs rw,ttl=1,uid=my_uid,gid=my_gid,nobootwait 0 0" >> /etc/fstab 3 | -------------------------------------------------------------------------------- /ubuntu-14.04/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=/EMPTY bs=1M 2 | rm -f /EMPTY 3 | -------------------------------------------------------------------------------- /ubuntu-14.04/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "provisioners": [ 3 | { 4 | "type": "shell", 5 | "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'", 6 | "override": { 7 | "virtualbox-iso": { 8 | "scripts": [ 9 | "scripts/base.sh", 10 | "scripts/vagrant.sh", 11 | "scripts/virtualbox.sh", 12 | "scripts/cleanup.sh", 13 | "scripts/zerodisk.sh" 14 | ] 15 | }, 16 | "vmware-iso": { 17 | "scripts": [ 18 | "scripts/base.sh", 19 | "scripts/vagrant.sh", 20 | "scripts/vmware.sh", 21 | "scripts/cleanup.sh", 22 | "scripts/zerodisk.sh" 23 | ] 24 | } 25 | } 26 | } 27 | ], 28 | "post-processors": [ 29 | { 30 | "type": "vagrant", 31 | "override": { 32 | "virtualbox": { 33 | "output": "ubuntu-14-04-x64-virtualbox.box" 34 | }, 35 | "vmware": { 36 | "output": "ubuntu-14-04-x64-vmware.box" 37 | } 38 | } 39 | } 40 | ], 41 | "builders": [ 42 | { 43 | "type": "virtualbox-iso", 44 | "boot_command": [ 45 | "", 46 | "", 47 | "", 48 | "/install/vmlinuz", 49 | " auto", 50 | " console-setup/ask_detect=false", 51 | " console-setup/layoutcode=us", 52 | " console-setup/modelcode=pc105", 53 | " debian-installer=en_US", 54 | " fb=false", 55 | " initrd=/install/initrd.gz", 56 | " kbd-chooser/method=us", 57 | " keyboard-configuration/layout=USA", 58 | " keyboard-configuration/variant=USA", 59 | " locale=en_US", 60 | " netcfg/get_hostname=ubuntu-1404", 61 | " netcfg/get_domain=vagrantup.com", 62 | " noapic", 63 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 64 | " -- ", 65 | "" 66 | ], 67 | "boot_wait": "10s", 68 | "disk_size": 40960, 69 | "guest_os_type": "Ubuntu_64", 70 | "http_directory": "http", 71 | "iso_checksum": "2ac1f3e0de626e54d05065d6f549fa3a", 72 | "iso_checksum_type": "md5", 73 | "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso", 74 | "ssh_username": "vagrant", 75 | "ssh_password": "vagrant", 76 | "ssh_port": 22, 77 | "ssh_wait_timeout": "10000s", 78 | "shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 79 | "vboxmanage": [ 80 | [ "modifyvm", "{{.Name}}", "--memory", "512" ], 81 | [ "modifyvm", "{{.Name}}", "--cpus", "1" ] 82 | ] 83 | }, 84 | { 85 | "type": "vmware-iso", 86 | "boot_command": [ 87 | "", 88 | "", 89 | "", 90 | "/install/vmlinuz", 91 | " auto", 92 | " console-setup/ask_detect=false", 93 | " console-setup/layoutcode=us", 94 | " console-setup/modelcode=pc105", 95 | " debian-installer=en_US", 96 | " fb=false", 97 | " initrd=/install/initrd.gz", 98 | " kbd-chooser/method=us", 99 | " keyboard-configuration/layout=USA", 100 | " keyboard-configuration/variant=USA", 101 | " locale=en_US", 102 | " netcfg/get_hostname=ubuntu-1404", 103 | " netcfg/get_domain=vagrantup.com", 104 | " noapic", 105 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 106 | " -- ", 107 | "" 108 | ], 109 | "boot_wait": "10s", 110 | "disk_size": 40960, 111 | "guest_os_type": "linux", 112 | "http_directory": "http", 113 | "iso_checksum": "2ac1f3e0de626e54d05065d6f549fa3a", 114 | "iso_checksum_type": "md5", 115 | "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso", 116 | "ssh_username": "vagrant", 117 | "ssh_password": "vagrant", 118 | "ssh_port": 22, 119 | "ssh_wait_timeout": "10000s", 120 | "shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'", 121 | "vmx_data": { 122 | "memsize": "512", 123 | "numvcpus": "1", 124 | "cpuid.coresPerSocket": "1" 125 | } 126 | } 127 | ] 128 | } 129 | --------------------------------------------------------------------------------