├── .gitignore ├── AUTHORS ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── VERSION ├── bin ├── box ├── build-box ├── bump.sh ├── register_atlas.sh ├── ssh-box ├── test-box └── test-vagrantcloud-box ├── floppy └── vmware9.compat_dcache.h.patch ├── http ├── ks5.cfg ├── ks6-desktop.cfg ├── ks6.cfg ├── ks7-desktop.cfg └── ks7.cfg ├── ol511-i386.json ├── ol511.json ├── ol67-desktop.json ├── ol67-i386.json ├── ol67.json ├── ol68-i386.json ├── ol68.json ├── ol72-desktop.json ├── ol72.json ├── ol73-desktop.json ├── ol73.json ├── ol74-desktop.json ├── ol74.json ├── oraclelinux.json ├── script ├── cleanup.sh ├── desktop.sh ├── docker.sh ├── fix-slow-dns.sh ├── kernel.sh ├── motd.sh ├── parallels.sh ├── sshd.sh ├── update.sh ├── vagrant.sh ├── virtualbox.sh └── vmware.sh ├── test ├── docker_spec.rb ├── oel_spec.rb └── spec_helper.rb └── tpl ├── vagrantfile-ol65-desktop.tpl ├── vagrantfile-ol66-desktop.tpl ├── vagrantfile-ol67-desktop.tpl ├── vagrantfile-ol70-desktop.tpl ├── vagrantfile-ol71-desktop.tpl ├── vagrantfile-ol72-desktop.tpl ├── vagrantfile-ol73-desktop.tpl └── vagrantfile-ol74-desktop.tpl /.gitignore: -------------------------------------------------------------------------------- 1 | packer_cache/ 2 | output-* 3 | *.box 4 | *.tar.gz 5 | iso 6 | crash.log 7 | tmp 8 | .vagrant/ 9 | *.swp 10 | Makefile.local 11 | box/ 12 | .boxtest/ 13 | 14 | .DS_Store 15 | .bundle 16 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # This file lists all individuals having contributed content to the repository. 2 | # If you're submitting a patch, please add your name here in alphabetical order as part of the patch. 3 | # 4 | Avi Miller 5 | Dave Behnke 6 | Dominic 7 | Guillaume Dedrie 8 | Irving Popovetsky 9 | Jonathan Oliver 10 | Joshua Timberman 11 | Masahiro Ono 12 | Matt Willsher 13 | Mischa Taylor 14 | Nan Liu 15 | Rickard von Essen 16 | Ross Smith II 17 | Victor Volle 18 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 3.0.9 (2016-12-04) 4 | 5 | * Add Oracle Linux 7.3 templates 6 | * Upgrade VMware tools to 10.0.10 for VMware Fusion 8.5.3 7 | * Upgrade VirtualBox guest additions to 5.1.10 8 | * Upgrade parallels tools to 12.1.1. 9 | 10 | ## 3.0.8 (2016-08-31) 11 | 12 | * Upgrade VMware tools to 10.0.6 for VMware Fusion 8.1.1 13 | * Upgrade VirtualBox guest additions to 5.0.26 14 | * Upgrade Parallels tools to 11.2.1 15 | 16 | ## 3.0.7 (2015-12-28) 17 | 18 | * Upgrade VMware tools to 10.0.5 for VMware Fusion 8.1.0 19 | * Upgrade VirtualBox guest additions to 5.0.12 20 | * Upgrade Parallels tools to 11.1.2 21 | 22 | ## 3.0.6 (2015-12-05) 23 | 24 | * Add OracleLinux 7.2 templates 25 | * Upgrade Parallels tools to 11.1.1 26 | 27 | ## 3.0.5 (2015-11-25) 28 | 29 | * Upgrade VirtualBox guest additions to version 5.0.10 30 | * Upgrade Parallels tools to 11.1.0 31 | * Change slugs from oel* to ol* 32 | 33 | ## 3.0.3 (2015-11-03) 34 | 35 | * Upgrade VMware tools to 10.0.1 for VMware Fusion 8.0.2 36 | * Upgrade VirtualBox guest additions to version 5.0.8 37 | * Port improvements in structure/build parallelism from Ubuntu templates 38 | 39 | ## 3.0.2 (2015-10-07) 40 | 41 | * Upgrade VirtualBox Guest Additions to 5.0.6 42 | * Add motd banner 43 | 44 | ## 3.0.1 (2015-09-28) 45 | 46 | * Upgrade VirtualBox Guest Additions to 5.0.4 47 | * Add Docker templates 48 | * Remove Paralels provider 49 | 50 | ## 3.0.0 (2015-08-30) 51 | 52 | * Upgrade VMware tools to 10.0.0 for VMware Fusion 8 53 | * Upgrade Parallels tools to 11.0.0 54 | 55 | ## 2.0.3 (2015-08-16) 56 | 57 | * Upgrade VirtualBox Guest Additions to 5.0.2 58 | 59 | ## 2.0.2 (2015-08-13) 60 | 61 | * Add OEL 6.7 templates 62 | 63 | ## 2.0.1 (2015-07-28) 64 | 65 | * Upgrade Parallels tools to 10.2.2 66 | 67 | ## 2.0.0 (2015-07-22) 68 | 69 | * Upgrade VirtualBox Guest Additions to 5.0.0 70 | 71 | ## 1.0.16 (2015-06-18) 72 | 73 | * Upgrade VMware Tools to 9.9.3 for VMware 7.1.2 74 | 75 | ## 1.0.15 (2015-06-03) 76 | 77 | * Upgrade VirtualBox Guest Additions to 4.3.28 78 | * Upgrade Parallels tools to 10.2.1 79 | 80 | ## 1.0.14 (2015-04-09) 81 | 82 | * Add Oracle Enterprise Linux 7.1 templates 83 | * Upgrade Parallels tools to 10.2.0 84 | 85 | ## 1.0.13 (2015-03-22) 86 | 87 | * Upgrade VirtualBox Guest Additions to 4.3.26 88 | 89 | ## 1.0.12 (2015-03-05) 90 | 91 | * Upgrade VirtualBox Guest Additions to 4.3.24 92 | * Fix issues with selinux not being disabled on some versions 93 | 94 | ## 1.0.11 (2015-02-26) 95 | 96 | * Use the SATA HDD controller for faster disk IO speeds on VirtualBox 97 | * Rely on the vendor-supplied ca-bundle.crt that comes with the openssl package 98 | * Upgrade Parallels Tools to 10.1.4 99 | * Upgrade VMware Tools to 9.9.2 for VMware Fusion 7.1.1 100 | * Upgrade VirtualBox Guest Additions for 4.3.22 101 | 102 | ## 1.0.8 (2014-12-28) 103 | 104 | * Upgrade Parallels Tools to 10.1.2 105 | * Default timezone is now UTC 106 | 107 | ## 1.0.7 (2014-12-07) 108 | 109 | * Upgrade VMware Tools to 9.9.0 for VMware Fusion 7.1.0 110 | 111 | ## 1.0.6 (2014-11-26) 112 | 113 | * Upgrade VirtualBox guest additions to 4.3.20 114 | 115 | ## 1.0.5 (2014-11-09) 116 | 117 | * Upgrade VMware Tools to 9.8.4 for VMware Fusion 7.0.1 118 | * Add template for Oracle Enterprise Linux 6.6 119 | * Add Parallels 10.1.1 boxes to build 120 | 121 | ## 1.0.4 (2014-10-17) 122 | 123 | * Upgrade VirtualBox guest additions to 4.3.18 124 | 125 | ## 1.0.3 (2014-09-30) 126 | 127 | * Adding support for VirtualBox 4.3.16 128 | * Updating Oracle Enterprise Linux 7.0 ISO URLs 129 | * Adding template for Oracle Enterprise Linux 5.11 130 | 131 | ## 1.0.2 (2014-09-05) 132 | 133 | * Adding support for VMware Tools 9.8.3 134 | 135 | ## 1.0.1 (2014-08-02) 136 | 137 | * Adding support for VirtualBox 4.3.14 138 | * Adding centos70 and centos70-desktop templates for VirtualBox 139 | * Adding centos65-desktop template for VirtualBox & VMware 140 | 141 | ## 1.0.0 (2014-05-09) 142 | 143 | * Initial commit 144 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2014 Box-Cutter Authors (see AUTHORS file). 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | BOX_VERSION ?= $(shell cat VERSION) 2 | BOX_SUFFIX := -$(BOX_VERSION).box 3 | BUILDER_TYPES ?= vmware virtualbox parallels 4 | TEMPLATE_FILENAMES := $(filter-out oraclelinux.json ol510.json ol510-i386.json ol511.json ol511-i386.json,$(wildcard *.json)) 5 | BOX_NAMES := $(basename $(TEMPLATE_FILENAMES)) 6 | BOX_FILENAMES := $(TEMPLATE_FILENAMES:.json=$(BOX_SUFFIX)) 7 | VMWARE_BOX_DIR ?= box/vmware 8 | VMWARE_TEMPLATE_FILENAMES = $(TEMPLATE_FILENAMES) 9 | VMWARE_BOX_FILENAMES := $(VMWARE_TEMPLATE_FILENAMES:.json=$(BOX_SUFFIX)) 10 | VMWARE_BOX_FILES := $(foreach box_filename, $(VMWARE_BOX_FILENAMES), $(VMWARE_BOX_DIR)/$(box_filename)) 11 | VIRTUALBOX_BOX_DIR ?= box/virtualbox 12 | VIRTUALBOX_TEMPLATE_FILENAMES = $(TEMPLATE_FILENAMES) 13 | VIRTUALBOX_BOX_FILENAMES := $(VIRTUALBOX_TEMPLATE_FILENAMES:.json=$(BOX_SUFFIX)) 14 | VIRTUALBOX_BOX_FILES := $(foreach box_filename, $(VIRTUALBOX_BOX_FILENAMES), $(VIRTUALBOX_BOX_DIR)/$(box_filename)) 15 | PARALLELS_BOX_DIR ?= box/parallels 16 | PARALLELS_TEMPLATE_FILENAMES = $(TEMPLATE_FILENAMES) 17 | PARALLELS_BOX_FILENAMES := $(PARALLELS_TEMPLATE_FILENAMES:.json=$(BOX_SUFFIX)) 18 | PARALLELS_BOX_FILES := $(foreach box_filename, $(PARALLELS_BOX_FILENAMES), $(PARALLELS_BOX_DIR)/$(box_filename)) 19 | BOX_FILES := $(VMWARE_BOX_FILES) $(VIRTUALBOX_BOX_FILES) $(PARALLELS_BOX_FILES) 20 | 21 | box/vmware/%$(BOX_SUFFIX) box/virtualbox/%$(BOX_SUFFIX) box/parallels/%$(BOX_SUFFIX): %.json 22 | bin/box build $< 23 | 24 | box/virtualbox/ol510$(BOX_SUFFIX): ol510.json 25 | bin/box build $< virtualbox 26 | 27 | box/parallels/o510-i386$(BOX_SUFFIX): ol510-i386.json 28 | bin/box build $< parallels 29 | 30 | box/virtualbox/ol511$(BOX_SUFFIX): ol511.json 31 | bin/box build $< virtualbox 32 | 33 | box/parallels/o511$(BOX_SUFFIX): ol511-i386.json 34 | bin/box build $< parallels 35 | 36 | .PHONY: all clean assure deliver assure_atlas assure_atlas_vmware assure_atlas_virtualbox assure_atlas_parallels 37 | 38 | all: build assure deliver 39 | 40 | build: $(BOX_FILES) 41 | 42 | assure: assure_vmware assure_virtualbox assure_parallels 43 | 44 | assure_vmware: $(VMWARE_BOX_FILES) 45 | @for vmware_box_file in $(VMWARE_BOX_FILES) ; do \ 46 | echo Checking $$vmware_box_file ; \ 47 | bin/box test $$vmware_box_file vmware ; \ 48 | done 49 | 50 | assure_virtualbox: $(VIRTUALBOX_BOX_FILES) 51 | @for virtualbox_box_file in $(VIRTUALBOX_BOX_FILES) ; do \ 52 | echo Checking $$virtualbox_box_file ; \ 53 | bin/box test $$virtualbox_box_file virtualbox ; \ 54 | done 55 | 56 | assure_parallels: $(PARALLELS_BOX_FILES) 57 | @for parallels_box_file in $(PARALLELS_BOX_FILES) ; do \ 58 | echo Checking $$parallels_box_file ; \ 59 | bin/box test $$parallels_box_file parallels ; \ 60 | done 61 | 62 | assure_atlas: assure_atlas_vmware assure_atlas_virtualbox assure_atlas_parallels 63 | 64 | assure_atlas_vmware: 65 | @for box_name in $(BOX_NAMES) ; do \ 66 | echo Checking $$box_name ; \ 67 | bin/test-vagrantcloud-box box-cutter/$$box_name vmware ; \ 68 | bin/test-vagrantcloud-box boxcutter/$$box_name vmware ; \ 69 | done 70 | 71 | assure_atlas_virtualbox: 72 | @for box_name in $(BOX_NAMES) ; do \ 73 | echo Checking $$box_name ; \ 74 | bin/test-vagrantcloud-box box-cutter/$$box_name virtualbox ; \ 75 | bin/test-vagrantcloud-box boxcutter/$$box_name virtualbox ; \ 76 | done 77 | 78 | assure_atlas_parallels: 79 | @for box_name in $(BOX_NAMES) ; do \ 80 | echo Checking $$box_name ; \ 81 | bin/test-vagrantcloud-box box-cutter/$$box_name parallels ; \ 82 | bin/test-vagrantcloud-box boxcutter/$$box_name parallels ; \ 83 | done 84 | 85 | deliver: 86 | @for box_name in $(BOX_NAMES) ; do \ 87 | echo Uploading $$box_name to Atlas ; \ 88 | bin/register_atlas.sh $$box_name $(BOX_SUFFIX) $(BOX_VERSION) ; \ 89 | done 90 | 91 | clean: clean-builders clean-output clean-packer-cache 92 | 93 | clean-builders: 94 | @for builder in $(BUILDER_TYPES) ; do \ 95 | if test -d box/$$builder ; then \ 96 | echo Deleting box/$$builder/*.box ; \ 97 | find box/$$builder -maxdepth 1 -type f -name "*.box" ! -name .gitignore -exec rm '{}' \; ; \ 98 | fi ; \ 99 | done 100 | 101 | clean-output: 102 | @for builder in $(BUILDER_TYPES) ; do \ 103 | echo Deleting output-*-$$builder-iso ; \ 104 | echo rm -rf output-*-$$builder-iso ; \ 105 | done 106 | 107 | clean-packer-cache: 108 | echo Deleting packer_cache 109 | rm -rf packer_cache 110 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Packer templates for Oracle Linux written in legacy JSON 2 | 3 | ### Overview 4 | 5 | This repository contains templates in legacy JSON for Oracle Linux that can create 6 | Vagrant boxes using Packer. 7 | 8 | ## Current Boxes 9 | 10 | We no longer provide pre-built binaries for these templates. 11 | 12 | ## Building the Vagrant boxes with Packer 13 | 14 | To build all the boxes, you will need [VirtualBox](https://www.virtualbox.org/wiki/Downloads), 15 | [VMware Fusion](https://www.vmware.com/products/fusion)/[VMware Workstation](https://www.vmware.com/products/workstation) and 16 | [Parallels](http://www.parallels.com/products/desktop/whats-new/) installed. 17 | 18 | Parallels requires that the 19 | [Parallels Virtualization SDK for Mac](http://www.parallels.com/downloads/desktop) 20 | be installed as an additional preqrequisite. 21 | 22 | We make use of JSON files containing user variables to build specific versions of Oracle Linux. 23 | You tell `packer` to use a specific user variable file via the `-var-file=` command line 24 | option. This will override the default options on the core `oraclelinux.json` packer template, 25 | which builds Oracle Linux 6.7 by default. 26 | 27 | For example, to build Oracle Linux 7.1, use the following: 28 | 29 | $ packer build -var-file=ol71.json oraclelinux.json 30 | 31 | If you want to make boxes for a specific desktop virtualization platform, use the `-only` 32 | parameter. For example, to build Oracle Linux 7.1 for VirtualBox: 33 | 34 | $ packer build -only=virtualbox-iso -var-file=ol71.json oraclelinux.json 35 | 36 | The boxcutter templates currently support the following desktop virtualization strings: 37 | 38 | * `parallels-iso` - [Parallels](http://www.parallels.com/products/desktop/whats-new/) desktop virtualization (Requires the Pro Edition - Desktop edition won't work) 39 | * `virtualbox-iso` - [VirtualBox](https://www.virtualbox.org/wiki/Downloads) desktop virtualization 40 | * `vmware-iso` - [VMware Fusion](https://www.vmware.com/products/fusion) or [VMware Workstation](https://www.vmware.com/products/workstation) desktop virtualization 41 | 42 | ## Building the Vagrant boxes with the box script 43 | 44 | We've also provided a wrapper script `bin/box` for ease of use, so alternatively, you can use 45 | the following to build Oracle Linux 7.1 for all providers: 46 | 47 | $ bin/box build ol71 48 | 49 | Or if you just want to build Oracle Linux 7.1 for VirtualBox: 50 | 51 | $ bin/box build ol71 virtualbox 52 | 53 | ## Building the Vagrant boxes with the Makefile 54 | 55 | A GNU Make `Makefile` drives a complete basebox creation pipeline with the following stages: 56 | 57 | * `build` - Create basebox `*.box` files 58 | * `assure` - Verify that the basebox `*.box` files produced function correctly 59 | * `deliver` - Upload `*.box` files to [Artifactory](https://www.jfrog.com/confluence/display/RTF/Vagrant+Repositories), [Atlas](https://atlas.hashicorp.com/) or an [S3 bucket](https://aws.amazon.com/s3/) 60 | 61 | The pipeline is driven via the following targets, making it easy for you to include them 62 | in your favourite CI tool: 63 | 64 | make build # Build all available box types 65 | make assure # Run tests against all the boxes 66 | make deliver # Upload box artifacts to a repository 67 | make clean # Clean up build detritus 68 | 69 | ### Proxy Settings 70 | 71 | The templates respect the following network proxy environment variables 72 | and forward them on to the virtual machine environment during the box creation 73 | process, should you be using a proxy: 74 | 75 | * http_proxy 76 | * https_proxy 77 | * ftp_proxy 78 | * rsync_proxy 79 | * no_proxy 80 | 81 | ### Tests 82 | 83 | The tests are written in [Serverspec](http://serverspec.org) and require the 84 | `vagrant-serverspec` plugin to be installed with: 85 | 86 | vagrant plugin install vagrant-serverspec 87 | 88 | The `Makefile` has individual targets for each box type with the prefix 89 | `test-*` should you wish to run tests individually for each box. 90 | 91 | Similarly there are targets with the prefix `ssh-*` for registering a 92 | newly-built box with vagrant and for logging in using just one command to 93 | do exploratory testing. 94 | 95 | Upon logout `make ssh-*` will automatically de-register the box as well. 96 | 97 | ### Makefile.local override 98 | 99 | You can create a `Makefile.local` file alongside the `Makefile` to override 100 | some of the default settings. The variables can that can be currently 101 | used are: 102 | 103 | * CM 104 | * CM_VERSION 105 | * HEADLESS 106 | * \ 107 | * UPDATE 108 | 109 | `Makefile.local` is most commonly used to override the default configuration 110 | management tool, for example with Chef: 111 | 112 | # Makefile.local 113 | CM := chef 114 | 115 | Changing the value of the `CM` variable changes the target suffixes for 116 | the output of `make list` accordingly. 117 | 118 | Possible values for the CM variable are: 119 | 120 | * `nocm` - No configuration management tool 121 | * `chef` - Install Chef 122 | * `puppet` - Install Puppet 123 | * `salt` - Install Salt 124 | 125 | You can also specify a variable `CM_VERSION`, if supported by the 126 | configuration management tool, to override the default of `latest`. 127 | The value of `CM_VERSION` should have the form `x.y` or `x.y.z`, 128 | such as `CM_VERSION := 11.12.4` 129 | 130 | The variable `HEADLESS` can be set to run Packer in headless mode. 131 | Set `HEADLESS := true`, the default is false. 132 | 133 | The variable `UPDATE` can be used to perform OS patch management. The 134 | default is to not apply OS updates by default. When `UPDATE := true`, 135 | the latest OS updates will be applied. 136 | 137 | The variable `PACKER` can be used to set the path to the packer binary. 138 | The default is `packer`. 139 | 140 | The variable `ISO_PATH` can be used to set the path to a directory with 141 | OS install images. This override is commonly used to speed up Packer 142 | builds by pointing at pre-downloaded ISOs instead of using the default 143 | download Internet URLs. 144 | 145 | The variables `SSH_USERNAME` and `SSH_PASSWORD` can be used to change 146 | the default name & password from the default `vagrant`/`vagrant` 147 | respectively. 148 | 149 | The variable `INSTALL_VAGRANT_KEY` can be set to turn off installation 150 | of the default insecure vagrant key when the image is being used 151 | outside of vagrant. Set `INSTALL_VAGRANT_KEY := false`, the default 152 | is true. 153 | 154 | ### Acknowledgments 155 | 156 | [SmartyStreets](http://www.smartystreets.com) provided basebox hosting for the boxcutter project since 2015 - thank you for your support! 157 | 158 | 159 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 3.0.10 2 | -------------------------------------------------------------------------------- /bin/box: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit -o nounset -o pipefail 3 | 4 | if [ "${DEBUG:=false}" = "true" ]; then 5 | set -o xtrace 6 | fi 7 | 8 | usage() { 9 | echo "usage: $(basename $0) [-h/--help] command [arguments...]" 10 | echo 11 | echo "Available commands are:" 12 | echo " build Generate a box image file" 13 | echo " ssh Run vagrant ssh against a box image name" 14 | echo " test Run serverspec tests against a box image name" 15 | } 16 | 17 | args() { 18 | if [ $# -lt 1 ]; then 19 | usage 20 | exit 0 21 | fi 22 | 23 | if [[ ! $1 =~ ^(build|ssh|test)$ ]]; then 24 | echo "$(basename $0): illegal option $1" 25 | usage 26 | exit 1 27 | fi 28 | 29 | command=$1 30 | case $command in 31 | "" | "-h" | "--help") 32 | usage 33 | ;; 34 | *) 35 | shift 36 | ;; 37 | esac 38 | $command "$@" 39 | } 40 | 41 | ssh() { 42 | bin/ssh-box "$@" 43 | } 44 | 45 | test() { 46 | bin/test-box "$@" 47 | } 48 | 49 | build() { 50 | bin/build-box "$@" 51 | } 52 | 53 | # main 54 | args "$@" 55 | -------------------------------------------------------------------------------- /bin/build-box: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit -o nounset -o pipefail 3 | 4 | if [ "${DEBUG:=false}" = "true" ]; then 5 | set -o xtrace 6 | fi 7 | 8 | usage() { 9 | echo "usage: $(basename $0) VAR_LIST_FILE [vmware|virtualbox|parallels] [PACKER_TEMPLATE]" 10 | echo 11 | echo "Build a box" 12 | } 13 | 14 | args() { 15 | if [ $# -lt 1 ]; then 16 | usage 17 | exit 0 18 | fi 19 | 20 | var_file=$1 21 | if [ ! -f ${var_file} ]; then 22 | var_file="${var_file}.json" 23 | if [ ! -f ${var_file} ]; then 24 | echo "$(basename $0): Invalid template file ${var_list_template}" 25 | exit 127 26 | fi 27 | fi 28 | only=${2:-} 29 | if [[ -n ${only} ]]; then 30 | if [[ ! $only =~ ^(vmware|virtualbox|parallels)$ ]]; then 31 | echo "$(basename $0): illegal platform $2" 32 | echo "Valid platforms: vmware|virtualbox|parallels" 33 | usage 34 | exit 1 35 | fi 36 | fi 37 | if [[ "${only}" = "vmware" ]]; then 38 | only=vmware-iso 39 | elif [[ "${only}" = "virtualbox" ]]; then 40 | only=virtualbox-iso 41 | elif [[ "${only}" = "parallels" ]]; then 42 | only=parallels-iso 43 | fi 44 | if [ -n "${only}" ]; then 45 | only="-only=${only}" 46 | fi 47 | packer_template=${3:-oraclelinux.json} 48 | } 49 | 50 | # main 51 | args "$@" 52 | 53 | version=$(cat VERSION) 54 | packer build ${only} -var-file=${var_file} -var "version=${version}" ${packer_template} 55 | -------------------------------------------------------------------------------- /bin/bump.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | if [ "${DEBUG:=false}" = "true" ]; then 4 | set -x 5 | fi 6 | 7 | usage() { 8 | echo "usage: $(basename $0) " 9 | echo 10 | echo "Available subcommands are:" 11 | echo " current Print current version" 12 | echo " major Bump major version (ex: 1.2.1 -> 2.0.0)" 13 | echo " minor Bump minor version (ex: 1.2.1 -> 1.3.0)" 14 | echo " patch Bump patch version (ex: 1.2.1 -> 1.2.2)" 15 | echo " tag Tag in Git using current version" 16 | } 17 | 18 | args() { 19 | if [ $# -lt 1 ]; then 20 | usage 21 | exit 0 22 | fi 23 | 24 | if [[ ! $1 =~ ^(current|major|minor|patch|tag)$ ]]; then 25 | usage 26 | exit 1 27 | fi 28 | 29 | subcommand=$1 30 | case $subcommand in 31 | "" | "-h" | "--help") 32 | usage 33 | ;; 34 | *) 35 | shift 36 | ;; 37 | esac 38 | $subcommand 39 | } 40 | 41 | current() { 42 | echo "Current version: ${CURRENT_VERSION}" 43 | } 44 | 45 | tag() { 46 | echo "tagged: ${CURRENT_VERSION}" 47 | git fetch --all > /dev/null 48 | git add CHANGELOG.md 49 | git commit -m "Version ${CURRENT_VERSION} pushed to Atlas" 50 | git tag -a -m "Version ${CURRENT_VERSION} pushed to Atlas" ${CURRENT_VERSION} 51 | git push --tags || true 52 | } 53 | 54 | write_version() { 55 | NEXT_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION} 56 | echo "Writing files: VERSION" 57 | echo ${NEXT_VERSION} > VERSION 58 | git fetch --all > /dev/null 59 | git add VERSION 60 | git commit -m "Bump VERSION to ${NEXT_VERSION}" 61 | } 62 | 63 | major() { 64 | MAJOR_VERSION=$((${MAJOR_VERSION}+1)) 65 | MINOR_VERSION=0 66 | PATCH_VERSION=0 67 | write_version 68 | } 69 | 70 | minor() { 71 | MAJOR_VERSION=${MAJOR_VERSION} 72 | MINOR_VERSION=$((${MINOR_VERSION}+1)) 73 | PATCH_VERSION=0 74 | write_version 75 | } 76 | 77 | patch() { 78 | MAJOR_VERSION=${MAJOR_VERSION} 79 | MINOR_VERSION=${MINOR_VERSION} 80 | PATCH_VERSION=$((${PATCH_VERSION}+1)) 81 | write_version 82 | } 83 | 84 | main() { 85 | CURRENT_VERSION=$(cat VERSION) 86 | VERSION_LIST=($(echo ${CURRENT_VERSION} | tr '.' ' ')) 87 | MAJOR_VERSION=${VERSION_LIST[0]} 88 | MINOR_VERSION=${VERSION_LIST[1]} 89 | PATCH_VERSION=${VERSION_LIST[2]} 90 | args "$@" 91 | } 92 | 93 | main "$@" 94 | 95 | -------------------------------------------------------------------------------- /bin/register_atlas.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o nounset # Treat unset variables as an error and immediately exit 3 | set -o errexit # If a command fails exit the whole script 4 | 5 | if [ "${DEBUG:-false}" = "true" ]; then 6 | set -x # Run the entire script in debug mode 7 | fi 8 | 9 | usage() { 10 | echo "usage: $(basename $0) " 11 | echo 12 | echo "Requires the following environment variables to be set:" 13 | echo " ATLAS_USERNAME" 14 | echo " ATLAS_ACCESS_TOKEN" 15 | echo " BOX_CUTTER_ATLAS_USERNAME" 16 | echo " BOX_CUTTER_ATLAS_ACCESS_TOKEN" 17 | } 18 | 19 | args() { 20 | if [ $# -lt 3 ]; then 21 | usage 22 | exit 1 23 | fi 24 | 25 | if [ -z ${ATLAS_USERNAME+x} ]; then 26 | echo "ATLAS_USERNAME environment variable not set!" 27 | usage 28 | exit 1 29 | elif [ -z ${ATLAS_ACCESS_TOKEN+x} ]; then 30 | echo "ATLAS_ACCESS_TOKEN environment variable not set!" 31 | usage 32 | exit 1 33 | elif [ -z ${BOX_CUTTER_ATLAS_USERNAME+x} ]; then 34 | echo "BOX_CUTTER_ATLAS_USERNAME environment variable not set!" 35 | usage 36 | exit 1 37 | elif [ -z ${BOX_CUTTER_ATLAS_ACCESS_TOKEN+x} ]; then 38 | echo "BOX_CUTTER_ATLAS_ACCESS_TOKEN environment variable not set!" 39 | usage 40 | exit 1 41 | fi 42 | 43 | BOX_NAME=$1 44 | BOX_SUFFIX=$2 45 | VERSION=$3 46 | } 47 | 48 | get_short_description() { 49 | if [[ "${BOX_NAME}" =~ i386 ]]; then 50 | BIT_STRING="32-bit" 51 | else 52 | BIT_STRING="64-bit" 53 | fi 54 | DOCKER_STRING= 55 | if [[ "${BOX_NAME}" =~ docker ]]; then 56 | DOCKER_STRING=" with Docker preinstalled" 57 | fi 58 | DESKTOP_STRING= 59 | if [[ "${BOX_NAME}" =~ desktop ]]; then 60 | DESKTOP_STRING=" Desktop" 61 | fi 62 | RAW_VERSION=${BOX_NAME#ol} 63 | RAW_VERSION=${RAW_VERSION%-i386} 64 | RAW_VERSION=${RAW_VERSION%-docker} 65 | RAW_VERSION=${RAW_VERSION%-desktop} 66 | PRETTY_VERSION=${RAW_VERSION:0:1}.${RAW_VERSION:1} 67 | 68 | VIRTUALBOX_VERSION=$(virtualbox --help | head -n 1 | awk '{print $NF}') 69 | PARALLELS_VERSION=$(prlctl --version | awk '{print $3}') 70 | VMWARE_VERSION=10.0.10 71 | SHORT_DESCRIPTION="Oracle Linux ${PRETTY_VERSION}${DESKTOP_STRING} (${BIT_STRING})${DOCKER_STRING}" 72 | } 73 | 74 | create_description() { 75 | if [[ "${BOX_NAME}" =~ i386 ]]; then 76 | BIT_STRING="32-bit" 77 | else 78 | BIT_STRING="64-bit" 79 | fi 80 | DOCKER_STRING= 81 | if [[ "${BOX_NAME}" =~ docker ]]; then 82 | DOCKER_STRING=" with Docker preinstalled" 83 | fi 84 | DESKTOP_STRING= 85 | if [[ "${BOX_NAME}" =~ desktop ]]; then 86 | DESKTOP_STRING=" Desktop" 87 | fi 88 | RAW_VERSION=${BOX_NAME#ol} 89 | RAW_VERSION=${RAW_VERSION%-i386} 90 | RAW_VERSION=${RAW_VERSION%-docker} 91 | RAW_VERSION=${RAW_VERSION%-desktop} 92 | PRETTY_VERSION=${RAW_VERSION:0:1}.${RAW_VERSION:1} 93 | 94 | VIRTUALBOX_VERSION=$(virtualbox --help | head -n 1 | awk '{print $NF}') 95 | PARALLELS_VERSION=$(prlctl --version | awk '{print $3}') 96 | VMWARE_VERSION=10.0.10 97 | 98 | VMWARE_BOX_FILE=box/vmware/${BOX_NAME}${BOX_SUFFIX} 99 | VIRTUALBOX_BOX_FILE=box/virtualbox/${BOX_NAME}${BOX_SUFFIX} 100 | PARALLELS_BOX_FILE=box/parallels/${BOX_NAME}${BOX_SUFFIX} 101 | DESCRIPTION="Oracle Linux ${PRETTY_VERSION}${DESKTOP_STRING} (${BIT_STRING})${DOCKER_STRING} 102 | 103 | " 104 | if [[ -e ${VMWARE_BOX_FILE} ]]; then 105 | FILESIZE=$(du -k -h "${VMWARE_BOX_FILE}" | cut -f1) 106 | DESCRIPTION=${DESCRIPTION}"VMWare ${FILESIZE}B/" 107 | fi 108 | if [[ -e ${VIRTUALBOX_BOX_FILE} ]]; then 109 | FILESIZE=$(du -k -h "${VIRTUALBOX_BOX_FILE}" | cut -f1) 110 | DESCRIPTION=${DESCRIPTION}"VirtualBox ${FILESIZE}B/" 111 | fi 112 | if [[ -e ${PARALLELS_BOX_FILE} ]]; then 113 | FILESIZE=$(du -k -h "${PARALLELS_BOX_FILE}" | cut -f1) 114 | DESCRIPTION=${DESCRIPTION}"Parallels ${FILESIZE}B/" 115 | fi 116 | DESCRIPTION=${DESCRIPTION%?} 117 | 118 | if [[ -e ${VMWARE_BOX_FILE} ]]; then 119 | DESCRIPTION="${DESCRIPTION} 120 | 121 | VMware Tools ${VMWARE_VERSION}" 122 | fi 123 | if [[ -e ${VIRTUALBOX_BOX_FILE} ]]; then 124 | DESCRIPTION="${DESCRIPTION} 125 | 126 | VirtualBox Guest Additions ${VIRTUALBOX_VERSION}" 127 | fi 128 | if [[ -e ${PARALLELS_BOX_FILE} ]]; then 129 | DESCRIPTION="${DESCRIPTION} 130 | 131 | Parallels Tools ${PARALLELS_VERSION}" 132 | fi 133 | 134 | VERSION_JSON=$( 135 | jq -n "{ 136 | version: { 137 | version: \"${VERSION}\", 138 | description: \"${DESCRIPTION}\" 139 | } 140 | }" 141 | ) 142 | } 143 | 144 | publish_provider() { 145 | atlas_username=$1 146 | atlas_access_token=$2 147 | 148 | echo "==> Checking to see if ${PROVIDER} provider exists" 149 | HTTP_STATUS=$(curl -s -f -o /dev/nul -w "%{http_code}" -i "${ATLAS_API_URL}/box/${atlas_username}/${BOX_NAME}/version/${VERSION}/provider/${PROVIDER}"?access_token="${atlas_access_token}" || true) 150 | echo ${HTTP_STATUS} 151 | if [ 200 -eq ${HTTP_STATUS} ]; then 152 | echo "==> Updating ${PROVIDER} provider" 153 | curl -X PUT "${ATLAS_API_URL}/box/${atlas_username}/${BOX_NAME}/version/${VERSION}/provider/${PROVIDER}" -d "access_token=${atlas_access_token}" -d provider[name]="${PROVIDER}" -d provider[url]="${PROVIDER_URL}" 154 | else 155 | echo "==> Creating ${PROVIDER} provider" 156 | curl -X POST "${ATLAS_API_URL}/box/${atlas_username}/${BOX_NAME}/version/${VERSION}/providers" -d "access_token=${atlas_access_token}" -d provider[name]="${PROVIDER}" -d provider[url]="${PROVIDER_URL}" 157 | fi 158 | } 159 | 160 | 161 | atlas_publish() { 162 | atlas_username=$1 163 | atlas_access_token=$2 164 | 165 | ATLAS_API_URL=https://atlas.hashicorp.com/api/v1 166 | 167 | echo "==> Checking for existing box ${BOX_NAME} on ${atlas_username}" 168 | # Retrieve box 169 | HTTP_STATUS=$(curl -s -f -o /dev/nul -w "%{http_code}" -i "${ATLAS_API_URL}/box/${atlas_username}/${BOX_NAME}"?access_token="${atlas_access_token}" || true) 170 | if [ 404 -eq ${HTTP_STATUS} ]; then 171 | echo "${BOX_NAME} does not exist, creating" 172 | get_short_description 173 | 174 | curl -X POST "${ATLAS_API_URL}/boxes" -d box[name]="${BOX_NAME}" -d box[short_description]="${SHORT_DESCRIPTION}" -d box[is_private]=false -d "access_token=${atlas_access_token}" 175 | elif [ 200 -ne ${HTTP_STATUS} ]; then 176 | echo "Unknown status ${HTTP_STATUS} from box/get" && exit 1 177 | fi 178 | 179 | echo "==> Checking for existing version ${VERSION} on ${atlas_username}" 180 | # Retrieve version 181 | HTTP_STATUS=$(curl -s -f -o /dev/nul -w "%{http_code}" -i "${ATLAS_API_URL}/box/${atlas_username}/${BOX_NAME}/version/${VERSION}" || true) 182 | if [ 404 -ne ${HTTP_STATUS} ] && [ 200 -ne ${HTTP_STATUS} ]; then 183 | echo "Unknown HTTP status ${HTTP_STATUS} from version/get" && exit 1 184 | fi 185 | 186 | create_description 187 | #echo "${VERSION_JSON}" 188 | if [ 404 -eq ${HTTP_STATUS} ]; then 189 | echo "==> none found; creating" 190 | JSON_RESULT=$(curl -s -f -X POST -H "Content-Type: application/json" "${ATLAS_API_URL}/box/${atlas_username}/${BOX_NAME}/versions?access_token=${atlas_access_token}" -d "${VERSION_JSON}" || true) 191 | else 192 | echo "==> version found; updating" 193 | JSON_RESULT=$(curl -s -f -X PUT "${ATLAS_API_URL}/box/${atlas_username}/${BOX_NAME}/version/${VERSION}" -d "access_token=${atlas_access_token}" -d "version[description]=${DESCRIPTION}" || true) 194 | fi 195 | 196 | BOXCUTTER_BASE_URL=http://cdn.boxcutter.io/oraclelinux 197 | if [[ -e ${VMWARE_BOX_FILE} ]]; then 198 | PROVIDER=vmware_desktop 199 | PROVIDER_URL=${BOXCUTTER_BASE_URL}/vmware${VMWARE_VERSION}/${BOX_NAME}${BOX_SUFFIX} 200 | publish_provider ${atlas_username} ${atlas_access_token} 201 | fi 202 | if [[ -e ${VIRTUALBOX_BOX_FILE} ]]; then 203 | PROVIDER=virtualbox 204 | PROVIDER_URL=${BOXCUTTER_BASE_URL}/virtualbox${VIRTUALBOX_VERSION}/${BOX_NAME}${BOX_SUFFIX} 205 | publish_provider ${atlas_username} ${atlas_access_token} 206 | fi 207 | if [[ -e ${PARALLELS_BOX_FILE} ]]; then 208 | PROVIDER=parallels 209 | PROVIDER_URL=${BOXCUTTER_BASE_URL}/parallels${PARALLELS_VERSION}/${BOX_NAME}${BOX_SUFFIX} 210 | publish_provider ${atlas_username} ${atlas_access_token} 211 | fi 212 | 213 | echo 214 | STATUS=$(echo ${JSON_RESULT} | jq -r .status) 215 | case $STATUS in 216 | unreleased) 217 | curl -X PUT "${ATLAS_API_URL}/box/${atlas_username}/${BOX_NAME}/version/${VERSION}/release" -d "access_token=${atlas_access_token}" 218 | echo 'released!' 219 | ;; 220 | active) 221 | echo 'already released' 222 | ;; 223 | *) 224 | abort "cannot publish version with status '$STATUS'" 225 | esac 226 | } 227 | 228 | main() { 229 | args "$@" 230 | 231 | ATLAS_API_URL=https://atlas.hashicorp.com/api/v1 232 | atlas_publish ${BOX_CUTTER_ATLAS_USERNAME} ${BOX_CUTTER_ATLAS_ACCESS_TOKEN} 233 | atlas_publish ${ATLAS_USERNAME} ${ATLAS_ACCESS_TOKEN} 234 | } 235 | 236 | main "$@" 237 | -------------------------------------------------------------------------------- /bin/ssh-box: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit -o nounset -o pipefail 3 | 4 | if [ "${DEBUG:=false}" = "true" ]; then 5 | set -o xtrace 6 | fi 7 | 8 | usage() { 9 | echo "usage: $(basename $0) BOX_PATH [vmware|virtualbox|parallels]" 10 | echo 11 | echo "Temporarily register a vagrant box to login to it" 12 | } 13 | 14 | args() { 15 | if [ $# -lt 2 ]; then 16 | usage 17 | exit 0 18 | fi 19 | 20 | if [[ ! $2 =~ ^(vmware|virtualbox|parallels)$ ]]; then 21 | echo "$(basename $0): illegal platform $2" 22 | echo "Valid platforms: vmware|virtualbox|parallels" 23 | usage 24 | exit 1 25 | fi 26 | 27 | box_path=$1 28 | box_provider=$2 29 | vagrant_provider=${3:-${box_provider}} 30 | if [ "$box_provider" = "vmware" ]; then 31 | box_provider=vmware_desktop 32 | if [[ $OSTYPE =~ darwin ]]; then 33 | vagrant_provider=vmware_fusion 34 | else 35 | vagrant_provider=vmware_workstation 36 | fi 37 | fi 38 | } 39 | 40 | # main 41 | args "$@" 42 | 43 | box_filename=$(basename "${box_path}") 44 | box_name=${box_filename%.*} 45 | tmp_path=/tmp/boxtest 46 | 47 | rm -rf ${tmp_path} 48 | 49 | vagrant box remove ${box_name} --provider ${box_provider} || true 50 | vagrant box add ${box_name} ${box_path} 51 | mkdir -p ${tmp_path} 52 | 53 | pushd ${tmp_path} 54 | vagrant init ${box_name} 55 | VAGRANT_LOG=warn vagrant up --provider ${vagrant_provider} 56 | vagrant ssh 57 | # vagrant won't actually tear down the VM 58 | sleep 10 59 | vagrant destroy -f 60 | popd 61 | 62 | vagrant box remove ${box_name} --provider ${box_provider} 63 | -------------------------------------------------------------------------------- /bin/test-box: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit -o nounset -o pipefail 3 | 4 | if [ "${DEBUG:=false}" = "true" ]; then 5 | set -o xtrace 6 | fi 7 | 8 | usage() { 9 | echo "usage: $(basename $0) BOX_PATH [vmware|virtualbox|parallels]" 10 | echo 11 | echo "Run automated tests against a local *.box file" 12 | } 13 | 14 | args() { 15 | if [ $# -lt 2 ]; then 16 | usage 17 | exit 0 18 | fi 19 | 20 | if [[ ! $2 =~ ^(vmware|virtualbox|parallels)$ ]]; then 21 | echo "$(basename $0): illegal platform $2" 22 | echo "Valid platforms: vmware|virtualbox|parallels" 23 | usage 24 | exit 1 25 | fi 26 | 27 | box_path=$1 28 | box_provider=$2 29 | vagrant_provider=${3:-${box_provider}} 30 | if [ "$box_provider" = "vmware" ]; then 31 | box_provider=vmware_desktop 32 | if [[ $OSTYPE =~ darwin ]]; then 33 | vagrant_provider=vmware_fusion 34 | else 35 | vagrant_provider=vmware_workstation 36 | fi 37 | fi 38 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 39 | test_src_path=${SCRIPT_DIR}/../test/*_spec.rb 40 | } 41 | 42 | create_vagrantfile_linux() { 43 | vagrant plugin list | grep vagrant-serverspec && echo "vagrant-serverspec installed" || vagrant plugin install vagrant-serverspec 44 | cat << EOF > ${tmp_path}/Vagrantfile 45 | Vagrant.configure('2') do |config| 46 | config.vm.box = '$box_name' 47 | 48 | config.vm.provision :serverspec do |spec| 49 | spec.pattern = '${test_src_path}' 50 | end 51 | end 52 | EOF 53 | } 54 | 55 | # main 56 | 57 | args "$@" 58 | 59 | box_filename=$(basename "${box_path}") 60 | box_name=${box_filename%.*} 61 | tmp_path=/tmp/boxtest 62 | 63 | rm -rf ${tmp_path} 64 | 65 | vagrant box remove ${box_name} --provider ${box_provider} 2>/dev/null || true 66 | vagrant box add ${box_name} ${box_path} 67 | mkdir -p ${tmp_path} 68 | 69 | pushd ${tmp_path} 70 | create_vagrantfile_linux 71 | VAGRANT_LOG=warn vagrant up --provider ${vagrant_provider} 72 | vagrant destroy -f 73 | popd 74 | 75 | vagrant box remove ${box_name} --provider ${box_provider} 76 | -------------------------------------------------------------------------------- /bin/test-vagrantcloud-box: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit -o nounset -o pipefail 3 | 4 | if [ "${DEBUG:=false}" = "true" ]; then 5 | set -o xtrace 6 | fi 7 | 8 | usage() { 9 | echo "usage: $(basename $0) BOX_NAME [vmware|virtualbox|parallels]" 10 | echo 11 | echo "Download BOX_NAME from Atlas and run automated tests against it" 12 | } 13 | 14 | args() { 15 | if [ $# -lt 2 ]; then 16 | usage 17 | exit 0 18 | fi 19 | 20 | if [[ ! $2 =~ ^(vmware|virtualbox|parallels)$ ]]; then 21 | echo "$(basename $0): illegal platform $2" 22 | echo "Valid platforms: vmware|virtualbox|parallels" 23 | usage 24 | exit 1 25 | fi 26 | 27 | box_path=$1 28 | box_provider=$2 29 | vagrant_provider=${3:-${box_provider}} 30 | if [ "$box_provider" = "vmware" ]; then 31 | box_provider=vmware_desktop 32 | if [[ $OSTYPE =~ darwin ]]; then 33 | vagrant_provider=vmware_fusion 34 | else 35 | vagrant_provider=vmware_workstation 36 | fi 37 | fi 38 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 39 | test_src_path=${SCRIPT_DIR}/../test/*_spec.rb 40 | } 41 | 42 | create_vagrantfile_linux() { 43 | vagrant plugin list | grep vagrant-serverspec && echo "vagrant-serverspec installed" || vagrant plugin install vagrant-serverspec 44 | cat << EOF > $tmp_path/Vagrantfile 45 | Vagrant.configure('2') do |config| 46 | config.vm.box = '$box_path' 47 | 48 | config.vm.provision :serverspec do |spec| 49 | spec.pattern = '$test_src_path' 50 | end 51 | end 52 | EOF 53 | } 54 | 55 | # main 56 | 57 | args "$@" 58 | 59 | box_filename=$(basename "${box_path}") 60 | box_name=${box_filename%.*} 61 | tmp_path=/tmp/vagrantcloudtest 62 | 63 | rm -rf ${tmp_path} 64 | rm -f ~/.ssh/known_hosts 65 | 66 | vagrant box remove ${box_path} --provider ${box_provider} 2>/dev/null || true 67 | vagrant box add ${box_path} --provider=${box_provider} 68 | mkdir -p ${tmp_path} 69 | 70 | pushd ${tmp_path} 71 | create_vagrantfile_linux 72 | VAGRANT_LOG=warn vagrant up --provider=${vagrant_provider} 73 | sleep 10 74 | vagrant destroy -f 75 | popd 76 | 77 | vagrant box remove ${box_path} --provider=${box_provider} 78 | -------------------------------------------------------------------------------- /floppy/vmware9.compat_dcache.h.patch: -------------------------------------------------------------------------------- 1 | --- ./compat_dcache.h 2014-07-28 14:38:17.432007648 +0000 2 | +++ ./compat_dcache.h 2014-07-28 14:40:46.287013940 +0000 3 | @@ -51,7 +51,7 @@ 4 | /* 5 | * d_count field was removed in 3.11.0. 6 | */ 7 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 8 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) 9 | #define compat_d_count(dentry) d_count(dentry) 10 | #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) 11 | #define compat_d_count(dentry) dentry->d_count 12 | -------------------------------------------------------------------------------- /http/ks5.cfg: -------------------------------------------------------------------------------- 1 | # CentOS 5.x kickstart file - ks5.cfg 2 | # 3 | # For more information on kickstart syntax and commands, refer to the 4 | # CentOS Installation Guide: 5 | # http://www.centos.org/docs/5/html/Installation_Guide-en-US/ch-kickstart2.html 6 | # 7 | # For testing, you can fire up a local http server temporarily. 8 | # cd to the directory where this ks.cfg file resides and run the following: 9 | # $ python -m SimpleHTTPServer 10 | # You don't have to restart the server every time you make changes. Python 11 | # will reload the file from disk every time. As long as you save your changes 12 | # they will be reflected in the next HTTP download. Then to test with 13 | # a PXE boot server, enter the following on the PXE boot prompt: 14 | # > linux text ks=http://:8000/ks.cfg 15 | 16 | # Required settings 17 | lang en_US.UTF-8 18 | keyboard us 19 | rootpw vagrant 20 | authconfig --enableshadow --enablemd5 21 | timezone UTC 22 | 23 | # Optional settings 24 | install 25 | cdrom 26 | user --name=vagrant --password vagrant 27 | network --bootproto=dhcp 28 | firewall --disabled 29 | selinux --permissive 30 | bootloader --location=mbr 31 | text 32 | skipx 33 | zerombr 34 | clearpart --all --initlabel 35 | autopart 36 | firstboot --disabled 37 | reboot 38 | 39 | #%packages --ignoremissing --excludedocs 40 | %packages --nobase --ignoremissing --excludedocs 41 | # vagrant needs this to copy initial files via scp 42 | openssh-clients 43 | openssh-server 44 | # Prerequisites for installing VMware Tools or VirtualBox guest additions. 45 | # Put in kickstart to ensure first version installed is from install disk, 46 | # not latest from a mirror. 47 | kernel-headers 48 | kernel-devel 49 | gcc 50 | make 51 | perl 52 | curl 53 | wget 54 | bzip2 55 | # Selinux 56 | policycoreutils 57 | selinux-policy 58 | selinux-policy-targeted 59 | libselinux 60 | libselinux-utils 61 | libselinux-python 62 | # Other stuff 63 | dhclient 64 | sudo 65 | yum 66 | nfs-utils 67 | -fprintd-pam 68 | -intltool 69 | -avahi 70 | -bluez-utils 71 | -dogtail 72 | -kudzu 73 | 74 | # unnecessary firmware 75 | -aic94xx-firmware 76 | -atmel-firmware 77 | -b43-openfwwf 78 | -bfa-firmware 79 | -ipw*-firmware 80 | -irqbalance 81 | -ivtv-firmware 82 | -iwl*-firmware 83 | -libertas-usb8388-firmware 84 | -ql*-firmware 85 | -rt61pci-firmware 86 | -rt73usb-firmware 87 | -xorg-x11-drv-ati-firmware 88 | -zd1211-firmware 89 | 90 | %post 91 | # add OEL repositories 92 | wget -O/etc/yum.repos.d/public-yum-el5.repo http://public-yum.oracle.com/public-yum-el5.repo 93 | # configure vagrant user in sudoers 94 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers 95 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 96 | -------------------------------------------------------------------------------- /http/ks6-desktop.cfg: -------------------------------------------------------------------------------- 1 | # CentOS 6.x kickstart file - ks6-desktop.cfg 2 | # 3 | # For more information on kickstart syntax and commands, refer to the 4 | # CentOS Installation Guide: 5 | # https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html 6 | # 7 | # For testing, you can fire up a local http server temporarily. 8 | # cd to the directory where this ks.cfg file resides and run the following: 9 | # $ python -m SimpleHTTPServer 10 | # You don't have to restart the server every time you make changes. Python 11 | # will reload the file from disk every time. As long as you save your changes 12 | # they will be reflected in the next HTTP download. Then to test with 13 | # a PXE boot server, enter the following on the PXE boot prompt: 14 | # > linux text ks=http://:8000/ks.cfg 15 | 16 | # Required settings 17 | lang en_US.UTF-8 18 | keyboard us 19 | rootpw vagrant 20 | authconfig --enableshadow --enablemd5 21 | timezone UTC 22 | 23 | # Optional settings 24 | install 25 | cdrom 26 | user --name=vagrant --plaintext --password vagrant 27 | unsupported_hardware 28 | network --bootproto=dhcp 29 | firewall --disabled 30 | selinux --permissive 31 | bootloader --location=mbr 32 | text 33 | xconfig --startxonboot 34 | zerombr 35 | clearpart --all --initlabel 36 | autopart 37 | firstboot --disabled 38 | reboot --eject 39 | 40 | %packages --ignoremissing --excludedocs 41 | # yum -v grouplist - get groupids 42 | @base 43 | @debugging 44 | @directory-client 45 | @java-platform 46 | @network-file-system-client 47 | @print-client 48 | @basic-desktop 49 | @desktop-debugging 50 | @desktop-platform 51 | @fonts 52 | @general-desktop 53 | @graphical-admin-tools 54 | @input-methods 55 | @legacy-x 56 | @remote-desktop-clients 57 | @x11 58 | @server-platform 59 | @internet-applications 60 | @internet-browser 61 | @office-suite 62 | # vagrant needs this to copy initial files via scp 63 | openssh-clients 64 | # Prerequisites for installing VMware Tools or VirtualBox guest additions. 65 | # Put in kickstart to ensure first version installed is from install disk, 66 | # not latest from a mirror. 67 | kernel-headers 68 | kernel-devel 69 | gcc 70 | make 71 | perl 72 | curl 73 | wget 74 | # Selinux 75 | policycoreutils 76 | selinux-policy 77 | selinux-policy-targeted 78 | libselinux 79 | libselinux-utils 80 | libselinux-python 81 | # Other stuff 82 | sudo 83 | nfs-utils 84 | -fprintd-pam 85 | -intltool 86 | unzip 87 | redhat-lsb-core 88 | 89 | # unnecessary firmware 90 | -aic94xx-firmware 91 | -atmel-firmware 92 | -b43-openfwwf 93 | -bfa-firmware 94 | -ipw*-firmware 95 | -irqbalance 96 | -ivtv-firmware 97 | -iwl*-firmware 98 | -libertas-usb8388-firmware 99 | -ql*-firmware 100 | -rt61pci-firmware 101 | -rt73usb-firmware 102 | -xorg-x11-drv-ati-firmware 103 | -zd1211-firmware 104 | %end 105 | 106 | %post 107 | # add OEL repositories 108 | wget -O/etc/yum.repos.d/public-yum-el6.repo http://public-yum.oracle.com/public-yum-el6.repo 109 | # configure vagrant user in sudoers 110 | echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 111 | cp /etc/sudoers /etc/sudoers.orig 112 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 113 | sed -i "s/^\(.*env_keep = \"\)/\1PATH /" /etc/sudoers 114 | %end 115 | -------------------------------------------------------------------------------- /http/ks6.cfg: -------------------------------------------------------------------------------- 1 | # CentOS 6.x kickstart file - ks6.cfg 2 | # 3 | # For more information on kickstart syntax and commands, refer to the 4 | # CentOS Installation Guide: 5 | # https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html 6 | # 7 | # For testing, you can fire up a local http server temporarily. 8 | # cd to the directory where this ks.cfg file resides and run the following: 9 | # $ python -m SimpleHTTPServer 10 | # You don't have to restart the server every time you make changes. Python 11 | # will reload the file from disk every time. As long as you save your changes 12 | # they will be reflected in the next HTTP download. Then to test with 13 | # a PXE boot server, enter the following on the PXE boot prompt: 14 | # > linux text ks=http://:8000/ks.cfg 15 | 16 | # Required settings 17 | lang en_US.UTF-8 18 | keyboard us 19 | rootpw vagrant 20 | authconfig --enableshadow --enablemd5 21 | timezone UTC 22 | 23 | # Optional settings 24 | install 25 | cdrom 26 | user --name=vagrant --plaintext --password vagrant 27 | unsupported_hardware 28 | network --bootproto=dhcp 29 | firewall --disabled 30 | selinux --permissive 31 | bootloader --location=mbr 32 | text 33 | skipx 34 | zerombr 35 | clearpart --all --initlabel 36 | autopart 37 | firstboot --disabled 38 | reboot 39 | 40 | %packages --nobase --ignoremissing --excludedocs 41 | # vagrant needs this to copy initial files via scp 42 | openssh-clients 43 | # Prerequisites for installing VMware Tools or VirtualBox guest additions. 44 | # Put in kickstart to ensure first version installed is from install disk, 45 | # not latest from a mirror. 46 | kernel-headers 47 | kernel-devel 48 | gcc 49 | make 50 | perl 51 | curl 52 | wget 53 | # Other stuff 54 | sudo 55 | nfs-utils 56 | -fprintd-pam 57 | -intltool 58 | unzip 59 | redhat-lsb-core 60 | # Selinux 61 | policycoreutils 62 | selinux-policy 63 | selinux-policy-targeted 64 | libselinux 65 | libselinux-utils 66 | libselinux-python 67 | # Workaround for selinux 68 | -system-config-firewall-tui 69 | system-config-firewall-base 70 | 71 | # unnecessary firmware 72 | -aic94xx-firmware 73 | -atmel-firmware 74 | -b43-openfwwf 75 | -bfa-firmware 76 | -ipw*-firmware 77 | -irqbalance 78 | -ivtv-firmware 79 | -iwl*-firmware 80 | -libertas-usb8388-firmware 81 | -ql*-firmware 82 | -rt61pci-firmware 83 | -rt73usb-firmware 84 | -xorg-x11-drv-ati-firmware 85 | -zd1211-firmware 86 | %end 87 | 88 | %post 89 | # add OEL repositories 90 | wget -O/etc/yum.repos.d/public-yum-el6.repo http://public-yum.oracle.com/public-yum-el6.repo 91 | # configure vagrant user in sudoers 92 | echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 93 | cp /etc/sudoers /etc/sudoers.orig 94 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 95 | sed -i "s/^\(.*env_keep = \"\)/\1PATH /" /etc/sudoers 96 | %end 97 | -------------------------------------------------------------------------------- /http/ks7-desktop.cfg: -------------------------------------------------------------------------------- 1 | # CentOS 7.x kickstart file - ks7.cfg 2 | # 3 | # For more information on kickstart syntax and commands, refer to the 4 | # CentOS Installation Guide: 5 | # https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html 6 | # 7 | # For testing, you can fire up a local http server temporarily. 8 | # cd to the directory where this ks.cfg file resides and run the following: 9 | # $ python -m SimpleHTTPServer 10 | # You don't have to restart the server every time you make changes. Python 11 | # will reload the file from disk every time. As long as you save your changes 12 | # they will be reflected in the next HTTP download. Then to test with 13 | # a PXE boot server, enter the following on the PXE boot prompt: 14 | # > linux text ks=http://:8000/ks.cfg 15 | 16 | # Required settings 17 | lang en_US.UTF-8 18 | keyboard us 19 | rootpw vagrant 20 | authconfig --enableshadow --enablemd5 21 | timezone UTC 22 | 23 | # Optional settings 24 | install 25 | cdrom 26 | user --name=vagrant --plaintext --password vagrant 27 | unsupported_hardware 28 | network --bootproto=dhcp 29 | firewall --disabled 30 | selinux --permissive 31 | bootloader --location=mbr 32 | text 33 | xconfig --startxonboot --defaultdesktop=gnome 34 | eula --agreed 35 | zerombr 36 | clearpart --all --initlabel 37 | autopart 38 | firstboot --disabled 39 | reboot --eject 40 | 41 | %packages --ignoremissing --excludedocs 42 | @core 43 | @fonts 44 | @x11 45 | @gnome-desktop 46 | @input-methods 47 | anaconda 48 | isomd5sum 49 | kernel 50 | memtest86+ 51 | grub2-efi 52 | grub2 53 | shim 54 | syslinux 55 | -dracut-config-rescue 56 | # vagrant needs this to copy initial files via scp 57 | openssh-clients 58 | # Prerequisites for installing VMware Tools or VirtualBox guest additions. 59 | # Put in kickstart to ensure first version installed is from install disk, 60 | # not latest from a mirror. 61 | kernel-headers 62 | kernel-devel 63 | gcc 64 | make 65 | perl 66 | curl 67 | wget 68 | bzip2 69 | dkms 70 | patch 71 | net-tools 72 | git 73 | # Core selinux dependencies installed on 7.x, no need to specify 74 | # Other stuff 75 | sudo 76 | nfs-utils 77 | %end 78 | 79 | %post 80 | # configure vagrant user in sudoers 81 | echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 82 | cp /etc/sudoers /etc/sudoers.orig 83 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 84 | # keep proxy settings through sudo 85 | echo "Defaults env_keep += \"HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY NO_PROXY\"" >> /etc/sudoers 86 | %end 87 | -------------------------------------------------------------------------------- /http/ks7.cfg: -------------------------------------------------------------------------------- 1 | # CentOS 7.x kickstart file - ks7.cfg 2 | # 3 | # For more information on kickstart syntax and commands, refer to the 4 | # CentOS Installation Guide: 5 | # https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html 6 | # 7 | # For testing, you can fire up a local http server temporarily. 8 | # cd to the directory where this ks.cfg file resides and run the following: 9 | # $ python -m SimpleHTTPServer 10 | # You don't have to restart the server every time you make changes. Python 11 | # will reload the file from disk every time. As long as you save your changes 12 | # they will be reflected in the next HTTP download. Then to test with 13 | # a PXE boot server, enter the following on the PXE boot prompt: 14 | # > linux text ks=http://:8000/ks.cfg 15 | 16 | # Required settings 17 | lang en_US.UTF-8 18 | keyboard us 19 | rootpw vagrant 20 | authconfig --enableshadow --enablemd5 21 | timezone UTC 22 | 23 | # Optional settings 24 | install 25 | cdrom 26 | user --name=vagrant --plaintext --password vagrant 27 | unsupported_hardware 28 | network --bootproto=dhcp 29 | firewall --disabled 30 | selinux --permissive 31 | bootloader --location=mbr 32 | text 33 | skipx 34 | zerombr 35 | clearpart --all --initlabel 36 | autopart 37 | firstboot --disabled 38 | reboot 39 | 40 | %packages --nobase --ignoremissing --excludedocs 41 | # vagrant needs this to copy initial files via scp 42 | openssh-clients 43 | # Prerequisites for installing VMware Tools or VirtualBox guest additions. 44 | # Put in kickstart to ensure first version installed is from install disk, 45 | # not latest from a mirror. 46 | kernel-headers 47 | kernel-devel 48 | gcc 49 | make 50 | perl 51 | curl 52 | wget 53 | bzip2 54 | dkms 55 | patch 56 | net-tools 57 | git 58 | # Core selinux dependencies installed on 7.x, no need to specify 59 | # Other stuff 60 | sudo 61 | nfs-utils 62 | -fprintd-pam 63 | -intltool 64 | 65 | # unnecessary firmware 66 | -aic94xx-firmware 67 | -atmel-firmware 68 | -b43-openfwwf 69 | -bfa-firmware 70 | -ipw*-firmware 71 | -irqbalance 72 | -ivtv-firmware 73 | -iwl*-firmware 74 | -libertas-usb8388-firmware 75 | -ql*-firmware 76 | -rt61pci-firmware 77 | -rt73usb-firmware 78 | -xorg-x11-drv-ati-firmware 79 | -zd1211-firmware 80 | %end 81 | 82 | %post 83 | # configure vagrant user in sudoers 84 | echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 85 | cp /etc/sudoers /etc/sudoers.orig 86 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 87 | # keep proxy settings through sudo 88 | echo "Defaults env_keep += \"HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY NO_PROXY\"" >> /etc/sudoers 89 | %end 90 | -------------------------------------------------------------------------------- /ol511-i386.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol511-i386.json oraclelinux.json`", 3 | "vm_name": "ol511-i386", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "e60962c4ebf8920bbd828efe32a78a7cc8f28e3b", 7 | "iso_checksum_type": "sha1", 8 | "iso_name": "Enterprise-R5-U11-Server-i386-dvd.iso", 9 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/EL5/U11/i386/Enterprise-R5-U11-Server-i386-dvd.iso", 10 | "kickstart": "ks5.cfg", 11 | "memory": "512", 12 | "parallels_guest_os_type": "rhel", 13 | "virtualbox_guest_os_type": "Oracle", 14 | "vmware_guest_os_type": "oraclelinux", 15 | "shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now" 16 | } 17 | -------------------------------------------------------------------------------- /ol511.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol511.json oraclelinux.json`", 3 | "vm_name": "ol511", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "2d38f76652cbc1367fdf30024f13cde5f6bf34df", 7 | "iso_checksum_type": "sha1", 8 | "iso_name": "Enterprise-R5-U11-Server-x86_64-dvd.iso", 9 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/EL5/U11/x86_64/Enterprise-R5-U11-Server-x86_64-dvd.iso", 10 | "kickstart": "ks5.cfg", 11 | "memory": "512", 12 | "shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h now" 13 | } 14 | -------------------------------------------------------------------------------- /ol67-desktop.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol67-desktop.json oraclelinux.json`", 3 | "vm_name": "ol67-desktop", 4 | "cpus": "1", 5 | "desktop": "true", 6 | "disk_size": "130048", 7 | "iso_checksum": "dd7231b378f23e2e846ac78b0c5d8974a23631d5", 8 | "iso_checksum_type": "sha1", 9 | "iso_name": "OracleLinux-R6-U7-Server-x86_64-dvd.iso", 10 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL6/U7/x86_64/OracleLinux-R6-U7-Server-x86_64-dvd.iso", 11 | "kickstart": "ks6-desktop.cfg", 12 | "memory": "1024", 13 | "vagrantfile_template": "tpl/vagrantfile-ol67-desktop.tpl" 14 | } 15 | -------------------------------------------------------------------------------- /ol67-i386.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol67-i386.json oraclelinux.json`", 3 | "vm_name": "ol67-i386", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "f35c749fbdd7bf0fb0a676c477728d0b864e4d69", 7 | "iso_checksum_type": "sha1", 8 | "iso_name": "OracleLinux-R6-U7-Server-i386-dvd.iso", 9 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL6/U7/i386/OracleLinux-R6-U7-Server-i386-dvd.iso", 10 | "kickstart": "ks6.cfg", 11 | "memory": "512", 12 | "parallels_guest_os_type": "rhel", 13 | "virtualbox_guest_os_type": "Oracle", 14 | "vmware_guest_os_type": "oraclelinux" 15 | } 16 | -------------------------------------------------------------------------------- /ol67.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol67.json oraclelinux.json`", 3 | "vm_name": "ol67", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "dd7231b378f23e2e846ac78b0c5d8974a23631d5", 7 | "iso_checksum_type": "sha1", 8 | "iso_name": "OracleLinux-R6-U7-Server-x86_64-dvd.iso", 9 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL6/U7/x86_64/OracleLinux-R6-U7-Server-x86_64-dvd.iso", 10 | "kickstart": "ks6.cfg", 11 | "memory": "512" 12 | } 13 | -------------------------------------------------------------------------------- /ol68-i386.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol68-i386.json oraclelinux.json`", 3 | "vm_name": "ol68-i386", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "a046672b0107992817c22284c25884d07f32f2c9", 7 | "iso_checksum_type": "sha1", 8 | "iso_name": "OracleLinux-R6-U8-Server-i386-dvd.iso", 9 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL6/U8/i386/OracleLinux-R6-U8-Server-i386-dvd.iso", 10 | "kickstart": "ks6.cfg", 11 | "memory": "512", 12 | "parallels_guest_os_type": "rhel", 13 | "virtualbox_guest_os_type": "Oracle", 14 | "vmware_guest_os_type": "oraclelinux" 15 | } 16 | -------------------------------------------------------------------------------- /ol68.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol68.json oraclelinux.json`", 3 | "vm_name": "ol68", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "d9c0fbe32fe59b5a9fb9a1e1625f64d85a8201b6", 7 | "iso_checksum_type": "sha1", 8 | "iso_name": "OracleLinux-R6-U8-Server-x86_64-dvd.iso", 9 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL6/U8/x86_64/OracleLinux-R6-U8-Server-x86_64-dvd.iso", 10 | "kickstart": "ks6.cfg", 11 | "memory": "512" 12 | } 13 | -------------------------------------------------------------------------------- /ol72-desktop.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol72-desktop.json oraclelinux.json`", 3 | "vm_name": "ol72-desktop", 4 | "cpus": "1", 5 | "desktop": "true", 6 | "disk_size": "130048", 7 | "iso_checksum": "03e048f23d798c8e8e7935fab76245c2f1341378", 8 | "iso_checksum_type": "sha1", 9 | "iso_name": "OracleLinux-R7-U2-Server-x86_64-dvd.iso", 10 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL7/u2/x86_64/OracleLinux-R7-U2-Server-x86_64-dvd.iso", 11 | "kickstart": "ks7-desktop.cfg", 12 | "memory": "1024", 13 | "vagrantfile_template": "tpl/vagrantfile-ol72-desktop.tpl", 14 | "parallels_guest_os_type": "rhel7" 15 | } 16 | -------------------------------------------------------------------------------- /ol72.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol72.json oraclelinux.json`", 3 | "vm_name": "ol72", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "03e048f23d798c8e8e7935fab76245c2f1341378", 7 | "iso_checksum_type": "sha1", 8 | "iso_name": "OracleLinux-R7-U2-Server-x86_64-dvd.iso", 9 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL7/u2/x86_64/OracleLinux-R7-U2-Server-x86_64-dvd.iso", 10 | "kickstart": "ks7.cfg", 11 | "memory": "512", 12 | "parallels_guest_os_type": "rhel7" 13 | } 14 | -------------------------------------------------------------------------------- /ol73-desktop.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol73-desktop.json oraclelinux.json`", 3 | "vm_name": "ol73-desktop", 4 | "cpus": "1", 5 | "desktop": "true", 6 | "disk_size": "130048", 7 | "iso_checksum": "130ee6cda827aa092b6eb66a145420f9801aa321", 8 | "iso_checksum_type": "sha1", 9 | "iso_name": "OracleLinux-R7-U3-Server-x86_64-dvd.iso", 10 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL7/u3/x86_64/OracleLinux-R7-U3-Server-x86_64-dvd.iso", 11 | "kickstart": "ks7-desktop.cfg", 12 | "memory": "1024", 13 | "vagrantfile_template": "tpl/vagrantfile-ol73-desktop.tpl", 14 | "parallels_guest_os_type": "rhel7" 15 | } 16 | -------------------------------------------------------------------------------- /ol73.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol73.json oraclelinux.json`", 3 | "vm_name": "ol73", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "130ee6cda827aa092b6eb66a145420f9801aa321", 7 | "iso_checksum_type": "sha1", 8 | "iso_name": "OracleLinux-R7-U3-Server-x86_64-dvd.iso", 9 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL7/u3/x86_64/OracleLinux-R7-U3-Server-x86_64-dvd.iso", 10 | "kickstart": "ks7.cfg", 11 | "memory": "512", 12 | "parallels_guest_os_type": "rhel7" 13 | } 14 | -------------------------------------------------------------------------------- /ol74-desktop.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol74-desktop.json oraclelinux.json`", 3 | "vm_name": "ol74-desktop", 4 | "cpus": "1", 5 | "desktop": "true", 6 | "disk_size": "130048", 7 | "iso_checksum": "f2e11a2fceba8e285490c8df7c2172336cc23eb4bab95924b98d1029dce7eb0b", 8 | "iso_checksum_type": "sha256", 9 | "iso_name": "OracleLinux-R7-U4-Server-x86_64-dvd.iso", 10 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL7/u4/x86_64/OracleLinux-R7-U4-Server-x86_64-dvd.iso", 11 | "kickstart": "ks7-desktop.cfg", 12 | "memory": "1024", 13 | "vagrantfile_template": "tpl/vagrantfile-ol74-desktop.tpl", 14 | "parallels_guest_os_type": "rhel7" 15 | } 16 | -------------------------------------------------------------------------------- /ol74.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ol74.json oraclelinux.json`", 3 | "headless": "true", 4 | "vm_name": "ol74", 5 | "cpus": "2", 6 | "disk_size": "65536", 7 | "iso_checksum": "f2e11a2fceba8e285490c8df7c2172336cc23eb4bab95924b98d1029dce7eb0b", 8 | "iso_checksum_type": "sha256", 9 | "iso_name": "OracleLinux-R7-U4-Server-x86_64-dvd.iso", 10 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL7/u4/x86_64/OracleLinux-R7-U4-Server-x86_64-dvd.iso", 11 | "kickstart": "ks7.cfg", 12 | "memory": "512", 13 | "parallels_guest_os_type": "rhel7" 14 | } 15 | -------------------------------------------------------------------------------- /oraclelinux.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build oraclelinux.json`", 3 | "builders": [ 4 | { 5 | "boot_command": [ 6 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/{{ user `kickstart` }}" 7 | ], 8 | "disk_size": "{{ user `disk_size` }}", 9 | "guest_os_type": "{{ user `vmware_guest_os_type` }}", 10 | "headless": "{{ user `headless` }}", 11 | "http_directory": "http", 12 | "iso_checksum": "{{ user `iso_checksum` }}", 13 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 14 | "iso_urls": [ 15 | "{{ user `iso_path` }}/{{ user `iso_name` }}", 16 | "{{ user `iso_url` }}" 17 | ], 18 | "output_directory": "output-{{ user `vm_name` }}-vmware-iso", 19 | "shutdown_command": "{{ user `shutdown_command` }}", 20 | "ssh_password": "{{ user `ssh_password` }}", 21 | "ssh_username": "{{ user `ssh_username` }}", 22 | "ssh_wait_timeout": "10000s", 23 | "tools_upload_flavor": "linux", 24 | "type": "vmware-iso", 25 | "vm_name": "{{ user `vm_name` }}", 26 | "vmx_data": { 27 | "cpuid.coresPerSocket": "1", 28 | "memsize": "{{ user `memory` }}", 29 | "numvcpus": "{{ user `cpus` }}" 30 | } 31 | }, 32 | { 33 | "boot_command": [ 34 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/{{ user `kickstart` }}" 35 | ], 36 | "disk_size": "{{ user `disk_size` }}", 37 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", 38 | "guest_os_type": "{{ user `virtualbox_guest_os_type` }}", 39 | "hard_drive_interface": "sata", 40 | "headless": "{{ user `headless` }}", 41 | "http_directory": "http", 42 | "iso_checksum": "{{ user `iso_checksum` }}", 43 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 44 | "iso_urls": [ 45 | "{{ user `iso_path` }}/{{ user `iso_name` }}", 46 | "{{ user `iso_url` }}" 47 | ], 48 | "output_directory": "output-{{ user `vm_name` }}-virtualbox-iso", 49 | "shutdown_command": "{{ user `shutdown_command` }}", 50 | "ssh_password": "{{ user `ssh_password` }}", 51 | "ssh_username": "{{ user `ssh_username` }}", 52 | "ssh_wait_timeout": "10000s", 53 | "type": "virtualbox-iso", 54 | "vboxmanage": [ 55 | [ 56 | "modifyvm", "{{.Name}}", "--memory", "{{ user `memory` }}" 57 | ], 58 | [ 59 | "modifyvm", "{{.Name}}", "--cpus", "{{ user `cpus` }}" 60 | ] 61 | ], 62 | "virtualbox_version_file": ".vbox_version", 63 | "vm_name": "{{ user `vm_name` }}" 64 | }, 65 | { 66 | "boot_command": [ 67 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/{{ user `kickstart` }}" 68 | ], 69 | "disk_size": "{{ user `disk_size` }}", 70 | "guest_os_type": "{{ user `parallels_guest_os_type` }}", 71 | "http_directory": "http", 72 | "iso_checksum": "{{ user `iso_checksum` }}", 73 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 74 | "iso_urls": [ 75 | "{{ user `iso_path` }}/{{ user `iso_name` }}", 76 | "{{ user `iso_url` }}" 77 | ], 78 | "output_directory": "output-{{ user `vm_name` }}-parallels-iso", 79 | "parallels_tools_flavor": "lin", 80 | "prlctl": [ 81 | [ 82 | "set", "{{.Name}}", "--memsize", "{{ user `memory` }}" 83 | ], 84 | [ 85 | "set", "{{.Name}}", "--cpus", "{{ user `cpus` }}" 86 | ] 87 | ], 88 | "shutdown_command": "{{ user `shutdown_command` }}", 89 | "ssh_password": "{{ user `ssh_password` }}", 90 | "ssh_username": "{{ user `ssh_username` }}", 91 | "ssh_wait_timeout": "10000s", 92 | "type": "parallels-iso", 93 | "vm_name": "{{ user `vm_name` }}" 94 | } 95 | ], 96 | "post-processors": [ 97 | { 98 | "keep_input_artifact": false, 99 | "output": "box/{{.Provider}}/{{user `vm_name`}}-{{user `version`}}.box", 100 | "type": "vagrant", 101 | "vagrantfile_template": "{{ user `vagrantfile_template` }}" 102 | } 103 | ], 104 | "provisioners": [ 105 | { 106 | "environment_vars": [ 107 | "DESKTOP={{user `desktop`}}", 108 | "DOCKER={{user `docker`}}", 109 | "UPDATE={{user `update`}}", 110 | "INSTALL_VAGRANT_KEY={{user `install_vagrant_key`}}", 111 | "SSH_USERNAME={{user `ssh_username`}}", 112 | "SSH_PASSWORD={{user `ssh_password`}}", 113 | "http_proxy={{user `http_proxy`}}", 114 | "https_proxy={{user `https_proxy`}}", 115 | "ftp_proxy={{user `ftp_proxy`}}", 116 | "rsync_proxy={{user `rsync_proxy`}}", 117 | "no_proxy={{user `no_proxy`}}" 118 | ], 119 | "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", 120 | "scripts": [ 121 | "script/fix-slow-dns.sh", 122 | "script/kernel.sh", 123 | "script/sshd.sh", 124 | "script/update.sh", 125 | "script/vagrant.sh", 126 | "script/desktop.sh", 127 | "script/vmware.sh", 128 | "script/virtualbox.sh", 129 | "script/parallels.sh", 130 | "script/motd.sh", 131 | "script/cleanup.sh" 132 | ], 133 | "type": "shell", 134 | "expect_disconnect": "true" 135 | } 136 | ], 137 | "variables": { 138 | "cpus": "1", 139 | "cutom_script": ".", 140 | "desktop": "false", 141 | "disk_size": "65536", 142 | "docker": "false", 143 | "ftp_proxy": "{{env `ftp_proxy`}}", 144 | "headless": "", 145 | "http_proxy": "{{env `http_proxy`}}", 146 | "https_proxy": "{{env `https_proxy`}}", 147 | "install_vagrant_key": "true", 148 | "iso_checksum": "dd7231b378f23e2e846ac78b0c5d8974a23631d5", 149 | "iso_checksum_type": "sha1", 150 | "iso_name": "OracleLinux-R6-U7-Server-x86_64-dvd.iso", 151 | "iso_path": "/Volumes/Storage/software/oraclelinux", 152 | "iso_url": "http://mirrors.dotsrc.org/oracle-linux/OL6/U7/x86_64/OracleLinux-R6-U7-Server-x86_64-dvd.iso", 153 | "kickstart": "ks6.cfg", 154 | "memory": "512", 155 | "no_proxy": "{{env `no_proxy`}}", 156 | "parallels_guest_os_type": "rhel", 157 | "rsync_proxy": "{{env `rsync_proxy`}}", 158 | "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", 159 | "ssh_password": "vagrant", 160 | "ssh_username": "vagrant", 161 | "update": "false", 162 | "vagrantfile_template": "", 163 | "version": "0.1.0", 164 | "virtualbox_guest_os_type": "Oracle_64", 165 | "vm_name": "ol67", 166 | "vmware_guest_os_type": "oraclelinux-64" 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /script/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | echo '==> Removing temporary files used to build box' 4 | # Make sure udev doesn't block our network 5 | if grep -q -i "release 6" /etc/redhat-release ; then 6 | rm -f /etc/udev/rules.d/70-persistent-net.rules 7 | mkdir /etc/udev/rules.d/70-persistent-net.rules 8 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 9 | fi 10 | rm -rf /dev/.udev/ 11 | if [ -f /etc/sysconfig/network-scripts/ifcfg-eth0 ] ; then 12 | sed -i "/^HWADDR/d" /etc/sysconfig/network-scripts/ifcfg-eth0 13 | sed -i "/^UUID/d" /etc/sysconfig/network-scripts/ifcfg-eth0 14 | fi 15 | 16 | # new-style network device naming for centos7 17 | if grep -q -i "release 7" /etc/redhat-release ; then 18 | # radio off & remove all interface configration 19 | nmcli radio all off 20 | /bin/systemctl stop NetworkManager.service 21 | for ifcfg in `ls /etc/sysconfig/network-scripts/ifcfg-* |grep -v ifcfg-lo` ; do 22 | rm -f $ifcfg 23 | done 24 | rm -rf /var/lib/NetworkManager/* 25 | 26 | echo "==> Setup /etc/rc.d/rc.local for CentOS7" 27 | cat <<_EOF_ | cat >> /etc/rc.d/rc.local 28 | #BOXCUTTER-BEGIN 29 | LANG=C 30 | # delete all connection 31 | for con in \`nmcli -t -f uuid con\`; do 32 | if [ "\$con" != "" ]; then 33 | nmcli con del \$con 34 | fi 35 | done 36 | # add gateway interface connection. 37 | gwdev=\`nmcli dev | grep ethernet | egrep -v 'unmanaged' | head -n 1 | awk '{print \$1}'\` 38 | if [ "\$gwdev" != "" ]; then 39 | nmcli c add type eth ifname \$gwdev con-name \$gwdev 40 | fi 41 | sed -i -e "/^#BOXCUTTER-BEGIN/,/^#BOXCUTTER-END/{s/^/# /}" /etc/rc.d/rc.local 42 | chmod -x /etc/rc.d/rc.local 43 | #BOXCUTTER-END 44 | _EOF_ 45 | chmod +x /etc/rc.d/rc.local 46 | fi 47 | 48 | DISK_USAGE_BEFORE_CLEANUP=$(df -h) 49 | 50 | # Other locales will be removed from the VM 51 | KEEP_LANGUAGE="en" 52 | KEEP_LOCALE="en_US" 53 | echo "==> Remove unused man page locales" 54 | pushd /usr/share/man 55 | if [ $(ls | wc -w) -gt 16 ]; then 56 | mkdir ../tmp_dir 57 | mv man* $KEEP_LANGUAGE $SECONDARY_LANGUAGE ../tmp_dir 58 | rm -rf * 59 | mv ../tmp_dir/* . 60 | rm -rf ../tmp_dir 61 | sync 62 | fi 63 | popd 64 | 65 | echo "==> Remove packages needed for building guest tools" 66 | yum -y remove gcc cpp libmpc mpfr kernel-devel kernel-headers perl 67 | 68 | echo '==> Clean up yum cache of metadata and packages to save space' 69 | yum -y clean all 70 | 71 | echo "==> Clear core files" 72 | rm -f /core* 73 | 74 | echo "==> Remote temporary files used to build box" 75 | rm -rf /tmp/* 76 | 77 | echo "==> Rebuild RPM DB" 78 | rpmdb --rebuilddb 79 | rm -f /var/lib/rpm/__db* 80 | 81 | echo '==> Clear out swap and disable until reboot' 82 | set +e 83 | swapuuid=$(/sbin/blkid -o value -l -s UUID -t TYPE=swap) 84 | case "$?" in 85 | 2|0) ;; 86 | *) exit 1 ;; 87 | esac 88 | set -e 89 | if [ "x${swapuuid}" != "x" ]; then 90 | # Whiteout the swap partition to reduce box size 91 | # Swap is disabled till reboot 92 | swappart=$(readlink -f /dev/disk/by-uuid/$swapuuid) 93 | /sbin/swapoff "${swappart}" 94 | dd if=/dev/zero of="${swappart}" bs=1M || echo "dd exit code $? is suppressed" 95 | /sbin/mkswap -U "${swapuuid}" "${swappart}" 96 | fi 97 | 98 | echo '==> Zero out empty area to save space in the final image' 99 | # Zero out the free space to save space in the final image. Contiguous 100 | # zeroed space compresses down to nothing. 101 | dd if=/dev/zero of=/EMPTY bs=1M || echo "dd exit code $? is suppressed" 102 | rm -f /EMPTY 103 | 104 | # Block until the empty file has been removed, otherwise, Packer 105 | # will try to kill the box while the disk is still full and that's bad 106 | sync 107 | 108 | echo "==> Disk usage before cleanup" 109 | echo ${DISK_USAGE_BEFORE_CLEANUP} 110 | 111 | echo "==> Disk usage after cleanup" 112 | df -h 113 | -------------------------------------------------------------------------------- /script/desktop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | USERNAME=vagrant 4 | 5 | cat /etc/redhat-release 6 | if grep -q -i "release 7" /etc/redhat-release ; then 7 | # set the graphical.target for systemd so it will run startx on boot 8 | ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target 9 | fi 10 | 11 | GDM_CONFIG=/etc/gdm/custom.conf 12 | 13 | # Configure gdm autologin. 14 | 15 | if [ -f $GDM_CONFIG ]; then 16 | sed -i s/"daemon]$"/"daemon]\nAutomaticLoginEnable=true\nAutomaticLogin=vagrant"/ /etc/gdm/custom.conf 17 | fi 18 | -------------------------------------------------------------------------------- /script/docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "==> Run the Docker installation script" 4 | curl -sSL https://get.docker.com | sh 5 | 6 | echo "==> Create the docker group" 7 | # Add the docker group if it doesn't already exist 8 | groupadd docker 9 | 10 | echo "==> Add the connected "${USER}" to the docker group." 11 | gpasswd -a ${USER} docker 12 | gpasswd -a ${SSH_USERNAME} docker 13 | 14 | echo "==> Starting docker" 15 | service docker start 16 | echo "==> Enabling docker to start on reboot" 17 | chkconfig docker on 18 | -------------------------------------------------------------------------------- /script/fix-slow-dns.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | echo '==> Applying slow DNS fix' 4 | if [[ "${PACKER_BUILDER_TYPE}" =~ "virtualbox" ]]; then 5 | ## https://access.redhat.com/site/solutions/58625 (subscription required) 6 | # http://www.linuxquestions.org/questions/showthread.php?p=4399340#post4399340 7 | # add 'single-request-reopen' so it is included when /etc/resolv.conf is generated 8 | echo 'RES_OPTIONS="single-request-reopen"' >> /etc/sysconfig/network 9 | service network restart 10 | echo '==> Slow DNS fix applied (single-request-reopen)' 11 | else 12 | echo '==> Slow DNS fix not required for this platform, skipping' 13 | fi 14 | -------------------------------------------------------------------------------- /script/kernel.sh: -------------------------------------------------------------------------------- 1 | # Grub tweaks - default to RedHat-compatible kernel 2 | echo "==> Configuring Grub to use RedHat-compatible kernel" 3 | if grep -q -i "release 7" /etc/redhat-release ; then 4 | # Grub tweaks - default to RedHat-compatible kernel 5 | sed -i 's/^GRUB_DEFAULT=saved/GRUB_DEFAULT=0/' /etc/default/grub 6 | # sed -i "s/GRUB_CMDLINE_LINUX=\"\(.*\)\"/GRUB_CMDLINE_LINUX=\"\1 biosdevname=0 rhgb quiet\"/" /etc/default/grub 7 | grub2-mkconfig -o /boot/grub2/grub.cfg 8 | # Fix issue with Host SMBus controller not enabled 9 | #echo "blacklist i2c_piix4" >> /etc/modprobe.d/blacklist.conf 10 | #echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf 11 | #echo "blacklist autofs" >> /etc/modprobe.d/blacklist.conf 12 | else 13 | sed -i 's/^default=0/default=1/' /boot/grub/grub.conf 14 | fi 15 | 16 | # reboot 17 | echo "Rebooting the machine..." 18 | reboot 19 | sleep 60 20 | -------------------------------------------------------------------------------- /script/motd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | echo "==> Recording box generation date" 4 | date > /etc/vagrant_box_build_date 5 | 6 | echo "==> Customizing message of the day" 7 | MOTD_FILE=/etc/motd 8 | BANNER_WIDTH=64 9 | PLATFORM_RELEASE=$(sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release) 10 | PLATFORM_MSG=$(printf 'Oracle Linux %s' "$PLATFORM_RELEASE") 11 | BUILT_MSG=$(printf 'built %s' $(date +%Y-%m-%d)) 12 | printf '%0.1s' "-"{1..64} > ${MOTD_FILE} 13 | printf '\n' >> ${MOTD_FILE} 14 | printf '%2s%-30s%30s\n' " " "${PLATFORM_MSG}" "${BUILT_MSG}" >> ${MOTD_FILE} 15 | printf '%0.1s' "-"{1..64} >> ${MOTD_FILE} 16 | printf '\n' >> ${MOTD_FILE} 17 | -------------------------------------------------------------------------------- /script/parallels.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | SSH_USER=${SSH_USERNAME:-vagrant} 4 | SSH_USER_HOME=${SSH_USER_HOME:-/home/${SSH_USER}} 5 | 6 | if [[ $PACKER_BUILDER_TYPE =~ parallels ]]; then 7 | echo "==> Installing Parallels tools" 8 | mount -o loop $SSH_USER_HOME/prl-tools-lin.iso /mnt 9 | sh /mnt/install --install-unattended-with-deps 10 | umount /mnt 11 | rm -rf $SSH_USER_HOME/prl-tools-lin.iso 12 | rm -f $SSH_USER_HOME/.prlctl_version 13 | 14 | echo "==> Removing packages needed for building guest tools" 15 | yum -y remove gcc cpp libmpc mpfr kernel-devel kernel-headers perl 16 | fi 17 | -------------------------------------------------------------------------------- /script/sshd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | echo '==> Configuring sshd_config options' 4 | cp /etc/ssh/sshd_config /etc/ssh/sshd_config.orig 5 | 6 | echo '==> Turning off sshd DNS lookup to prevent timeout delay' 7 | echo "UseDNS no" >> /etc/ssh/sshd_config 8 | echo '==> Disablng GSSAPI authentication to prevent timeout delay' 9 | echo "GSSAPIAuthentication no" >> /etc/ssh/sshd_config 10 | -------------------------------------------------------------------------------- /script/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | if [[ $UPDATE =~ true || $UPDATE =~ 1 || $UPDATE =~ yes ]]; then 3 | echo "==> Applying updates" 4 | yum -y update 5 | 6 | # reboot 7 | echo "Rebooting the machine..." 8 | reboot 9 | sleep 60 10 | fi 11 | -------------------------------------------------------------------------------- /script/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | echo '==> Configuring settings for vagrant' 4 | 5 | SSH_USER=${SSH_USER:-vagrant} 6 | SSH_USER_HOME=${SSH_USER_HOME:-/home/${SSH_USER}} 7 | VAGRANT_INSECURE_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" 8 | 9 | # Packer passes boolean user variables through as '1', but this might change in 10 | # the future, so also check for 'true'. 11 | if [ "$INSTALL_VAGRANT_KEY" = "true" ] || [ "$INSTALL_VAGRANT_KEY" = "1" ]; then 12 | # Add vagrant user (if it doesn't already exist) 13 | if ! id -u $SSH_USER >/dev/null 2>&1; then 14 | echo '==> Creating Vagrant user' 15 | /usr/sbin/groupadd $SSH_USER 16 | /usr/sbin/useradd $SSH_USER -g $SSH_USER -G wheel 17 | echo "${SSH_USER}"|passwd --stdin $SSH_USER 18 | echo "${SSH_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers 19 | fi 20 | 21 | echo '==> Installing Vagrant SSH key' 22 | mkdir -pm 700 ${SSH_USER_HOME}/.ssh 23 | # https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub 24 | echo "${VAGRANT_INSECURE_KEY}" > $SSH_USER_HOME/.ssh/authorized_keys 25 | chmod 0600 ${SSH_USER_HOME}/.ssh/authorized_keys 26 | chown -R ${SSH_USER}:${SSH_USER} ${SSH_USER_HOME}/.ssh 27 | fi 28 | -------------------------------------------------------------------------------- /script/virtualbox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | if [[ $PACKER_BUILDER_TYPE =~ virtualbox ]]; then 4 | echo "==> Installing VirtualBox guest additions" 5 | # Assume that we've installed all the prerequisites: 6 | # kernel-headers-$(uname -r) kernel-devel-$(uname -r) gcc make perl 7 | # from the install media via ks.cfg 8 | 9 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 10 | mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 11 | sh /mnt/VBoxLinuxAdditions.run --nox11 12 | umount /mnt 13 | rm -rf /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso 14 | rm -f /home/vagrant/.vbox_version 15 | 16 | if [[ $VBOX_VERSION = "4.3.10" ]]; then 17 | ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions 18 | fi 19 | 20 | echo "==> Removing packages needed for building guest tools" 21 | yum -y remove gcc cpp kernel-devel kernel-headers perl 22 | fi 23 | -------------------------------------------------------------------------------- /script/vmware.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | if [[ $PACKER_BUILDER_TYPE =~ vmware ]]; then 4 | echo "==> Installing VMware Tools" 5 | cat /etc/redhat-release 6 | if grep -q -i "release 6" /etc/redhat-release ; then 7 | # Uninstall fuse to fake out the vmware install so it won't try to 8 | # enable the VMware blocking filesystem 9 | yum erase -y fuse 10 | fi 11 | # Assume that we've installed all the prerequisites: 12 | # kernel-headers-$(uname -r) kernel-devel-$(uname -r) gcc make perl 13 | # from the install media via ks.cfg 14 | 15 | # On RHEL 5, add /sbin to PATH because vagrant does a probe for 16 | # vmhgfs with lsmod sans PATH 17 | if grep -q -i "release 5" /etc/redhat-release ; then 18 | echo "export PATH=$PATH:/usr/sbin:/sbin" >> /home/vagrant/.bashrc 19 | fi 20 | 21 | cd /tmp 22 | mkdir -p /mnt/cdrom 23 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 24 | 25 | VMWARE_TOOLS_PATH=$(ls /mnt/cdrom/VMwareTools-*.tar.gz) 26 | VMWARE_TOOLS_VERSION=$(echo "${VMWARE_TOOLS_PATH}" | cut -f2 -d'-') 27 | VMWARE_TOOLS_BUILD=$(echo "${VMWARE_TOOLS_PATH}" | cut -f3 -d'-') 28 | VMWARE_TOOLS_BUILD=$(basename ${VMWARE_TOOLS_BUILD} .tar.gz) 29 | VMWARE_TOOLS_MAJOR_VERSION=$(echo ${VMWARE_TOOLS_VERSION} | cut -d '.' -f 1) 30 | echo "==> VMware Tools Path: ${VMWARE_TOOLS_PATH}" 31 | echo "==> VMware Tools Version: ${VMWARE_TOOLS_VERSION}" 32 | echo "==> VMware Tools Build: ${VMWARE_TOOLS_BUILD}" 33 | 34 | tar zxf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 35 | if [ "${VMWARE_TOOLS_MAJOR_VERSION}" -lt "10" ]; then 36 | /tmp/vmware-tools-distrib/vmware-install.pl -d 37 | else 38 | /tmp/vmware-tools-distrib/vmware-install.pl -f 39 | fi 40 | rm /home/vagrant/linux.iso 41 | umount /mnt/cdrom 42 | rmdir /mnt/cdrom 43 | rm -rf /tmp/VMwareTools-* 44 | 45 | echo "==> Removing packages needed for building guest tools" 46 | yum -y remove gcc cpp kernel-devel kernel-headers perl 47 | fi 48 | -------------------------------------------------------------------------------- /test/docker_spec.rb: -------------------------------------------------------------------------------- 1 | require_relative 'spec_helper' 2 | 3 | describe 'docker' do 4 | docker_string = command('ls /usr/bin/docker').stdout 5 | if docker_string.include? '/usr/bin/docker' then 6 | it 'should have docker installed' do 7 | expect(command('docker run hello-world').exit_status).to eq(0) 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/oel_spec.rb: -------------------------------------------------------------------------------- 1 | require_relative 'spec_helper' 2 | 3 | describe 'box' do 4 | it 'should have a root user' do 5 | expect(user 'root').to exist 6 | end 7 | 8 | it 'should disable SELinux' do 9 | expect(selinux).to be_permissive 10 | end 11 | 12 | # https://www.chef.io/blog/2015/02/26/bento-box-update-for-centos-and-fedora/ 13 | describe 'test-cacert' do 14 | it 'uses the vendor-supplied openssl certificates' do 15 | expect(command('openssl s_client -CAfile /etc/pki/tls/certs/ca-bundle.crt -connect packagecloud-repositories.s3.amazonaws.com:443 &1 | grep -i "verify return code"').stdout).to match /\s+Verify return code: 0 \(ok\)/ 16 | end 17 | end 18 | 19 | has_docker = command('command -v docker').exit_status == 0 20 | it 'should make vagrant a member of the docker group', :if => has_docker do 21 | expect(user 'vagrant').to belong_to_group 'docker' 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /test/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'serverspec' 2 | require 'net/ssh' 3 | 4 | set :backend, :ssh 5 | 6 | # Set PATH (OEL 5 does not include /sbin by default) 7 | set :path, '/usr/local/sbin:/usr/sbin:/sbin:$PATH' 8 | -------------------------------------------------------------------------------- /tpl/vagrantfile-ol65-desktop.tpl: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.define "vagrant-ol65-desktop" 6 | config.vm.box = "ol65-desktop" 7 | 8 | config.vm.provider :virtualbox do |v, override| 9 | v.gui = true 10 | v.customize ["modifyvm", :id, "--memory", 1024] 11 | v.customize ["modifyvm", :id, "--cpus", 1] 12 | v.customize ["modifyvm", :id, "--vram", "256"] 13 | v.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] 14 | v.customize ["setextradata", :id, "CustomVideoMode1", "1024x768x32"] 15 | v.customize ["modifyvm", :id, "--ioapic", "on"] 16 | v.customize ["modifyvm", :id, "--rtcuseutc", "on"] 17 | v.customize ["modifyvm", :id, "--accelerate3d", "on"] 18 | v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] 19 | end 20 | 21 | ["vmware_fusion", "vmware_workstation"].each do |provider| 22 | config.vm.provider provider do |v, override| 23 | v.gui = true 24 | v.vmx["memsize"] = "1024" 25 | v.vmx["numvcpus"] = "1" 26 | v.vmx["cpuid.coresPerSocket"] = "1" 27 | v.vmx["ethernet0.virtualDev"] = "vmxnet3" 28 | v.vmx["RemoteDisplay.vnc.enabled"] = "false" 29 | v.vmx["RemoteDisplay.vnc.port"] = "5900" 30 | v.vmx["scsi0.virtualDev"] = "lsilogic" 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /tpl/vagrantfile-ol66-desktop.tpl: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.define "vagrant-ol66-desktop" 6 | config.vm.box = "ol66-desktop" 7 | 8 | config.vm.provider :virtualbox do |v, override| 9 | v.gui = true 10 | v.customize ["modifyvm", :id, "--memory", 1024] 11 | v.customize ["modifyvm", :id, "--cpus", 1] 12 | v.customize ["modifyvm", :id, "--vram", "256"] 13 | v.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] 14 | v.customize ["setextradata", :id, "CustomVideoMode1", "1024x768x32"] 15 | v.customize ["modifyvm", :id, "--ioapic", "on"] 16 | v.customize ["modifyvm", :id, "--rtcuseutc", "on"] 17 | v.customize ["modifyvm", :id, "--accelerate3d", "on"] 18 | v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] 19 | end 20 | 21 | ["vmware_fusion", "vmware_workstation"].each do |provider| 22 | config.vm.provider provider do |v, override| 23 | v.gui = true 24 | v.vmx["memsize"] = "1024" 25 | v.vmx["numvcpus"] = "1" 26 | v.vmx["cpuid.coresPerSocket"] = "1" 27 | v.vmx["ethernet0.virtualDev"] = "vmxnet3" 28 | v.vmx["RemoteDisplay.vnc.enabled"] = "false" 29 | v.vmx["RemoteDisplay.vnc.port"] = "5900" 30 | v.vmx["scsi0.virtualDev"] = "lsilogic" 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /tpl/vagrantfile-ol67-desktop.tpl: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.define "vagrant-ol67-desktop" 6 | config.vm.box = "ol67-desktop" 7 | 8 | config.vm.provider :virtualbox do |v, override| 9 | v.gui = true 10 | v.customize ["modifyvm", :id, "--memory", 1024] 11 | v.customize ["modifyvm", :id, "--cpus", 1] 12 | v.customize ["modifyvm", :id, "--vram", "256"] 13 | v.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] 14 | v.customize ["setextradata", :id, "CustomVideoMode1", "1024x768x32"] 15 | v.customize ["modifyvm", :id, "--ioapic", "on"] 16 | v.customize ["modifyvm", :id, "--rtcuseutc", "on"] 17 | v.customize ["modifyvm", :id, "--accelerate3d", "on"] 18 | v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] 19 | end 20 | 21 | ["vmware_fusion", "vmware_workstation"].each do |provider| 22 | config.vm.provider provider do |v, override| 23 | v.gui = true 24 | v.vmx["memsize"] = "1024" 25 | v.vmx["numvcpus"] = "1" 26 | v.vmx["cpuid.coresPerSocket"] = "1" 27 | v.vmx["ethernet0.virtualDev"] = "vmxnet3" 28 | v.vmx["RemoteDisplay.vnc.enabled"] = "false" 29 | v.vmx["RemoteDisplay.vnc.port"] = "5900" 30 | v.vmx["scsi0.virtualDev"] = "lsilogic" 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /tpl/vagrantfile-ol70-desktop.tpl: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.define "vagrant-ol70-desktop" 6 | config.vm.box = "ol70-desktop" 7 | 8 | config.vm.provider :virtualbox do |v, override| 9 | v.gui = true 10 | v.customize ["modifyvm", :id, "--memory", 1024] 11 | v.customize ["modifyvm", :id, "--cpus", 1] 12 | v.customize ["modifyvm", :id, "--vram", "256"] 13 | v.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] 14 | v.customize ["setextradata", :id, "CustomVideoMode1", "1024x768x32"] 15 | v.customize ["modifyvm", :id, "--ioapic", "on"] 16 | v.customize ["modifyvm", :id, "--rtcuseutc", "on"] 17 | v.customize ["modifyvm", :id, "--accelerate3d", "on"] 18 | v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] 19 | end 20 | 21 | ["vmware_fusion", "vmware_workstation"].each do |provider| 22 | config.vm.provider provider do |v, override| 23 | v.gui = true 24 | v.vmx["memsize"] = "1024" 25 | v.vmx["numvcpus"] = "1" 26 | v.vmx["cpuid.coresPerSocket"] = "1" 27 | v.vmx["ethernet0.virtualDev"] = "vmxnet3" 28 | v.vmx["RemoteDisplay.vnc.enabled"] = "false" 29 | v.vmx["RemoteDisplay.vnc.port"] = "5900" 30 | v.vmx["scsi0.virtualDev"] = "lsilogic" 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /tpl/vagrantfile-ol71-desktop.tpl: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.define "vagrant-ol71-desktop" 6 | config.vm.box = "ol71-desktop" 7 | 8 | config.vm.provider :virtualbox do |v, override| 9 | v.gui = true 10 | v.customize ["modifyvm", :id, "--memory", 1024] 11 | v.customize ["modifyvm", :id, "--cpus", 1] 12 | v.customize ["modifyvm", :id, "--vram", "256"] 13 | v.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] 14 | v.customize ["setextradata", :id, "CustomVideoMode1", "1024x768x32"] 15 | v.customize ["modifyvm", :id, "--ioapic", "on"] 16 | v.customize ["modifyvm", :id, "--rtcuseutc", "on"] 17 | v.customize ["modifyvm", :id, "--accelerate3d", "on"] 18 | v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] 19 | end 20 | 21 | ["vmware_fusion", "vmware_workstation"].each do |provider| 22 | config.vm.provider provider do |v, override| 23 | v.gui = true 24 | v.vmx["memsize"] = "1024" 25 | v.vmx["numvcpus"] = "1" 26 | v.vmx["cpuid.coresPerSocket"] = "1" 27 | v.vmx["ethernet0.virtualDev"] = "vmxnet3" 28 | v.vmx["RemoteDisplay.vnc.enabled"] = "false" 29 | v.vmx["RemoteDisplay.vnc.port"] = "5900" 30 | v.vmx["scsi0.virtualDev"] = "lsilogic" 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /tpl/vagrantfile-ol72-desktop.tpl: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.define "vagrant-ol72-desktop" 6 | config.vm.box = "ol72-desktop" 7 | 8 | config.vm.provider :virtualbox do |v, override| 9 | v.gui = true 10 | v.customize ["modifyvm", :id, "--memory", 1024] 11 | v.customize ["modifyvm", :id, "--cpus", 1] 12 | v.customize ["modifyvm", :id, "--vram", "256"] 13 | v.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] 14 | v.customize ["setextradata", :id, "CustomVideoMode1", "1024x768x32"] 15 | v.customize ["modifyvm", :id, "--ioapic", "on"] 16 | v.customize ["modifyvm", :id, "--rtcuseutc", "on"] 17 | v.customize ["modifyvm", :id, "--accelerate3d", "on"] 18 | v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] 19 | end 20 | 21 | ["vmware_fusion", "vmware_workstation"].each do |provider| 22 | config.vm.provider provider do |v, override| 23 | v.gui = true 24 | v.vmx["memsize"] = "1024" 25 | v.vmx["numvcpus"] = "1" 26 | v.vmx["cpuid.coresPerSocket"] = "1" 27 | v.vmx["ethernet0.virtualDev"] = "vmxnet3" 28 | v.vmx["RemoteDisplay.vnc.enabled"] = "false" 29 | v.vmx["RemoteDisplay.vnc.port"] = "5900" 30 | v.vmx["scsi0.virtualDev"] = "lsilogic" 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /tpl/vagrantfile-ol73-desktop.tpl: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.define "vagrant-ol73-desktop" 6 | config.vm.box = "ol73-desktop" 7 | 8 | config.vm.provider :virtualbox do |v, override| 9 | v.gui = true 10 | v.customize ["modifyvm", :id, "--memory", 1024] 11 | v.customize ["modifyvm", :id, "--cpus", 1] 12 | v.customize ["modifyvm", :id, "--vram", "256"] 13 | v.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] 14 | v.customize ["setextradata", :id, "CustomVideoMode1", "1024x768x32"] 15 | v.customize ["modifyvm", :id, "--ioapic", "on"] 16 | v.customize ["modifyvm", :id, "--rtcuseutc", "on"] 17 | v.customize ["modifyvm", :id, "--accelerate3d", "on"] 18 | v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] 19 | end 20 | 21 | ["vmware_fusion", "vmware_workstation"].each do |provider| 22 | config.vm.provider provider do |v, override| 23 | v.gui = true 24 | v.vmx["memsize"] = "1024" 25 | v.vmx["numvcpus"] = "1" 26 | v.vmx["cpuid.coresPerSocket"] = "1" 27 | v.vmx["ethernet0.virtualDev"] = "vmxnet3" 28 | v.vmx["RemoteDisplay.vnc.enabled"] = "false" 29 | v.vmx["RemoteDisplay.vnc.port"] = "5900" 30 | v.vmx["scsi0.virtualDev"] = "lsilogic" 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /tpl/vagrantfile-ol74-desktop.tpl: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.define "vagrant-ol74-desktop" 6 | config.vm.box = "ol74-desktop" 7 | 8 | config.vm.provider :virtualbox do |v, override| 9 | v.gui = true 10 | v.customize ["modifyvm", :id, "--memory", 1024] 11 | v.customize ["modifyvm", :id, "--cpus", 1] 12 | v.customize ["modifyvm", :id, "--vram", "256"] 13 | v.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] 14 | v.customize ["setextradata", :id, "CustomVideoMode1", "1024x768x32"] 15 | v.customize ["modifyvm", :id, "--ioapic", "on"] 16 | v.customize ["modifyvm", :id, "--rtcuseutc", "on"] 17 | v.customize ["modifyvm", :id, "--accelerate3d", "on"] 18 | v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] 19 | end 20 | 21 | ["vmware_fusion", "vmware_workstation"].each do |provider| 22 | config.vm.provider provider do |v, override| 23 | v.gui = true 24 | v.vmx["memsize"] = "1024" 25 | v.vmx["numvcpus"] = "1" 26 | v.vmx["cpuid.coresPerSocket"] = "1" 27 | v.vmx["ethernet0.virtualDev"] = "vmxnet3" 28 | v.vmx["RemoteDisplay.vnc.enabled"] = "false" 29 | v.vmx["RemoteDisplay.vnc.port"] = "5900" 30 | v.vmx["scsi0.virtualDev"] = "lsilogic" 31 | end 32 | end 33 | end 34 | --------------------------------------------------------------------------------