veewee 0.3.0.alpha4 → 0.3.0.alpha5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.rvmrc +3 -2
- data/Gemfile +1 -1
- data/License +1 -1
- data/README.md +30 -174
- data/Rakefile +4 -2
- data/doc/README-changes.txt +19 -0
- data/doc/TODO +60 -0
- data/doc/definition.md +58 -0
- data/doc/fusion.md +2 -0
- data/doc/install.md +16 -0
- data/doc/installation.md +24 -0
- data/doc/kvm.md +2 -0
- data/doc/providers.md +23 -0
- data/doc/requirements.md +1 -0
- data/doc/running.md +83 -0
- data/doc/template.md +102 -0
- data/doc/vagrant.md +119 -0
- data/doc/vbox.md +2 -0
- data/lib/net/vnc/vnc.rb +1 -1
- data/lib/python/parallels_sdk_check.py +19 -0
- data/lib/python/parallels_send_key.py +73 -0
- data/lib/veewee/command.rb +2 -1
- data/lib/veewee/command/kvm.rb +55 -15
- data/lib/veewee/command/parallels.rb +124 -0
- data/lib/veewee/command/vagrant.rb +2 -106
- data/lib/veewee/command/vagrant/basebox.rb +82 -0
- data/lib/veewee/command/vagrant/build.rb +64 -0
- data/lib/veewee/command/vagrant/define.rb +48 -0
- data/lib/veewee/command/vagrant/destroy.rb +47 -0
- data/lib/veewee/command/vagrant/export.rb +44 -0
- data/lib/veewee/command/vagrant/halt.rb +43 -0
- data/lib/veewee/command/vagrant/list.rb +38 -0
- data/lib/veewee/command/vagrant/ostypes.rb +38 -0
- data/lib/veewee/command/vagrant/ssh.rb +39 -0
- data/lib/veewee/command/vagrant/templates.rb +39 -0
- data/lib/veewee/command/vagrant/undefine.rb +41 -0
- data/lib/veewee/command/vagrant/up.rb +44 -0
- data/lib/veewee/command/virtualbox.rb +61 -14
- data/lib/veewee/command/vmfusion.rb +44 -21
- data/lib/veewee/config.rb +0 -27
- data/lib/veewee/config/ostypes.yml +179 -43
- data/lib/veewee/config/vmfusion-ostypes.txt +1 -0
- data/lib/veewee/definition.rb +91 -35
- data/lib/veewee/definitions.rb +156 -0
- data/lib/veewee/environment.rb +80 -244
- data/lib/veewee/error.rb +12 -0
- data/lib/veewee/provider/core/box.rb +52 -0
- data/lib/veewee/provider/core/box/build.rb +229 -0
- data/lib/veewee/provider/core/box/exec.rb +34 -0
- data/lib/veewee/provider/core/box/floppy.rb +31 -0
- data/lib/veewee/provider/core/box/halt.rb +24 -0
- data/lib/veewee/provider/core/box/issh.rb +15 -0
- data/lib/veewee/provider/core/box/poweroff.rb +12 -0
- data/lib/veewee/provider/core/box/scp.rb +29 -0
- data/lib/veewee/provider/core/box/ssh.rb +95 -0
- data/lib/veewee/provider/core/box/sudo.rb +21 -0
- data/lib/veewee/{builder → provider}/core/box/vnc.rb +4 -4
- data/lib/veewee/provider/core/helper/iso.rb +142 -0
- data/lib/veewee/provider/core/helper/scancode.rb +114 -0
- data/lib/veewee/provider/core/helper/shell.rb +55 -0
- data/lib/veewee/provider/core/helper/ssh.rb +162 -0
- data/lib/veewee/provider/core/helper/tcp.rb +96 -0
- data/lib/veewee/provider/core/helper/web.rb +67 -0
- data/lib/veewee/{builder/core/builder.rb → provider/core/provider.rb} +8 -25
- data/lib/veewee/{builder/core/builder → provider/core/provider}/transaction.rb +0 -0
- data/lib/veewee/{builder/core/builder → provider/core/provider}/tunnel.rb +2 -2
- data/lib/veewee/provider/kvm/box.rb +46 -0
- data/lib/veewee/provider/kvm/box/build.rb +11 -0
- data/lib/veewee/provider/kvm/box/create.rb +76 -0
- data/lib/veewee/provider/kvm/box/destroy.rb +33 -0
- data/lib/veewee/provider/kvm/box/halt.rb +19 -0
- data/lib/veewee/provider/kvm/box/helper/console_type.rb +20 -0
- data/lib/veewee/provider/kvm/box/helper/ip.rb +14 -0
- data/lib/veewee/provider/kvm/box/helper/ssh_options.rb +19 -0
- data/lib/veewee/provider/kvm/box/helper/status.rb +28 -0
- data/lib/veewee/provider/kvm/box/poweroff.rb +14 -0
- data/lib/veewee/provider/kvm/box/up.rb +14 -0
- data/lib/veewee/provider/kvm/box/validate_kvm.rb +47 -0
- data/lib/veewee/provider/kvm/provider.rb +70 -0
- data/lib/veewee/provider/parallels/box.rb +35 -0
- data/lib/veewee/provider/parallels/box/build.rb +13 -0
- data/lib/veewee/provider/parallels/box/create.rb +63 -0
- data/lib/veewee/provider/parallels/box/destroy.rb +24 -0
- data/lib/veewee/provider/parallels/box/halt.rb +14 -0
- data/lib/veewee/provider/parallels/box/helper/buildinfo.rb +45 -0
- data/lib/veewee/provider/parallels/box/helper/console_type.rb +198 -0
- data/lib/veewee/provider/parallels/box/helper/ip.rb +23 -0
- data/lib/veewee/provider/parallels/box/helper/ssh_options.rb +20 -0
- data/lib/veewee/provider/parallels/box/helper/status.rb +28 -0
- data/lib/veewee/provider/parallels/box/poweroff.rb +14 -0
- data/lib/veewee/provider/parallels/box/ssh.rb +12 -0
- data/lib/veewee/provider/parallels/box/up.rb +15 -0
- data/lib/veewee/provider/parallels/box/validate_parallels.rb +47 -0
- data/lib/veewee/provider/parallels/notes/parallels-sdk.txt +116 -0
- data/lib/veewee/provider/parallels/provider.rb +33 -0
- data/lib/veewee/provider/virtualbox/box.rb +46 -0
- data/lib/veewee/provider/virtualbox/box/build.rb +20 -0
- data/lib/veewee/provider/virtualbox/box/create.rb +58 -0
- data/lib/veewee/provider/virtualbox/box/destroy.rb +66 -0
- data/lib/veewee/provider/virtualbox/box/export_vagrant.rb +99 -0
- data/lib/veewee/provider/virtualbox/box/halt.rb +13 -0
- data/lib/veewee/provider/virtualbox/box/helper/buildinfo.rb +25 -0
- data/lib/veewee/provider/virtualbox/box/helper/console_type.rb +62 -0
- data/lib/veewee/provider/virtualbox/box/helper/create.rb +176 -0
- data/lib/veewee/provider/virtualbox/box/helper/forwarding.rb +38 -0
- data/lib/veewee/provider/virtualbox/box/helper/guest_additions.rb +17 -0
- data/lib/veewee/provider/virtualbox/box/helper/ip.rb +19 -0
- data/lib/veewee/provider/virtualbox/box/helper/natinterface.rb +17 -0
- data/lib/veewee/provider/virtualbox/box/helper/ssh_options.rb +28 -0
- data/lib/veewee/provider/virtualbox/box/helper/status.rb +27 -0
- data/lib/veewee/provider/virtualbox/box/helper/version.rb +18 -0
- data/lib/veewee/provider/virtualbox/box/poweroff.rb +19 -0
- data/lib/veewee/provider/virtualbox/box/ssh.rb +13 -0
- data/lib/veewee/provider/virtualbox/box/up.rb +48 -0
- data/lib/veewee/provider/virtualbox/box/validate_vagrant.rb +53 -0
- data/lib/veewee/provider/virtualbox/provider.rb +19 -0
- data/lib/veewee/provider/vmfusion/box.rb +67 -0
- data/lib/veewee/provider/vmfusion/box/build.rb +13 -0
- data/lib/veewee/{builder/vmfusion/helper → provider/vmfusion/box}/create.rb +15 -24
- data/lib/veewee/provider/vmfusion/box/destroy.rb +20 -0
- data/lib/veewee/provider/vmfusion/box/export_ova.rb +49 -0
- data/lib/veewee/provider/vmfusion/box/halt.rb +13 -0
- data/lib/veewee/provider/vmfusion/box/helper/buildinfo.rb +43 -0
- data/lib/veewee/provider/vmfusion/box/helper/console_type.rb +18 -0
- data/lib/veewee/provider/vmfusion/box/helper/ip.rb +19 -0
- data/lib/veewee/provider/vmfusion/box/helper/ssh_options.rb +20 -0
- data/lib/veewee/provider/vmfusion/box/helper/status.rb +20 -0
- data/lib/veewee/provider/vmfusion/box/helper/vnc.rb +61 -0
- data/lib/veewee/provider/vmfusion/box/poweroff.rb +13 -0
- data/lib/veewee/provider/vmfusion/box/ssh.rb +12 -0
- data/lib/veewee/{builder/vmfusion/helper → provider/vmfusion/box}/template.rb +9 -4
- data/lib/veewee/{builder/vmfusion/helper → provider/vmfusion/box}/template.vmx.erb +5 -2
- data/lib/veewee/provider/vmfusion/box/up.rb +18 -0
- data/lib/veewee/provider/vmfusion/box/validate_vmfusion.rb +47 -0
- data/lib/veewee/{builder → provider}/vmfusion/info/export_ovf.info +0 -0
- data/lib/veewee/provider/vmfusion/provider.rb +20 -0
- data/lib/veewee/providers.rb +31 -0
- data/lib/veewee/template.rb +26 -0
- data/lib/veewee/templates.rb +71 -0
- data/lib/veewee/ui.rb +6 -4
- data/lib/veewee/version.rb +1 -1
- data/templates/CentOS-4.8-i386/postinstall.sh +1 -1
- data/templates/CentOS-5.5-i386-netboot/definition.rb +16 -0
- data/templates/CentOS-5.5-i386-netboot/ks.cfg +46 -0
- data/templates/CentOS-5.5-i386-netboot/postinstall.sh +60 -0
- data/templates/CentOS-5.5-x86_64-netboot/definition.rb +1 -1
- data/templates/CentOS-5.5-x86_64-netboot/postinstall.sh +1 -1
- data/templates/CentOS-5.6-i386-netboot/definition.rb +1 -1
- data/templates/CentOS-5.6-i386-netboot/ks.cfg +2 -2
- data/templates/CentOS-5.6-i386-netboot/postinstall.sh +21 -9
- data/templates/CentOS-5.6-i386/postinstall.sh +1 -1
- data/templates/CentOS-5.6-x86_64-netboot/definition.rb +1 -1
- data/templates/CentOS-5.6-x86_64-netboot/ks.cfg +1 -1
- data/templates/CentOS-5.6-x86_64-netboot/postinstall.sh +1 -1
- data/templates/CentOS-5.7-i386-netboot/postinstall.sh +3 -3
- data/templates/CentOS-5.7-x86_64-netboot/postinstall.sh +1 -1
- data/templates/CentOS-6.0-i386-netboot/ks.cfg +3 -2
- data/templates/CentOS-6.0-i386-netboot/postinstall.sh +1 -1
- data/templates/CentOS-6.0-i386/ks.cfg +2 -1
- data/templates/CentOS-6.0-i386/postinstall.sh +1 -1
- data/templates/CentOS-6.0-x86_64-minimal/definition.rb +2 -2
- data/templates/CentOS-6.0-x86_64-minimal/ks.cfg +2 -1
- data/templates/CentOS-6.0-x86_64-minimal/postinstall.sh +17 -4
- data/templates/CentOS-6.0-x86_64-netboot/ks.cfg +4 -2
- data/templates/CentOS-6.0-x86_64-netboot/postinstall.sh +1 -1
- data/templates/CentOS-6.0-x86_64/base.sh +12 -0
- data/templates/CentOS-6.0-x86_64/chef.sh +2 -0
- data/templates/CentOS-6.0-x86_64/cleanup.sh +4 -0
- data/templates/CentOS-6.0-x86_64/definition.rb +22 -8
- data/templates/CentOS-6.0-x86_64/ks.cfg +2 -1
- data/templates/CentOS-6.0-x86_64/postinstall.sh +1 -1
- data/templates/CentOS-6.0-x86_64/puppet.sh +11 -0
- data/templates/CentOS-6.0-x86_64/ruby.sh +2 -0
- data/templates/CentOS-6.0-x86_64/vagrant.sh +9 -0
- data/templates/CentOS-6.0-x86_64/virtualbox.sh +8 -0
- data/templates/CentOS-6.1-x86_64-minimal/base.sh +13 -0
- data/templates/CentOS-6.1-x86_64-minimal/chef.sh +2 -0
- data/templates/CentOS-6.1-x86_64-minimal/cleanup.sh +4 -0
- data/templates/CentOS-6.1-x86_64-minimal/definition.rb +39 -0
- data/templates/CentOS-6.1-x86_64-minimal/ks.cfg +47 -0
- data/templates/CentOS-6.1-x86_64-minimal/puppet.sh +11 -0
- data/templates/CentOS-6.1-x86_64-minimal/ruby.sh +2 -0
- data/templates/CentOS-6.1-x86_64-minimal/vagrant.sh +16 -0
- data/templates/CentOS-6.1-x86_64-minimal/virtualbox.sh +8 -0
- data/templates/CentOS-6.1-x86_64-netboot/base.sh +13 -0
- data/templates/CentOS-6.1-x86_64-netboot/chef.sh +2 -0
- data/templates/CentOS-6.1-x86_64-netboot/cleanup.sh +4 -0
- data/templates/CentOS-6.1-x86_64-netboot/definition.rb +39 -0
- data/templates/CentOS-6.1-x86_64-netboot/ks.cfg +46 -0
- data/templates/CentOS-6.1-x86_64-netboot/postinstall.sh +48 -0
- data/templates/CentOS-6.1-x86_64-netboot/puppet.sh +11 -0
- data/templates/CentOS-6.1-x86_64-netboot/ruby.sh +2 -0
- data/templates/CentOS-6.1-x86_64-netboot/vagrant.sh +16 -0
- data/templates/CentOS-6.1-x86_64-netboot/virtualbox.sh +8 -0
- data/templates/CentOS-6.2-x86_64-minimal/base.sh +14 -0
- data/templates/CentOS-6.2-x86_64-minimal/chef.sh +3 -0
- data/templates/CentOS-6.2-x86_64-minimal/cleanup.sh +5 -0
- data/templates/CentOS-6.2-x86_64-minimal/definition.rb +39 -0
- data/templates/CentOS-6.2-x86_64-minimal/ks.cfg +39 -0
- data/templates/CentOS-6.2-x86_64-minimal/puppet.sh +12 -0
- data/templates/CentOS-6.2-x86_64-minimal/ruby.sh +3 -0
- data/templates/CentOS-6.2-x86_64-minimal/vagrant.sh +17 -0
- data/templates/CentOS-6.2-x86_64-minimal/virtualbox.sh +8 -0
- data/templates/CentOS-6.2-x86_64-netboot/base.sh +13 -0
- data/templates/CentOS-6.2-x86_64-netboot/chef.sh +2 -0
- data/templates/CentOS-6.2-x86_64-netboot/cleanup.sh +4 -0
- data/templates/CentOS-6.2-x86_64-netboot/definition.rb +39 -0
- data/templates/CentOS-6.2-x86_64-netboot/ks.cfg +46 -0
- data/templates/CentOS-6.2-x86_64-netboot/postinstall.sh +48 -0
- data/templates/CentOS-6.2-x86_64-netboot/puppet.sh +11 -0
- data/templates/CentOS-6.2-x86_64-netboot/ruby.sh +2 -0
- data/templates/CentOS-6.2-x86_64-netboot/vagrant.sh +16 -0
- data/templates/CentOS-6.2-x86_64-netboot/virtualbox.sh +8 -0
- data/templates/Debian-5.0.8-amd64-netboot/base.sh +9 -0
- data/templates/Debian-5.0.8-amd64-netboot/chef.sh +2 -0
- data/templates/Debian-5.0.8-amd64-netboot/cleanup.sh +10 -0
- data/templates/Debian-5.0.8-amd64-netboot/postinstall.sh +1 -1
- data/templates/Debian-5.0.8-amd64-netboot/puppet.sh +2 -0
- data/templates/Debian-5.0.8-amd64-netboot/ruby.sh +11 -0
- data/templates/Debian-5.0.8-amd64-netboot/vagrant.sh +14 -0
- data/templates/Debian-5.0.8-amd64-netboot/virtualbox.sh +15 -0
- data/templates/Debian-5.0.8-i386-netboot/base.sh +9 -0
- data/templates/Debian-5.0.8-i386-netboot/chef.sh +2 -0
- data/templates/Debian-5.0.8-i386-netboot/cleanup.sh +10 -0
- data/templates/Debian-5.0.8-i386-netboot/postinstall.sh +1 -1
- data/templates/Debian-5.0.8-i386-netboot/puppet.sh +2 -0
- data/templates/Debian-5.0.8-i386-netboot/ruby.sh +11 -0
- data/templates/Debian-5.0.8-i386-netboot/vagrant.sh +14 -0
- data/templates/Debian-5.0.8-i386-netboot/virtualbox.sh +15 -0
- data/templates/Debian-6.0.3-amd64-netboot/base.sh +13 -0
- data/templates/Debian-6.0.3-amd64-netboot/chef.sh +2 -0
- data/templates/Debian-6.0.3-amd64-netboot/cleanup-virtualbox.sh +2 -0
- data/templates/Debian-6.0.3-amd64-netboot/cleanup.sh +18 -0
- data/templates/{Debian-6.0.2-amd64-netboot → Debian-6.0.3-amd64-netboot}/definition.rb +5 -4
- data/templates/Debian-6.0.3-amd64-netboot/postinstall.sh +80 -0
- data/templates/{Debian-6.0.2-amd64-netboot → Debian-6.0.3-amd64-netboot}/preseed.cfg +0 -0
- data/templates/Debian-6.0.3-amd64-netboot/puppet.sh +2 -0
- data/templates/Debian-6.0.3-amd64-netboot/ruby.sh +10 -0
- data/templates/Debian-6.0.3-amd64-netboot/vagrant.sh +25 -0
- data/templates/Debian-6.0.3-amd64-netboot/virtualbox.sh +15 -0
- data/templates/Debian-6.0.3-amd64-netboot/zerodisk.sh +3 -0
- data/templates/Debian-6.0.3-i386-netboot/base.sh +13 -0
- data/templates/Debian-6.0.3-i386-netboot/chef.sh +2 -0
- data/templates/Debian-6.0.3-i386-netboot/cleanup-virtualbox.sh +2 -0
- data/templates/Debian-6.0.3-i386-netboot/cleanup.sh +18 -0
- data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/definition.rb +3 -3
- data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/postinstall.sh +1 -4
- data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/preseed.cfg +0 -0
- data/templates/Debian-6.0.3-i386-netboot/puppet.sh +2 -0
- data/templates/Debian-6.0.3-i386-netboot/ruby.sh +10 -0
- data/templates/Debian-6.0.3-i386-netboot/vagrant.sh +25 -0
- data/templates/Debian-6.0.3-i386-netboot/virtualbox.sh +15 -0
- data/templates/Debian-6.0.3-i386-netboot/zerodisk.sh +3 -0
- data/templates/Debian-6.0.4-amd64-netboot/base.sh +13 -0
- data/templates/Debian-6.0.4-amd64-netboot/chef.sh +2 -0
- data/templates/Debian-6.0.4-amd64-netboot/cleanup-virtualbox.sh +4 -0
- data/templates/Debian-6.0.4-amd64-netboot/cleanup.sh +17 -0
- data/templates/Debian-6.0.4-amd64-netboot/definition.rb +49 -0
- data/templates/Debian-6.0.4-amd64-netboot/preseed.cfg +315 -0
- data/templates/Debian-6.0.4-amd64-netboot/puppet.sh +2 -0
- data/templates/Debian-6.0.4-amd64-netboot/ruby.sh +10 -0
- data/templates/Debian-6.0.4-amd64-netboot/vagrant.sh +21 -0
- data/templates/Debian-6.0.4-amd64-netboot/virtualbox.sh +13 -0
- data/templates/Debian-6.0.4-amd64-netboot/zerodisk.sh +3 -0
- data/templates/Debian-6.0.4-i386-netboot/base.sh +13 -0
- data/templates/Debian-6.0.4-i386-netboot/chef.sh +2 -0
- data/templates/Debian-6.0.4-i386-netboot/cleanup-virtualbox.sh +4 -0
- data/templates/Debian-6.0.4-i386-netboot/cleanup.sh +17 -0
- data/templates/Debian-6.0.4-i386-netboot/definition.rb +51 -0
- data/templates/Debian-6.0.4-i386-netboot/preseed.cfg +315 -0
- data/templates/Debian-6.0.4-i386-netboot/puppet.sh +2 -0
- data/templates/Debian-6.0.4-i386-netboot/ruby.sh +10 -0
- data/templates/Debian-6.0.4-i386-netboot/vagrant.sh +21 -0
- data/templates/Debian-6.0.4-i386-netboot/virtualbox.sh +13 -0
- data/templates/Debian-6.0.4-i386-netboot/zerodisk.sh +3 -0
- data/templates/Fedora-14-amd64-netboot/postinstall.sh +1 -1
- data/templates/Fedora-14-amd64/postinstall.sh +1 -1
- data/templates/Fedora-14-i386-netboot/postinstall.sh +1 -1
- data/templates/Fedora-14-i386/postinstall.sh +1 -1
- data/templates/Fedora-15-x86_64-netboot/definition.rb +29 -0
- data/templates/Fedora-15-x86_64-netboot/ks.cfg +64 -0
- data/templates/Fedora-15-x86_64-netboot/postinstall.sh +33 -0
- data/templates/Fedora-16-i386/definition.rb +17 -0
- data/templates/Fedora-16-i386/ks.cfg +72 -0
- data/templates/Fedora-16-i386/postinstall.sh +35 -0
- data/templates/Fedora-16-x86_64/definition.rb +17 -0
- data/templates/Fedora-16-x86_64/ks.cfg +72 -0
- data/templates/Fedora-16-x86_64/postinstall.sh +35 -0
- data/templates/SLES-11-SP1-DVD-i586-GM/autoinst_de.xml +1127 -0
- data/templates/SLES-11-SP1-DVD-i586-GM/autoinst_en.xml +1127 -0
- data/templates/SLES-11-SP1-DVD-i586-GM/definition.rb +37 -0
- data/templates/SLES-11-SP1-DVD-i586-GM/postinstall.sh +43 -0
- data/templates/SLES-11-SP1-DVD-x86_64-GM/autoinst_de.xml +1171 -0
- data/templates/SLES-11-SP1-DVD-x86_64-GM/autoinst_en.xml +1171 -0
- data/templates/SLES-11-SP1-DVD-x86_64-GM/definition.rb +37 -0
- data/templates/SLES-11-SP1-DVD-x86_64-GM/postinstall.sh +43 -0
- data/templates/archlinux-i386-netboot/aif.cfg +8 -14
- data/templates/archlinux-i386-netboot/definition.rb +4 -7
- data/templates/archlinux-i386-netboot/postinstall.sh +5 -17
- data/templates/archlinux-i386-netboot/postinstall2.sh +3 -1
- data/templates/archlinux-i386/postinstall.sh +1 -1
- data/templates/archlinux-x86_64-netboot/aif.cfg +8 -14
- data/templates/archlinux-x86_64-netboot/definition.rb +4 -7
- data/templates/archlinux-x86_64-netboot/postinstall.sh +1 -16
- data/templates/archlinux-x86_64-netboot/postinstall2.sh +3 -1
- data/templates/archlinux-x86_64/postinstall.sh +1 -1
- data/templates/freebsd-8.2-pcbsd-i386-netboot/definition.rb +5 -3
- data/templates/freebsd-8.2-pcbsd-i386-netboot/postinstall.sh +1 -1
- data/templates/freebsd-8.2-pcbsd-i386/definition.rb +3 -2
- data/templates/freebsd-8.2-pcbsd-i386/postinstall.sh +1 -1
- data/templates/funtoo-latest-generic_64-stable/definition.rb +34 -0
- data/templates/funtoo-latest-generic_64-stable/postinstall.sh +177 -0
- data/templates/funtoo-latest-generic_64-stable/postinstall2.sh +83 -0
- data/templates/gentoo-latest-i386-experimental/definition.rb +6 -6
- data/templates/gentoo-latest-i386-experimental/postinstall.sh +1 -1
- data/templates/gentoo-latest-x86_64-experimental/definition.rb +34 -0
- data/templates/gentoo-latest-x86_64-experimental/postinstall.sh +214 -0
- data/templates/openSUSE-11.4-DVD-i586/postinstall.sh +6 -1
- data/templates/openSUSE-11.4-DVD-x86_64/postinstall.sh +6 -1
- data/templates/openSUSE-11.4-NET-i586/postinstall.sh +6 -1
- data/templates/openSUSE-11.4-NET-x86_64/postinstall.sh +6 -1
- data/templates/openSUSE-12.1-DVD+NET-i586/autoinst_de.xml +1483 -0
- data/templates/openSUSE-12.1-DVD+NET-i586/autoinst_en.xml +1483 -0
- data/templates/openSUSE-12.1-DVD+NET-i586/definition.rb +44 -0
- data/templates/openSUSE-12.1-DVD+NET-i586/postinstall.sh +48 -0
- data/templates/openSUSE-12.1-DVD+NET-x86_64/autoinst_de.xml +1727 -0
- data/templates/openSUSE-12.1-DVD+NET-x86_64/autoinst_en.xml +1727 -0
- data/templates/openSUSE-12.1-DVD+NET-x86_64/definition.rb +44 -0
- data/templates/openSUSE-12.1-DVD+NET-x86_64/postinstall.sh +48 -0
- data/templates/openbsd50_amd64/README +28 -0
- data/templates/openbsd50_amd64/definition.rb +84 -0
- data/templates/openbsd50_amd64/postinstall.sh +81 -0
- data/templates/openbsd50_i386/README +28 -0
- data/templates/openbsd50_i386/definition.rb +84 -0
- data/templates/openbsd50_i386/postinstall.sh +80 -0
- data/templates/openindiana-148-ai-x86/definition.rb +1 -1
- data/templates/openindiana-148-ai-x86/postinstall.sh +1 -1
- data/templates/opensuse-11.4-i386-experimental/postinstall.sh +1 -1
- data/templates/scientificlinux-6.1-i386-netboot/base.sh +1 -0
- data/templates/scientificlinux-6.1-i386-netboot/chef.sh +1 -0
- data/templates/scientificlinux-6.1-i386-netboot/cleanup.sh +4 -0
- data/templates/scientificlinux-6.1-i386-netboot/definition.rb +35 -0
- data/templates/scientificlinux-6.1-i386-netboot/ks.cfg +53 -0
- data/templates/scientificlinux-6.1-i386-netboot/postinstall.sh +30 -0
- data/templates/scientificlinux-6.1-i386-netboot/puppet.sh +1 -0
- data/templates/scientificlinux-6.1-i386-netboot/vagrant.sh +8 -0
- data/templates/scientificlinux-6.1-i386-netboot/virtualbox.sh +8 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/base.sh +1 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/chef.sh +1 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/cleanup.sh +4 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/definition.rb +35 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/ks.cfg +53 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/postinstall.sh +30 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/puppet.sh +1 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/vagrant.sh +8 -0
- data/templates/scientificlinux-6.1-x86_64-netboot/virtualbox.sh +8 -0
- data/templates/solaris-11-express-i386/definition.rb +1 -1
- data/templates/solaris-11-express-i386/postinstall.sh +1 -1
- data/templates/ubuntu-10.04.2-amd64-netboot/postinstall.sh +12 -11
- data/templates/ubuntu-10.04.2-server-i386-netboot/postinstall.sh +12 -11
- data/templates/ubuntu-10.04.3-server-amd64-alt/definition.rb +2 -2
- data/templates/ubuntu-10.04.3-server-amd64-alt/postinstall.sh +12 -11
- data/templates/ubuntu-10.04.3-server-amd64/vagrant.sh +1 -1
- data/templates/ubuntu-10.04.3-server-i386/postinstall.sh +12 -11
- data/templates/ubuntu-10.04.4-server-amd64/definition.rb +24 -0
- data/templates/ubuntu-10.04.4-server-amd64/postinstall.sh +92 -0
- data/templates/ubuntu-10.04.4-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-10.04.4-server-i386/definition.rb +24 -0
- data/templates/ubuntu-10.04.4-server-i386/postinstall.sh +92 -0
- data/templates/ubuntu-10.04.4-server-i386/preseed.cfg +87 -0
- data/templates/ubuntu-10.10-server-amd64-netboot/postinstall.sh +12 -11
- data/templates/ubuntu-10.10-server-amd64/postinstall.sh +12 -11
- data/templates/ubuntu-10.10-server-i386-netboot/postinstall.sh +12 -11
- data/templates/ubuntu-10.10-server-i386/postinstall.sh +12 -11
- data/templates/ubuntu-11.04-server-amd64/ssh-keys.sh +1 -1
- data/templates/ubuntu-11.04-server-i386/definition.rb +1 -1
- data/templates/ubuntu-11.04-server-i386/postinstall.sh +12 -11
- data/templates/ubuntu-11.10-server-amd64-ishaya/definition.rb +24 -0
- data/templates/ubuntu-11.10-server-amd64-ishaya/postinstall.sh +91 -0
- data/templates/ubuntu-11.10-server-amd64-ishaya/preseed.cfg +87 -0
- data/templates/ubuntu-11.10-server-amd64-ruby192/definition.rb +24 -0
- data/templates/ubuntu-11.10-server-amd64-ruby192/postinstall.sh +91 -0
- data/templates/ubuntu-11.10-server-amd64-ruby192/preseed.cfg +87 -0
- data/templates/ubuntu-11.10-server-amd64-rvm/definition.rb +35 -0
- data/templates/ubuntu-11.10-server-amd64-rvm/postinstall.sh +85 -0
- data/templates/ubuntu-11.10-server-amd64-rvm/preseed.cfg +93 -0
- data/templates/ubuntu-11.10-server-amd64/definition.rb +35 -0
- data/templates/ubuntu-11.10-server-amd64/postinstall.sh +89 -0
- data/templates/ubuntu-11.10-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-11.10-server-i386/definition.rb +35 -0
- data/templates/ubuntu-11.10-server-i386/postinstall.sh +89 -0
- data/templates/ubuntu-11.10-server-i386/preseed.cfg +87 -0
- data/templates/ubuntu-12.04-server-amd64-packages/definition.rb +37 -0
- data/templates/{Debian-6.0.2-amd64-netboot → ubuntu-12.04-server-amd64-packages}/postinstall.sh +33 -32
- data/templates/ubuntu-12.04-server-amd64-packages/preseed.cfg +87 -0
- data/templates/ubuntu-12.04-server-amd64/definition.rb +37 -0
- data/templates/ubuntu-12.04-server-amd64/postinstall.sh +92 -0
- data/templates/ubuntu-12.04-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-8.04.4-server-amd64/definition.rb +1 -0
- data/templates/ubuntu-8.04.4-server-amd64/postinstall.sh +19 -17
- data/templates/ubuntu-8.04.4-server-amd64/preseed.cfg +0 -1
- data/templates/ubuntu-8.04.4-server-i386/definition.rb +1 -1
- data/templates/ubuntu-8.04.4-server-i386/postinstall.sh +34 -11
- data/templates/windows-2008R1-serverstandard-amd64/Autounattend.xml +146 -0
- data/templates/windows-2008R1-serverstandard-amd64/README.md +134 -0
- data/templates/windows-2008R1-serverstandard-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-2008R1-serverstandard-amd64/definition.rb +114 -0
- data/templates/windows-2008R1-serverstandard-amd64/install-cygwin-sshd.bat +41 -0
- data/templates/windows-2008R1-serverstandard-amd64/install-guest-additions.bat +5 -0
- data/templates/windows-2008R1-serverstandard-amd64/install-winrm.bat +16 -0
- data/templates/windows-2008R1-serverstandard-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R1-serverstandard-amd64/postinstall.sh +75 -0
- data/templates/windows-2008R1-serverstandard-amd64/sudo +2 -0
- data/templates/windows-2008R1-serverstandard-amd64/winrm.rb +8 -0
- data/templates/windows-2008R1-serverweb-amd64/Autounattend.xml +162 -0
- data/templates/windows-2008R1-serverweb-amd64/README.md +134 -0
- data/templates/windows-2008R1-serverweb-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-2008R1-serverweb-amd64/definition.rb +131 -0
- data/templates/windows-2008R1-serverweb-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-2008R1-serverweb-amd64/install-guest-additions.bat +5 -0
- data/templates/windows-2008R1-serverweb-amd64/install-vbox-guest.bat +2 -0
- data/templates/windows-2008R1-serverweb-amd64/install-winrm.bat +16 -0
- data/templates/windows-2008R1-serverweb-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R1-serverweb-amd64/postinstall.sh +74 -0
- data/templates/windows-2008R1-serverweb-amd64/sudo +2 -0
- data/templates/windows-2008R1-serverweb-amd64/winrm.rb +8 -0
- data/templates/windows-2008R1-serverweb-i386/Autounattend.xml +142 -0
- data/templates/windows-2008R1-serverweb-i386/README.md +136 -0
- data/templates/windows-2008R1-serverweb-i386/cygwin-setup.exe +0 -0
- data/templates/windows-2008R1-serverweb-i386/definition.rb +132 -0
- data/templates/windows-2008R1-serverweb-i386/install-cygwin-sshd.bat +40 -0
- data/templates/windows-2008R1-serverweb-i386/install-vbox-guest.bat +2 -0
- data/templates/windows-2008R1-serverweb-i386/install-winrm.bat +14 -0
- data/templates/windows-2008R1-serverweb-i386/oracle-cert.cer +0 -0
- data/templates/windows-2008R1-serverweb-i386/postinstall.sh +74 -0
- data/templates/windows-2008R1-serverweb-i386/sudo +2 -0
- data/templates/windows-2008R1-serverweb-i386/winrm.rb +8 -0
- data/templates/windows-2008R1-serverwebcore-amd64/Autounattend.xml +162 -0
- data/templates/windows-2008R1-serverwebcore-amd64/README.md +134 -0
- data/templates/windows-2008R1-serverwebcore-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-2008R1-serverwebcore-amd64/definition.rb +132 -0
- data/templates/windows-2008R1-serverwebcore-amd64/install-cygwin-sshd.bat +41 -0
- data/templates/windows-2008R1-serverwebcore-amd64/install-vbox-guest.bat +2 -0
- data/templates/windows-2008R1-serverwebcore-amd64/install-winrm.bat +14 -0
- data/templates/windows-2008R1-serverwebcore-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R1-serverwebcore-amd64/postinstall.sh +74 -0
- data/templates/windows-2008R1-serverwebcore-amd64/sudo +2 -0
- data/templates/windows-2008R1-serverwebcore-amd64/winrm.rb +8 -0
- data/templates/windows-2008R2-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-2008R2-amd64/install-winrm.bat +2 -0
- data/templates/windows-2008R2-amd64/postinstall.sh +1 -1
- data/templates/windows-2008R2-serverstandard-amd64/Autounattend.xml +147 -0
- data/templates/windows-2008R2-serverstandard-amd64/README.md +142 -0
- data/templates/windows-2008R2-serverstandard-amd64/definition.rb +43 -0
- data/templates/windows-2008R2-serverstandard-amd64/install-cygwin-sshd.bat +41 -0
- data/templates/windows-2008R2-serverstandard-amd64/install-winrm.bat +11 -0
- data/templates/windows-2008R2-serverstandard-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R2-serverstandard-amd64/postinstall.sh +74 -0
- data/templates/windows-2008R2-serverweb-amd64/Autounattend.xml +151 -0
- data/templates/windows-2008R2-serverweb-amd64/README.md +142 -0
- data/templates/windows-2008R2-serverweb-amd64/definition.rb +38 -0
- data/templates/windows-2008R2-serverweb-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-2008R2-serverweb-amd64/install-vbox-guest.bat +2 -0
- data/templates/windows-2008R2-serverweb-amd64/install-winrm.bat +11 -0
- data/templates/windows-2008R2-serverweb-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R2-serverweb-amd64/postinstall.sh +74 -0
- data/templates/windows-2008R2-serverwebcore-amd64/Autounattend.xml +145 -0
- data/templates/windows-2008R2-serverwebcore-amd64/README.md +142 -0
- data/templates/windows-2008R2-serverwebcore-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-2008R2-serverwebcore-amd64/definition.rb +46 -0
- data/templates/windows-2008R2-serverwebcore-amd64/install-cygwin-sshd.bat +41 -0
- data/templates/windows-2008R2-serverwebcore-amd64/install-vbox-guest.bat +2 -0
- data/templates/windows-2008R2-serverwebcore-amd64/install-winrm.bat +11 -0
- data/templates/windows-2008R2-serverwebcore-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R2-serverwebcore-amd64/postinstall.sh +74 -0
- data/templates/windows-7-enterprise-amd64/Autounattend.xml +155 -0
- data/templates/windows-7-enterprise-amd64/README.md +52 -0
- data/templates/windows-7-enterprise-amd64/definition.rb +40 -0
- data/templates/windows-7-enterprise-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7-enterprise-amd64/install-vbox-guest.bat +2 -0
- data/templates/windows-7-enterprise-amd64/install-winrm.bat +14 -0
- data/templates/windows-7-enterprise-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7-enterprise-amd64/postinstall.sh +74 -0
- data/templates/windows-7-enterprise-i386/Autounattend.xml +151 -0
- data/templates/windows-7-enterprise-i386/README.md +169 -0
- data/templates/windows-7-enterprise-i386/definition.rb +40 -0
- data/templates/windows-7-enterprise-i386/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7-enterprise-i386/install-winrm.bat +14 -0
- data/templates/windows-7-enterprise-i386/oracle-cert.cer +0 -0
- data/templates/windows-7-enterprise-i386/postinstall.sh +74 -0
- data/templates/windows-7-premium-amd64/Autounattend.xml +152 -0
- data/templates/windows-7-premium-amd64/README.md +171 -0
- data/templates/windows-7-premium-amd64/definition.rb +38 -0
- data/templates/windows-7-premium-amd64/install-chefclient.bat +44 -0
- data/templates/windows-7-premium-amd64/install-winrm.bat +11 -0
- data/templates/windows-7-premium-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7-premium-amd64/postinstall.sh +124 -0
- data/templates/windows-7-premium-amd64/winrm.rb +8 -0
- data/templates/windows-7-professional-amd64/Autounattend.xml +152 -0
- data/templates/windows-7-professional-amd64/README.md +171 -0
- data/templates/windows-7-professional-amd64/definition.rb +41 -0
- data/templates/windows-7-professional-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7-professional-amd64/install-winrm.bat +14 -0
- data/templates/windows-7-professional-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7-professional-amd64/postinstall.sh +74 -0
- data/templates/windows-7-ultimate-amd64/Autounattend.xml +152 -0
- data/templates/windows-7-ultimate-amd64/README.md +89 -0
- data/templates/windows-7-ultimate-amd64/definition.rb +41 -0
- data/templates/windows-7-ultimate-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7-ultimate-amd64/install-winrm.bat +14 -0
- data/templates/windows-7-ultimate-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7-ultimate-amd64/postinstall.sh +74 -0
- data/templates/windows-7sp1-ultimate-amd64/Autounattend.xml +149 -0
- data/templates/windows-7sp1-ultimate-amd64/README.md +89 -0
- data/templates/windows-7sp1-ultimate-amd64/definition.rb +42 -0
- data/templates/windows-7sp1-ultimate-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7sp1-ultimate-amd64/install-winrm.bat +14 -0
- data/templates/windows-7sp1-ultimate-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7sp1-ultimate-amd64/postinstall.sh +74 -0
- data/templates/windows-8-preview-dev-amd64/Autounattend.xml +140 -0
- data/templates/windows-8-preview-dev-amd64/README.md +134 -0
- data/templates/windows-8-preview-dev-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-8-preview-dev-amd64/definition.rb +114 -0
- data/templates/windows-8-preview-dev-amd64/install-cygwin-sshd.bat +38 -0
- data/templates/windows-8-preview-dev-amd64/install-winrm.bat +11 -0
- data/templates/windows-8-preview-dev-amd64/oracle-cert.cer +0 -0
- data/templates/windows-8-preview-dev-amd64/postinstall.sh +122 -0
- data/templates/windows-8-preview-dev-amd64/winrm.rb +8 -0
- data/test/build_realtest.rb +71 -0
- data/test/definition_test.rb +3 -3
- data/test/definitions/test_definition/_disabled_postinstall.sh +1 -0
- data/test/definitions/test_definition/definition.rb +14 -17
- data/test/definitions/test_definition/enabled_postinstall.sh +1 -0
- data/test/environment_test.rb +4 -4
- data/validation/features/steps/{ssh_steps.rb → ssh_steps.old} +0 -0
- data/validation/features/steps/veewee_steps.rb +27 -0
- data/validation/veewee.feature +45 -0
- data/veewee.gemspec +18 -11
- metadata +500 -175
- data/Gemfile.lock +0 -98
- data/README-LIB.md +0 -2
- data/lib/veewee/builder/core/box.rb +0 -32
- data/lib/veewee/builder/core/builder/build.rb +0 -250
- data/lib/veewee/builder/core/builder/iso.rb +0 -120
- data/lib/veewee/builder/kvm/box.rb +0 -130
- data/lib/veewee/builder/kvm/builder.rb +0 -38
- data/lib/veewee/builder/virtualbox/box.rb +0 -121
- data/lib/veewee/builder/virtualbox/builder.rb +0 -48
- data/lib/veewee/builder/virtualbox/helper/_snapshots.rb +0 -105
- data/lib/veewee/builder/virtualbox/helper/_transaction.rb +0 -135
- data/lib/veewee/builder/virtualbox/helper/console_type.rb +0 -62
- data/lib/veewee/builder/virtualbox/helper/create.rb +0 -210
- data/lib/veewee/builder/virtualbox/helper/destroy.rb +0 -79
- data/lib/veewee/builder/virtualbox/helper/export_vagrant.rb +0 -87
- data/lib/veewee/builder/virtualbox/helper/validate_vagrant.rb +0 -35
- data/lib/veewee/builder/vmfusion/box.rb +0 -137
- data/lib/veewee/builder/vmfusion/builder.rb +0 -78
- data/lib/veewee/builder/vmfusion/helper/export_ova.rb +0 -26
- data/lib/veewee/builder/vmfusion/helper/validate_vmfusion.rb +0 -37
- data/lib/veewee/config/builders.rb +0 -36
- data/lib/veewee/util/scancode.rb +0 -112
- data/lib/veewee/util/shell.rb +0 -42
- data/lib/veewee/util/ssh.rb +0 -158
- data/lib/veewee/util/tcp.rb +0 -88
- data/lib/veewee/util/web.rb +0 -63
- data/lib/veewee/vagrant/config.rb +0 -7
- data/test/build_test.rb +0 -50
- data/test/definitions/test_definition/_test_me.sh +0 -1
- data/validation/vagrant.feature +0 -68
@@ -0,0 +1,37 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:os_type_id => 'OpenSUSE_64',
|
3
|
+
:cpu_count => '1',
|
4
|
+
:memory_size => '1024',
|
5
|
+
:disk_size => '20480',
|
6
|
+
:disk_format => 'VDI',
|
7
|
+
:hostiocache => 'off',
|
8
|
+
:iso_file => "SLES-11-SP1-DVD-x86_64-GM-DVD1.iso",
|
9
|
+
:iso_src => "",
|
10
|
+
:iso_md5 => "d2e10420f3689faa49a004b60fb396b7",
|
11
|
+
:iso_download_timeout => "1000",
|
12
|
+
:boot_wait => "10",
|
13
|
+
:boot_cmd_sequence => [
|
14
|
+
'<Esc><Enter>',
|
15
|
+
'linux netdevice=eth0 netsetup=dhcp install=cd:/',
|
16
|
+
' lang=en_US autoyast=http://%IP%:%PORT%/autoinst_en.xml',
|
17
|
+
### disable prev line and enable next line to install with german settings
|
18
|
+
#' lang=de_DE autoyast=http://%IP%:%PORT%/autoinst_de.xml',
|
19
|
+
' textmode=1',
|
20
|
+
'<Enter>'
|
21
|
+
],
|
22
|
+
:kickstart_port => "7122",
|
23
|
+
:kickstart_timeout => "10000",
|
24
|
+
:kickstart_file => ["autoinst_en.xml", "autoinst_en.xml"],
|
25
|
+
### disable prev line and enable next line to install with german settings
|
26
|
+
#:kickstart_file => ["autoinst_de.xml", "autoinst_de.xml"],
|
27
|
+
:ssh_login_timeout => "10000",
|
28
|
+
:ssh_user => "vagrant",
|
29
|
+
:ssh_password => "vagrant",
|
30
|
+
:ssh_key => "",
|
31
|
+
:ssh_host_port => "7222",
|
32
|
+
:ssh_guest_port => "22",
|
33
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
34
|
+
:shutdown_cmd => "shutdown -P now",
|
35
|
+
:postinstall_files => ["postinstall.sh"],
|
36
|
+
:postinstall_timeout => "10000"
|
37
|
+
})
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#
|
2
|
+
# postinstall.sh
|
3
|
+
#
|
4
|
+
|
5
|
+
date > /etc/vagrant_box_build_time
|
6
|
+
|
7
|
+
# install vagrant key
|
8
|
+
echo -e "\ninstall vagrant key ..."
|
9
|
+
mkdir -m 0700 /home/vagrant/.ssh
|
10
|
+
cd /home/vagrant/.ssh
|
11
|
+
wget --no-check-certificate -O authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub
|
12
|
+
chmod 0600 /home/vagrant/.ssh/authorized_keys
|
13
|
+
chown -R vagrant.users /home/vagrant/.ssh
|
14
|
+
|
15
|
+
# update sudoers
|
16
|
+
echo -e "\nupdate sudoers ..."
|
17
|
+
echo -e "\n# added by veewee/postinstall.sh" >> /etc/sudoers
|
18
|
+
echo -e "vagrant ALL=(ALL) NOPASSWD: ALL\n" >> /etc/sudoers
|
19
|
+
|
20
|
+
# speed-up remote logins
|
21
|
+
echo -e "\nspeed-up remote logins ..."
|
22
|
+
echo -e "\n# added by veewee/postinstall.sh" >> /etc/ssh/sshd_config
|
23
|
+
echo -e "UseDNS no\n" >> /etc/ssh/sshd_config
|
24
|
+
|
25
|
+
# install chef and puppet
|
26
|
+
echo -e "\ninstall chef and puppet ..."
|
27
|
+
gem install chef --no-ri --no-rdoc
|
28
|
+
gem install puppet --no-ri --no-rdoc
|
29
|
+
|
30
|
+
# install the virtualbox guest additions
|
31
|
+
echo -e "\ninstall the virtualbox guest additions ..."
|
32
|
+
zypper --non-interactive remove `rpm -qa virtualbox-guest-*` >/dev/null 2>&1
|
33
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
34
|
+
cd /tmp
|
35
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
36
|
+
#wget http://192.168.178.10/VBoxGuestAdditions_$VBOX_VERSION.iso
|
37
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
38
|
+
sh /mnt/VBoxLinuxAdditions.run
|
39
|
+
umount /mnt
|
40
|
+
rm -f VBoxGuestAdditions_$VBOX_VERSION.iso
|
41
|
+
|
42
|
+
echo -e "\nall done.\n"
|
43
|
+
exit
|
@@ -1,11 +1,15 @@
|
|
1
1
|
# Archlinux AIF config file
|
2
2
|
# created by Dave Simons
|
3
|
-
#
|
3
|
+
# 21/09/2011
|
4
4
|
|
5
5
|
# install source
|
6
6
|
SOURCE=net
|
7
|
-
|
8
|
-
|
7
|
+
if [ -d /repo/core ]; then
|
8
|
+
TARGET_REPOSITORIES=(core 'file:///repo/$repo/$arch')
|
9
|
+
else
|
10
|
+
MIRROR='http://archlinux.mirror.kangaroot.net/$repo/os/$arch'
|
11
|
+
TARGET_REPOSITORIES=(core $var_MIRRORLIST extra $var_MIRRORLIST community $var_MIRRORLIST)
|
12
|
+
fi
|
9
13
|
|
10
14
|
# time/date
|
11
15
|
HARDWARECLOCK=localtime
|
@@ -13,7 +17,7 @@ TIMEZONE=Europe/Brussels
|
|
13
17
|
|
14
18
|
# packages to install
|
15
19
|
TARGET_GROUPS=base
|
16
|
-
TARGET_PACKAGES='sudo openssh vim ruby
|
20
|
+
TARGET_PACKAGES='sudo openssh vim libyaml ruby linux-headers make gcc glibc git perl net-tools'
|
17
21
|
TARGET_PACKAGES_EXCLUDE='nano emacs wpa_supplicant xfsprogs reiserfsprogs pcmciautils mdadm jfsutils cryptsetup lvm2'
|
18
22
|
|
19
23
|
# hard drive setup
|
@@ -22,13 +26,3 @@ PARTITIONS='/dev/sda 100:ext2:+ 512:swap *:ext4'
|
|
22
26
|
BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params
|
23
27
|
/dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params
|
24
28
|
/dev/sda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
|
25
|
-
|
26
|
-
worker_install_bootloader ()
|
27
|
-
{
|
28
|
-
cat << EOF > /mnt/boot/grub/device.map
|
29
|
-
(hd0) /dev/sda
|
30
|
-
EOF
|
31
|
-
grub-install $var_GRUB_DEVICE --root-directory=/mnt || return 1
|
32
|
-
bootdev=$(mount|grep $var_TARGET_DIR/boot|cut -d' ' -f1)
|
33
|
-
generate_grub_menulst || return 1
|
34
|
-
}
|
@@ -2,18 +2,15 @@ Veewee::Session.declare({
|
|
2
2
|
:cpu_count => '1', :memory_size=> '256',
|
3
3
|
:disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
|
4
4
|
:os_type_id => 'ArchLinux',
|
5
|
-
:iso_file => "archlinux-
|
6
|
-
:iso_src => "http://archlinux.mirror.kangaroot.net/iso/
|
7
|
-
:iso_md5 => "
|
5
|
+
:iso_file => "archlinux-2011.08.19-netinstall-i686.iso",
|
6
|
+
:iso_src => "http://archlinux.mirror.kangaroot.net/iso/2011.08.19/archlinux-2011.08.19-netinstall-i686.iso",
|
7
|
+
:iso_md5 => "c3f7e10d040eac1da0efe68fb2f64d5b",
|
8
8
|
:iso_download_timeout => "1000",
|
9
9
|
:boot_wait => "5", :boot_cmd_sequence => [
|
10
10
|
'<Enter>',
|
11
11
|
'<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
|
12
12
|
'<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
|
13
|
-
'<
|
14
|
-
'root<Enter>',
|
15
|
-
'dhcpcd eth0<Enter><Wait><Wait>',
|
16
|
-
'echo "sshd: ALL" > /etc/hosts.allow<Enter>',
|
13
|
+
'dhcpcd eth0<Enter><Wait><Wait><Wait><Wait>',
|
17
14
|
'passwd<Enter>',
|
18
15
|
'vagrant<Enter>',
|
19
16
|
'vagrant<Enter>',
|
@@ -1,5 +1,8 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
+
# var to determine package source
|
4
|
+
PKGSRC=net
|
5
|
+
|
3
6
|
date > /etc/vagrant_box_build_time
|
4
7
|
|
5
8
|
# launch automated install
|
@@ -39,12 +42,6 @@ EOF
|
|
39
42
|
# create puppet group
|
40
43
|
groupadd puppet
|
41
44
|
|
42
|
-
# make sure ssh is allowed
|
43
|
-
echo "sshd: ALL" > /etc/hosts.allow
|
44
|
-
|
45
|
-
# and everything else isn't
|
46
|
-
echo "ALL: ALL" > /etc/hosts.deny
|
47
|
-
|
48
45
|
# make sure sshd starts
|
49
46
|
sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 sshd):' /etc/rc.conf
|
50
47
|
|
@@ -58,24 +55,15 @@ chown -R vagrant /home/vagrant/.ssh
|
|
58
55
|
# choose a mirror
|
59
56
|
sed -i 's/^#\(.*leaseweb.*\)/\1/' /etc/pacman.d/mirrorlist
|
60
57
|
|
61
|
-
# update pacman
|
62
|
-
pacman -Syy
|
63
|
-
pacman -S --noconfirm pacman
|
64
|
-
|
65
|
-
# upgrade pacman db
|
66
|
-
pacman-db-upgrade
|
67
|
-
pacman -Syy
|
68
|
-
|
69
58
|
# install some packages
|
70
|
-
pacman -S --noconfirm glibc git
|
71
59
|
gem install --no-ri --no-rdoc chef facter
|
72
60
|
cd /tmp
|
73
61
|
git clone https://github.com/puppetlabs/puppet.git
|
74
62
|
cd puppet
|
75
|
-
ruby install.rb --bindir=/usr/bin --sbindir=/sbin
|
63
|
+
ruby install.rb --bindir=/usr/bin --sbindir=/sbin 2>/dev/null
|
76
64
|
|
77
65
|
# set up networking
|
78
|
-
sed -i 's/^\(interface=*\)/\1eth0/' /etc/rc.conf
|
66
|
+
[[ $PKGSRC == 'net' ]] && sed -i 's/^\(interface=*\)/\1eth0/' /etc/rc.conf
|
79
67
|
|
80
68
|
# leave the chroot
|
81
69
|
ENDCHROOT
|
@@ -22,7 +22,9 @@ y
|
|
22
22
|
EOF
|
23
23
|
|
24
24
|
# zero out the fs
|
25
|
-
dd if=/dev/zero of=/
|
25
|
+
dd if=/dev/zero of=/clean bs=4M|| rm /clean
|
26
|
+
dd if=/dev/zero of=/tmp/clean bs=4M|| rm /tmp/clean
|
27
|
+
dd if=/dev/zero of=/boot/clean bs=4M|| rm /boot/clean
|
26
28
|
|
27
29
|
# and the final reboot!
|
28
30
|
#reboot
|
@@ -52,7 +52,7 @@ sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 sshd):' /etc/rc.conf
|
|
52
52
|
# install mitchellh's ssh key
|
53
53
|
mkdir /home/vagrant/.ssh
|
54
54
|
chmod 700 /home/vagrant/.ssh
|
55
|
-
wget --no-check-certificate '
|
55
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
|
56
56
|
chmod 600 /home/vagrant/.ssh/authorized_keys
|
57
57
|
chown -R vagrant /home/vagrant/.ssh
|
58
58
|
|
@@ -1,11 +1,15 @@
|
|
1
1
|
# Archlinux AIF config file
|
2
2
|
# created by Dave Simons
|
3
|
-
#
|
3
|
+
# 21/09/2011
|
4
4
|
|
5
5
|
# install source
|
6
6
|
SOURCE=net
|
7
|
-
|
8
|
-
|
7
|
+
if [ -d /repo/core ]; then
|
8
|
+
TARGET_REPOSITORIES=(core 'file:///repo/$repo/$arch')
|
9
|
+
else
|
10
|
+
MIRROR='http://archlinux.mirror.kangaroot.net/$repo/os/$arch'
|
11
|
+
TARGET_REPOSITORIES=(core $var_MIRRORLIST extra $var_MIRRORLIST)
|
12
|
+
fi
|
9
13
|
|
10
14
|
# time/date
|
11
15
|
HARDWARECLOCK=localtime
|
@@ -13,7 +17,7 @@ TIMEZONE=Europe/Brussels
|
|
13
17
|
|
14
18
|
# packages to install
|
15
19
|
TARGET_GROUPS=base
|
16
|
-
TARGET_PACKAGES='sudo openssh vim ruby
|
20
|
+
TARGET_PACKAGES='sudo openssh vim ruby linux-headers make gcc glibc git perl net-tools'
|
17
21
|
TARGET_PACKAGES_EXCLUDE='nano emacs wpa_supplicant xfsprogs reiserfsprogs pcmciautils mdadm jfsutils cryptsetup lvm2'
|
18
22
|
|
19
23
|
# hard drive setup
|
@@ -22,13 +26,3 @@ PARTITIONS='/dev/sda 100:ext2:+ 512:swap *:ext4'
|
|
22
26
|
BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params
|
23
27
|
/dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params
|
24
28
|
/dev/sda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
|
25
|
-
|
26
|
-
worker_install_bootloader ()
|
27
|
-
{
|
28
|
-
cat << EOF > /mnt/boot/grub/device.map
|
29
|
-
(hd0) /dev/sda
|
30
|
-
EOF
|
31
|
-
grub-install $var_GRUB_DEVICE --root-directory=/mnt || return 1
|
32
|
-
bootdev=$(mount|grep $var_TARGET_DIR/boot|cut -d' ' -f1)
|
33
|
-
generate_grub_menulst || return 1
|
34
|
-
}
|
@@ -2,18 +2,15 @@ Veewee::Session.declare({
|
|
2
2
|
:cpu_count => '1', :memory_size=> '256',
|
3
3
|
:disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
|
4
4
|
:os_type_id => 'ArchLinux_64',
|
5
|
-
:iso_file => "archlinux-
|
6
|
-
:iso_src => "http://archlinux.mirror.kangaroot.net/iso/
|
7
|
-
:iso_md5 => "
|
5
|
+
:iso_file => "archlinux-2011.08.19-netinstall-x86_64.iso",
|
6
|
+
:iso_src => "http://archlinux.mirror.kangaroot.net/iso/2011.08.19/archlinux-2011.08.19-netinstall-x86_64.iso",
|
7
|
+
:iso_md5 => "03a328dfd7a2f901995d77bcf645130c",
|
8
8
|
:iso_download_timeout => "1000",
|
9
9
|
:boot_wait => "5", :boot_cmd_sequence => [
|
10
10
|
'<Enter>',
|
11
11
|
'<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
|
12
12
|
'<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
|
13
|
-
'<
|
14
|
-
'root<Enter>',
|
15
|
-
'dhcpcd eth0<Enter><Wait><Wait>',
|
16
|
-
'echo "sshd: ALL" > /etc/hosts.allow<Enter>',
|
13
|
+
'dhcpcd eth0<Enter><Wait><Wait><Wait><Wait>',
|
17
14
|
'passwd<Enter>',
|
18
15
|
'vagrant<Enter>',
|
19
16
|
'vagrant<Enter>',
|
@@ -42,12 +42,6 @@ EOF
|
|
42
42
|
# create puppet group
|
43
43
|
groupadd puppet
|
44
44
|
|
45
|
-
# make sure ssh is allowed
|
46
|
-
echo "sshd: ALL" > /etc/hosts.allow
|
47
|
-
|
48
|
-
# and everything else isn't
|
49
|
-
echo "ALL: ALL" > /etc/hosts.deny
|
50
|
-
|
51
45
|
# make sure sshd starts
|
52
46
|
sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 sshd):' /etc/rc.conf
|
53
47
|
|
@@ -61,21 +55,12 @@ chown -R vagrant /home/vagrant/.ssh
|
|
61
55
|
# choose a mirror
|
62
56
|
sed -i 's/^#\(.*leaseweb.*\)/\1/' /etc/pacman.d/mirrorlist
|
63
57
|
|
64
|
-
# update pacman
|
65
|
-
[[ $PKGSRC == 'cd' ]] && pacman -Syy
|
66
|
-
[[ $PKGSRC == 'cd' ]] && pacman -S --noconfirm pacman
|
67
|
-
|
68
|
-
# upgrade pacman db
|
69
|
-
pacman-db-upgrade
|
70
|
-
pacman -Syy
|
71
|
-
|
72
58
|
# install some packages
|
73
|
-
pacman -S --noconfirm glibc git
|
74
59
|
gem install --no-ri --no-rdoc chef facter
|
75
60
|
cd /tmp
|
76
61
|
git clone https://github.com/puppetlabs/puppet.git
|
77
62
|
cd puppet
|
78
|
-
ruby install.rb --bindir=/usr/bin --sbindir=/sbin
|
63
|
+
ruby install.rb --bindir=/usr/bin --sbindir=/sbin 2>/dev/null
|
79
64
|
|
80
65
|
# set up networking
|
81
66
|
[[ $PKGSRC == 'net' ]] && sed -i 's/^\(interface=*\)/\1eth0/' /etc/rc.conf
|
@@ -22,7 +22,9 @@ y
|
|
22
22
|
EOF
|
23
23
|
|
24
24
|
# zero out the fs
|
25
|
-
dd if=/dev/zero of=/
|
25
|
+
dd if=/dev/zero of=/clean bs=4M|| rm /clean
|
26
|
+
dd if=/dev/zero of=/tmp/clean bs=4M|| rm /tmp/clean
|
27
|
+
dd if=/dev/zero of=/boot/clean bs=4M|| rm /boot/clean
|
26
28
|
|
27
29
|
# and the final reboot!
|
28
30
|
#reboot
|
@@ -54,7 +54,7 @@ sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 sshd):' /etc/rc.conf
|
|
54
54
|
# install mitchellh's ssh key
|
55
55
|
mkdir /home/vagrant/.ssh
|
56
56
|
chmod 700 /home/vagrant/.ssh
|
57
|
-
wget --no-check-certificate '
|
57
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
|
58
58
|
chmod 600 /home/vagrant/.ssh/authorized_keys
|
59
59
|
chown -R vagrant /home/vagrant/.ssh
|
60
60
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# Many thanks to @draco2002
|
2
2
|
# http://dracosplace.com/veewee_and_freebsd
|
3
|
+
#Based on https://gist.github.com/911058
|
3
4
|
|
4
5
|
Veewee::Definition.declare( {
|
5
6
|
:cpu_count => '1', :memory_size=> '768',
|
@@ -13,7 +14,8 @@ Veewee::Definition.declare( {
|
|
13
14
|
'<KillX>',
|
14
15
|
'<Enter>',
|
15
16
|
'dhclient em0<Enter>',
|
16
|
-
'
|
17
|
+
'echo "waiting for 25 seconds"',
|
18
|
+
'sleep 25;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
|
17
19
|
'echo \'echo sshd_enable=\"YES\" >> $FSMNT/etc/rc.conf\' > /root/activate-ssh.sh ; cat /root/activate-ssh.sh<Enter>',
|
18
20
|
'chmod +x /root/activate-ssh.sh<Enter>',
|
19
21
|
'echo "Hope i got the file";/usr/PCBSD/pc-sysinstall/pc-sysinstall -c /root/pcinstall.fbg.cfg<Enter>',
|
@@ -25,5 +27,5 @@ Veewee::Definition.declare( {
|
|
25
27
|
:sudo_cmd => "cat '%f'|su -",
|
26
28
|
:shutdown_cmd => "shutdown -p now",
|
27
29
|
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
|
28
|
-
|
29
|
-
)
|
30
|
+
}
|
31
|
+
)
|
@@ -32,7 +32,7 @@ make install -DBATCH
|
|
32
32
|
mkdir /home/vagrant/.ssh
|
33
33
|
chmod 700 /home/vagrant/.ssh
|
34
34
|
cd /home/vagrant/.ssh
|
35
|
-
/usr/local/bin/wget --no-check-certificate '
|
35
|
+
/usr/local/bin/wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
36
36
|
chown -R vagrant /home/vagrant/.ssh
|
37
37
|
|
38
38
|
# Cleaning portstree to save space
|
@@ -9,14 +9,15 @@ Veewee::Definition.declare({
|
|
9
9
|
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
|
10
10
|
:os_type_id => 'FreeBSD',
|
11
11
|
:iso_file => "PCBSD8.2-x86-DVD.iso",
|
12
|
-
:iso_src => "http://
|
12
|
+
:iso_src => "http://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-DVD.iso",
|
13
13
|
:iso_md5 => "6433a8abf6073b177750d48398bed341",
|
14
14
|
:iso_download_timeout => "1000",
|
15
15
|
:boot_wait => "70", :boot_cmd_sequence => [
|
16
16
|
'<KillX>',
|
17
17
|
'<Enter>',
|
18
18
|
'dhclient em0<Enter>',
|
19
|
-
'
|
19
|
+
'echo "waiting for 25 seconds"',
|
20
|
+
'sleep 25;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
|
20
21
|
'echo \'echo sshd_enable=\"YES\" >> $FSMNT/etc/rc.conf\' > /root/activate-ssh.sh ; cat /root/activate-ssh.sh<Enter>',
|
21
22
|
'chmod +x /root/activate-ssh.sh<Enter>',
|
22
23
|
'echo "Hope i got the file";/usr/PCBSD/pc-sysinstall/pc-sysinstall -c /root/pcinstall.fbg.cfg<Enter>',
|
@@ -32,7 +32,7 @@ make install -DBATCH
|
|
32
32
|
mkdir /home/vagrant/.ssh
|
33
33
|
chmod 700 /home/vagrant/.ssh
|
34
34
|
cd /home/vagrant/.ssh
|
35
|
-
/usr/local/bin/wget --no-check-certificate '
|
35
|
+
/usr/local/bin/wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
36
36
|
chown -R vagrant /home/vagrant/.ssh
|
37
37
|
|
38
38
|
# Cleaning portstree to save space
|
@@ -0,0 +1,34 @@
|
|
1
|
+
Veewee::Session.declare( {
|
2
|
+
:cpu_count => '8', :memory_size=> '1536',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
|
4
|
+
:os_type_id => 'Gentoo_64', # Funtoo is a GIT based gentoo derivative
|
5
|
+
:iso_file => "install-amd64-minimal-20111208.iso",
|
6
|
+
:iso_src => "http://ftp.osuosl.org/pub/gentoo/releases/amd64/autobuilds/20111208/install-amd64-minimal-20111208.iso",
|
7
|
+
:iso_md5 => "8c4e10aaaa7cce35503c0d23b4e0a42a",
|
8
|
+
:iso_download_timeout => "1000",
|
9
|
+
:boot_wait => "4",
|
10
|
+
:boot_cmd_sequence => [
|
11
|
+
'<Wait>'*4,
|
12
|
+
'gentoo-nofb<Enter>', # boot gentoo no frame buffer mode option
|
13
|
+
'<Wait>'*45,
|
14
|
+
'<Enter>', # asks about your keyboard, take the default
|
15
|
+
'<Wait>'*45,
|
16
|
+
'<Enter><Wait>', # just in case we are out of sync
|
17
|
+
'net-setup eth0<Enter>',
|
18
|
+
'<Wait><Enter>',
|
19
|
+
'2<Enter>', # Set up the NIC card with DHCP
|
20
|
+
'1<Enter>',
|
21
|
+
'<Wait><Wait>ifconfig -a <Enter>',
|
22
|
+
'passwd<Enter><Wait><Wait>',
|
23
|
+
'vagrant<Enter><Wait>',
|
24
|
+
'vagrant<Enter><Wait>',
|
25
|
+
'/etc/init.d/sshd start<Enter><Wait><Wait>'
|
26
|
+
],
|
27
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "",
|
28
|
+
:ssh_login_timeout => "10000",:ssh_user => "root", :ssh_password => "vagrant",:ssh_key => "",
|
29
|
+
:ssh_host_port => "7222", :ssh_guest_port => "22",
|
30
|
+
:sudo_cmd => "cat '%f'|su -",
|
31
|
+
:shutdown_cmd => "shutdown -p now",
|
32
|
+
:postinstall_files => [ "postinstall.sh", "postinstall2.sh" ], :postinstall_timeout => "15000"
|
33
|
+
}
|
34
|
+
)
|
@@ -0,0 +1,177 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
date > /etc/vagrant_box_build_time
|
4
|
+
|
5
|
+
#Based on http://www.funtoo.org/wiki/Funtoo_Linux_Installation
|
6
|
+
|
7
|
+
#Partition the disk
|
8
|
+
# Gentoo live CD were using doesn't have gdisk and it looks
|
9
|
+
# to be interactive like fdisk. sfdisk is scritable but has issues.
|
10
|
+
#
|
11
|
+
# If you adjust, best to read this
|
12
|
+
# http://www.spinics.net/lists/util-linux-ng/msg03406.html
|
13
|
+
#
|
14
|
+
# Basically, all partitioning programs are wonky, sfdisk is scriptable, but likes
|
15
|
+
# to keeps things too tight skipping post-MBR spacing and "grub-install" fails later.
|
16
|
+
# Take the advice of the email and partition your drive with fdisk and dump it with
|
17
|
+
#
|
18
|
+
# sfdisk -uS -d /dev/sda
|
19
|
+
#
|
20
|
+
# and plug those values into the script. The --force by sector will get
|
21
|
+
# you what fdisk layed out and gets something grub-install can deal with. fun...
|
22
|
+
#
|
23
|
+
#
|
24
|
+
#/boot -> /dev/sda1 200M, left 2Meg of space for grub-install
|
25
|
+
#swap -> /dev/sda2 1.5G
|
26
|
+
#root -> /dev/sda3 Rest of space and bootable
|
27
|
+
|
28
|
+
sfdisk --force -uS /dev/sda <<EOF
|
29
|
+
4096,409600,L
|
30
|
+
413696,3072000,S
|
31
|
+
3485696,17281024,L,*
|
32
|
+
EOF
|
33
|
+
|
34
|
+
sleep 2
|
35
|
+
|
36
|
+
#Format the /boot
|
37
|
+
mke2fs -t ext2 /dev/sda1
|
38
|
+
|
39
|
+
#Main partition /
|
40
|
+
mke2fs -t ext4 /dev/sda3
|
41
|
+
|
42
|
+
#Format the swap and use it
|
43
|
+
mkswap /dev/sda2
|
44
|
+
swapon /dev/sda2
|
45
|
+
|
46
|
+
#Mount the new disk
|
47
|
+
mkdir /mnt/funtoo
|
48
|
+
mount /dev/sda3 /mnt/funtoo
|
49
|
+
mkdir /mnt/funtoo/boot
|
50
|
+
mount /dev/sda1 /mnt/funtoo/boot
|
51
|
+
cd /mnt/funtoo
|
52
|
+
|
53
|
+
#Note: we retry as sometimes mirrors fail to have the files
|
54
|
+
#Download a stage3 archive
|
55
|
+
wget --tries=5 http://ftp.osuosl.org/pub/funtoo/funtoo-stable/x86-64bit/generic_64/stage3-current.tar.xz
|
56
|
+
tar xpf stage3*
|
57
|
+
|
58
|
+
#Chroot
|
59
|
+
mount --bind /proc ./proc
|
60
|
+
mount --bind /dev ./dev
|
61
|
+
cp /etc/resolv.conf /mnt/funtoo/etc/
|
62
|
+
chroot /mnt/funtoo env-update
|
63
|
+
|
64
|
+
# git installed from stage3 tarball
|
65
|
+
chroot /mnt/funtoo emerge --sync
|
66
|
+
|
67
|
+
# California dreamin
|
68
|
+
cd /mnt/funtoo/etc
|
69
|
+
rm -f localtime
|
70
|
+
ln -s ../usr/share/zoneinfo/America/Los_Angeles localtime
|
71
|
+
cd /mnt/funtoo
|
72
|
+
|
73
|
+
# get fstab defined
|
74
|
+
cat <<FSTABEOF > /mnt/funtoo/etc/fstab
|
75
|
+
# The root filesystem should have a pass number of either 0 or 1.
|
76
|
+
# All other filesystems should have a pass number of 0 or greater than 1.
|
77
|
+
#
|
78
|
+
# See the manpage fstab(5) for more information.
|
79
|
+
#
|
80
|
+
# <fs> <mountpoint> <type> <opts> <dump/pass>
|
81
|
+
|
82
|
+
/dev/sda1 /boot ext2 noauto,noatime 1 2
|
83
|
+
/dev/sda2 none swap sw 0 0
|
84
|
+
/dev/sda3 / ext4 noatime 0 1
|
85
|
+
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
|
86
|
+
none /dev/shm tmpfs nodev,nosuid,noexec 0 0
|
87
|
+
FSTABEOF
|
88
|
+
|
89
|
+
# dhcp
|
90
|
+
chroot /mnt/funtoo rc-update add dhcpcd default
|
91
|
+
|
92
|
+
# Get the kernel sources
|
93
|
+
echo 'MAKEOPTS="-j9"' >> /mnt/funtoo/etc/make.conf
|
94
|
+
#echo 'MAKEOPTS="-j9"' >> /mnt/funtoo/etc/genkernel.conf
|
95
|
+
echo "sys-kernel/sysrescue-std-sources binary" >> /mnt/funtoo/etc/portage/package.use
|
96
|
+
echo "app-emulation/virtualbox-guest-additions" >> /mnt/funtoo/etc/portage/package.keywords
|
97
|
+
echo 'MAKEOPTS="-j9" emerge sysrescue-std-sources' | chroot /mnt/funtoo /bin/bash -
|
98
|
+
|
99
|
+
# Make the disk bootable
|
100
|
+
chroot /mnt/funtoo emerge boot-update
|
101
|
+
|
102
|
+
cat <<GRUBCONF > ./etc/boot.conf
|
103
|
+
boot {
|
104
|
+
generate grub
|
105
|
+
default "Funtoo Linux genkernel"
|
106
|
+
timeout 3
|
107
|
+
}
|
108
|
+
|
109
|
+
"Funtoo Linux" {
|
110
|
+
kernel bzImage[-v]
|
111
|
+
# params += nomodeset
|
112
|
+
}
|
113
|
+
|
114
|
+
"Funtoo Linux genkernel" {
|
115
|
+
kernel kernel[-v]
|
116
|
+
initrd initramfs[-v]
|
117
|
+
params += real_root=auto
|
118
|
+
# params += nomodeset
|
119
|
+
}
|
120
|
+
GRUBCONF
|
121
|
+
|
122
|
+
chroot /mnt/funtoo grub-install --no-floppy /dev/sda
|
123
|
+
chroot /mnt/funtoo boot-update
|
124
|
+
|
125
|
+
#Root password, needed since we're a two step installation
|
126
|
+
chroot /mnt/funtoo /bin/bash <<ENDCHROOT
|
127
|
+
passwd<<EOF
|
128
|
+
vagrant
|
129
|
+
vagrant
|
130
|
+
EOF
|
131
|
+
ENDCHROOT
|
132
|
+
|
133
|
+
#create vagrant user with password set to vagrant
|
134
|
+
chroot /mnt/funtoo groupadd -r vagrant
|
135
|
+
chroot /mnt/funtoo groupadd rvm
|
136
|
+
chroot /mnt/funtoo useradd -m -r vagrant -g vagrant -G wheel,rvm -p '$1$MPmczGP9$1SeNO4bw5YgiEJuo/ZkWq1' -c "Added by vagrant, veewee basebox creation"
|
137
|
+
chroot /mnt/funtoo rc-update add sshd default
|
138
|
+
|
139
|
+
#Allow external ssh
|
140
|
+
echo 'sshd:ALL' > /mnt/funtoo/etc/hosts.allow
|
141
|
+
echo 'ALL:ALL' > /mnt/funtoo/etc/hosts.deny
|
142
|
+
|
143
|
+
#Configure Sudo
|
144
|
+
chroot /mnt/funtoo emerge -u sudo
|
145
|
+
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /mnt/funtoo/etc/sudoers
|
146
|
+
|
147
|
+
|
148
|
+
#Installing vagrant keys
|
149
|
+
chroot /mnt/funtoo emerge -u wget
|
150
|
+
|
151
|
+
echo "creating vagrant ssh keys"
|
152
|
+
VAGRANTID=$(grep vagrant /mnt/funtoo/etc/passwd | cut -d ":" -f 3,4)
|
153
|
+
mkdir /mnt/funtoo/home/vagrant/.ssh
|
154
|
+
chmod 700 /mnt/funtoo/home/vagrant/.ssh
|
155
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /mnt/funtoo/home/vagrant/.ssh/authorized_keys
|
156
|
+
chmod 600 /mnt/funtoo/home/vagrant/.ssh/authorized_keys
|
157
|
+
chown -R ${VAGRANTID} /mnt/funtoo/home/vagrant/.ssh
|
158
|
+
|
159
|
+
/bin/cp -f /root/.vbox_version /mnt/funtoo/home/vagrant/.vbox_version
|
160
|
+
/bin/cp -f /etc/vagrant_box_build_time /mnt/funtoo/etc/vagrant_box_build_time
|
161
|
+
chown -R ${VAGRANTID} /mnt/funtoo/home/vagrant/.vbox_version
|
162
|
+
|
163
|
+
# veewee validate uses password authentication
|
164
|
+
sed -i -e 's:PasswordAuthentication no:PasswordAuthentication yes:' /mnt/funtoo/etc/ssh/sshd_config
|
165
|
+
|
166
|
+
#Get an editor going
|
167
|
+
chroot /mnt/funtoo emerge -u vim
|
168
|
+
echo "EDITOR=/usr/bin/vim" > /mnt/funtoo/etc/env.d/99editor
|
169
|
+
chroot /mnt/funtoo env-update
|
170
|
+
|
171
|
+
|
172
|
+
cd /
|
173
|
+
/etc/rc.d/network stop
|
174
|
+
umount /mnt/funtoo/{boot,proc,dev}
|
175
|
+
umount /mnt/funtoo
|
176
|
+
|
177
|
+
reboot
|