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
@@ -1,62 +0,0 @@
|
|
1
|
-
require 'veewee/util/scancode'
|
2
|
-
require 'veewee/util/tcp'
|
3
|
-
require 'veewee/util/shell'
|
4
|
-
|
5
|
-
module Veewee
|
6
|
-
module Builder
|
7
|
-
module Virtualbox
|
8
|
-
module BoxHelper
|
9
|
-
def console_type(sequence)
|
10
|
-
send_virtualbox_sequence(sequence)
|
11
|
-
end
|
12
|
-
|
13
|
-
def send_virtualbox_sequence(sequence)
|
14
|
-
|
15
|
-
env.ui.info ""
|
16
|
-
|
17
|
-
counter=0
|
18
|
-
sequence.each { |s|
|
19
|
-
counter=counter+1
|
20
|
-
|
21
|
-
env.ui.info "Typing:[#{counter}]: "+s
|
22
|
-
|
23
|
-
keycodes=Veewee::Util::Scancode.string_to_keycode(s)
|
24
|
-
|
25
|
-
# VBox seems to have issues with sending the scancodes as one big
|
26
|
-
# .join()-ed string. It seems to get them out or order or ignore some.
|
27
|
-
# A workaround is to send the scancodes one-by-one.
|
28
|
-
codes=""
|
29
|
-
for keycode in keycodes.split(' ') do
|
30
|
-
unless keycode=="wait"
|
31
|
-
send_keycode(keycode)
|
32
|
-
sleep 0.01
|
33
|
-
else
|
34
|
-
sleep 1
|
35
|
-
end
|
36
|
-
end
|
37
|
-
#sleep after each sequence (needs to be param)
|
38
|
-
sleep 0.5
|
39
|
-
}
|
40
|
-
|
41
|
-
env.ui.info "Done typing."
|
42
|
-
env.ui.info ""
|
43
|
-
|
44
|
-
end
|
45
|
-
|
46
|
-
def send_keycode(keycode)
|
47
|
-
command= "#{@vboxcmd} controlvm '#{name}' keyboardputscancode #{keycode}"
|
48
|
-
env.logger.info "#{command}"
|
49
|
-
sshresult=shell_exec("#{command}",{:mute => true})
|
50
|
-
unless sshresult.stdout.index("E_ACCESSDENIED").nil?
|
51
|
-
env.ui.error "There was an error typing the commands on the console"
|
52
|
-
env.ui.error "Probably the VM did not get started."
|
53
|
-
env.ui.error ""
|
54
|
-
env.ui.error "#{sshresult.stdout}"
|
55
|
-
exit -1
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
end #Module
|
60
|
-
end #Module
|
61
|
-
end #Module
|
62
|
-
end #Module
|
@@ -1,210 +0,0 @@
|
|
1
|
-
module Veewee
|
2
|
-
module Builder
|
3
|
-
module Virtualbox
|
4
|
-
module BoxHelper
|
5
|
-
|
6
|
-
def add_ide_controller(definition)
|
7
|
-
#unless => "${vboxcmd} showvminfo '${vname}' | grep 'IDE Controller' "
|
8
|
-
command ="#{@vboxcmd} storagectl '#{name}' --name 'IDE Controller' --add ide"
|
9
|
-
shell_exec("#{command}")
|
10
|
-
end
|
11
|
-
|
12
|
-
def add_sata_controller(definition)
|
13
|
-
#unless => "${vboxcmd} showvminfo '${vname}' | grep 'SATA Controller' ";
|
14
|
-
command ="#{@vboxcmd} storagectl '#{name}' --name 'SATA Controller' --add sata --hostiocache #{definition.hostiocache} --sataportcount 1"
|
15
|
-
shell_exec("#{command}")
|
16
|
-
end
|
17
|
-
|
18
|
-
def add_ssh_nat_mapping(definition)
|
19
|
-
|
20
|
-
#Map SSH Ports
|
21
|
-
# command => "${vboxcmd} modifyvm '${vname}' --natpf1 'guestssh,tcp,,${hostsshport},,${guestsshport}'",
|
22
|
-
port = VirtualBox::NATForwardedPort.new
|
23
|
-
port.name = "guestssh"
|
24
|
-
port.guestport = definition.ssh_guest_port.to_i
|
25
|
-
port.hostport = definition.ssh_host_port.to_i
|
26
|
-
raw.network_adapters[0].nat_driver.forwarded_ports << port
|
27
|
-
port.save
|
28
|
-
raw.save
|
29
|
-
end
|
30
|
-
|
31
|
-
def raw
|
32
|
-
vm=VirtualBox::VM.find(name)
|
33
|
-
return vm
|
34
|
-
end
|
35
|
-
|
36
|
-
def add_shared_folder(definition)
|
37
|
-
|
38
|
-
# command="#{@vboxcmd} sharedfolder add '#{name}' --name 'veewee-validation' --hostpath '#{File.expand_path(@environment.validation_dir)}' --automount"
|
39
|
-
# shell_exec("#{command}")
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
def get_vm_location
|
44
|
-
command="#{@vboxcmd} list systemproperties"
|
45
|
-
shell_results=shell_exec("#{command}",{:mute => true})
|
46
|
-
location=shell_results.stdout.split(/\n/).grep(/Default machine/)[0].split(":")[1].strip
|
47
|
-
return location
|
48
|
-
end
|
49
|
-
|
50
|
-
|
51
|
-
def suppress_messages
|
52
|
-
#Setting this annoying messages to register
|
53
|
-
VirtualBox::ExtraData.global["GUI/RegistrationData"]="triesLeft=0"
|
54
|
-
VirtualBox::ExtraData.global["GUI/UpdateDate"]="1 d, 2009-09-20"
|
55
|
-
VirtualBox::ExtraData.global["GUI/SuppressMessages"]="confirmInputCapture,remindAboutAutoCapture,remindAboutMouseIntegrationOff"
|
56
|
-
VirtualBox::ExtraData.global["GUI/UpdateCheckCount"]="60"
|
57
|
-
update_date=Time.now+86400
|
58
|
-
VirtualBox::ExtraData.global["GUI/UpdateDate"]="1 d, #{update_date.year}-#{update_date.month}-#{update_date.day}, stable"
|
59
|
-
VirtualBox::ExtraData.global.save
|
60
|
-
end
|
61
|
-
|
62
|
-
|
63
|
-
def create_floppy(definition)
|
64
|
-
# Todo Check for java
|
65
|
-
# Todo check output of commands
|
66
|
-
|
67
|
-
# Check for floppy
|
68
|
-
unless definition.floppy_files.nil?
|
69
|
-
require 'tmpdir'
|
70
|
-
temp_dir=Dir.tmpdir
|
71
|
-
definition.floppy_files.each do |filename|
|
72
|
-
full_filename=full_filename=File.join(definition.path,filename)
|
73
|
-
FileUtils.cp("#{full_filename}","#{temp_dir}")
|
74
|
-
end
|
75
|
-
javacode_dir=File.expand_path(File.join(__FILE__,'..','..','java'))
|
76
|
-
floppy_file=File.join(definition.path,"virtualfloppy.vfd")
|
77
|
-
command="java -jar #{javacode_dir}/dir2floppy.jar '#{temp_dir}' '#{floppy_file}'"
|
78
|
-
shell_exec("#{command}")
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
def create_disk(definition)
|
83
|
-
# Now check the disks
|
84
|
-
# Maybe one day we can use the name, now we have to check location
|
85
|
-
# disk=VirtualBox::HardDrive.find(box_name)
|
86
|
-
location=name+"."+definition.disk_format.downcase
|
87
|
-
found=false
|
88
|
-
VirtualBox::HardDrive.all.each do |d|
|
89
|
-
if !d.location.match(/#{location}/).nil?
|
90
|
-
found=true
|
91
|
-
break
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
# Sometimes the above doesn't find a registered harddisk, but the vdi files is still there
|
96
|
-
if File.exists?(location)
|
97
|
-
env.ui.info "#{location} file still exists but isn't registered"
|
98
|
-
env.ui.info "Let me clean up that mess for you."
|
99
|
-
FileUtils.rm(location)
|
100
|
-
end
|
101
|
-
|
102
|
-
if !found
|
103
|
-
env.ui.info "Creating new harddrive of size #{definition.disk_size.to_i} "
|
104
|
-
|
105
|
-
#newdisk=VirtualBox::HardDrive.new
|
106
|
-
#newdisk.format=definition[:disk_format]
|
107
|
-
#newdisk.logical_size=definition[:disk_size].to_i
|
108
|
-
|
109
|
-
#newdisk.location=location
|
110
|
-
##PDB: again problems with the virtualbox GEM
|
111
|
-
##VirtualBox::Global.global.max_vdi_size=1000000
|
112
|
-
#newdisk.save
|
113
|
-
|
114
|
-
place=get_vm_location
|
115
|
-
command ="#{@vboxcmd} createhd --filename '#{place}/#{name}/#{name}.#{definition.disk_format.downcase}' --size '#{definition.disk_size.to_i}' --format #{definition.disk_format.downcase}"
|
116
|
-
shell_exec("#{command}")
|
117
|
-
end
|
118
|
-
|
119
|
-
end
|
120
|
-
|
121
|
-
def attach_disk(definition)
|
122
|
-
|
123
|
-
place=get_vm_location
|
124
|
-
location=name+"."+definition.disk_format.downcase
|
125
|
-
|
126
|
-
location="#{place}/#{name}/"+location
|
127
|
-
env.ui.info "Attaching disk: #{location}"
|
128
|
-
|
129
|
-
#command => "${vboxcmd} storageattach '${vname}' --storagectl 'SATA Controller' --port 0 --device 0 --type hdd --medium '${vname}.vdi'",
|
130
|
-
command ="#{@vboxcmd} storageattach '#{name}' --storagectl 'SATA Controller' --port 0 --device 0 --type hdd --medium '#{location}'"
|
131
|
-
shell_exec("#{command}")
|
132
|
-
|
133
|
-
end
|
134
|
-
|
135
|
-
|
136
|
-
def attach_isofile(definition)
|
137
|
-
full_iso_file=File.join(env.config.veewee.iso_dir,definition.iso_file)
|
138
|
-
env.ui.info "Mounting cdrom: #{full_iso_file}"
|
139
|
-
#command => "${vboxcmd} storageattach '${vname}' --storagectl 'IDE Controller' --type dvddrive --port 1 --device 0 --medium '${isodst}' ";
|
140
|
-
command ="#{@vboxcmd} storageattach '#{name}' --storagectl 'IDE Controller' --type dvddrive --port 1 --device 0 --medium '#{full_iso_file}'"
|
141
|
-
shell_exec("#{command}")
|
142
|
-
end
|
143
|
-
|
144
|
-
|
145
|
-
def add_floppy_controller(definition)
|
146
|
-
# Create floppy controller
|
147
|
-
unless definition.floppy_files.nil?
|
148
|
-
|
149
|
-
command="#{@vboxcmd} storagectl '#{name}' --name 'Floppy Controller' --add floppy"
|
150
|
-
shell_exec("#{command}")
|
151
|
-
end
|
152
|
-
end
|
153
|
-
|
154
|
-
|
155
|
-
def attach_floppy(definition)
|
156
|
-
unless definition.floppy_files.nil?
|
157
|
-
|
158
|
-
# Attach floppy to machine (the vfd extension is crucial to detect msdos type floppy)
|
159
|
-
floppy_file=File.join(definition.path,"virtualfloppy.vfd")
|
160
|
-
command="#{@vboxcmd} storageattach '#{name}' --storagectl 'Floppy Controller' --port 0 --device 0 --type fdd --medium '#{floppy_file}'"
|
161
|
-
shell_exec("#{command}")
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
def vbox_os_type_id(veewee_type_id)
|
166
|
-
type=env.config.ostypes[veewee_type_id][:vbox]
|
167
|
-
env.logger.info("Using VBOX os_type_id #{type}")
|
168
|
-
return type
|
169
|
-
end
|
170
|
-
|
171
|
-
def create_vm(definition)
|
172
|
-
command="#{@vboxcmd} createvm --name '#{name}' --ostype '#{vbox_os_type_id(definition.os_type_id)}' --register"
|
173
|
-
|
174
|
-
#Exec and system stop the execution here
|
175
|
-
shell_exec("#{command}")
|
176
|
-
|
177
|
-
env.ui.info "Creating vm #{name} : #{definition.memory_size}M - #{definition.cpu_count} CPU - #{vbox_os_type_id(definition.os_type_id)}"
|
178
|
-
|
179
|
-
#setting cpu's
|
180
|
-
command="#{@vboxcmd} modifyvm '#{name}' --cpus #{definition.cpu_count}"
|
181
|
-
shell_exec("#{command}")
|
182
|
-
|
183
|
-
#setting memory size
|
184
|
-
command="#{@vboxcmd} modifyvm '#{name}' --memory #{definition.memory_size}"
|
185
|
-
shell_exec("#{command}")
|
186
|
-
|
187
|
-
#setting bootorder
|
188
|
-
command="#{@vboxcmd} modifyvm '#{name}' --boot1 disk --boot2 dvd --boot3 none --boot4 none"
|
189
|
-
shell_exec("#{command}")
|
190
|
-
|
191
|
-
# Modify the vm to enable or disable hw virtualization extensions
|
192
|
-
vm_flags=%w{pagefusion acpi ioapic pae hpet hwvirtex hwvirtexcl nestedpaging largepages vtxvpid synthxcpu rtcuseutc}
|
193
|
-
|
194
|
-
vm_flags.each do |vm_flag|
|
195
|
-
if definition.instance_variable_defined?("@#{vm_flag}")
|
196
|
-
vm_flag_value=definition.instance_variable_get("@#{vm_flag}")
|
197
|
-
env.ui.info "Setting VM Flag #{vm_flag} to #{vm_flag_value}"
|
198
|
-
command="#{@vboxcmd} modifyvm #{name} --#{vm_flag.to_s} #{vm_flag_value}"
|
199
|
-
shell_exec("#{command}")
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
|
-
|
204
|
-
raw.reload
|
205
|
-
|
206
|
-
end
|
207
|
-
end
|
208
|
-
end
|
209
|
-
end
|
210
|
-
end
|
@@ -1,79 +0,0 @@
|
|
1
|
-
module Veewee
|
2
|
-
module Builder
|
3
|
-
module Virtualbox
|
4
|
-
module BoxHelper
|
5
|
-
|
6
|
-
def destroy
|
7
|
-
|
8
|
-
if raw.nil?
|
9
|
-
env.ui.error "Error:: You tried to destroy a non-existing box '#{name}'"
|
10
|
-
exit -1
|
11
|
-
end
|
12
|
-
|
13
|
-
# If it has a save state,remove that first
|
14
|
-
if raw.saved?
|
15
|
-
env.ui.info "Removing save state"
|
16
|
-
raw.discard_state
|
17
|
-
raw.reload
|
18
|
-
end
|
19
|
-
|
20
|
-
env.logger.info "Checking state: #{raw.state}"
|
21
|
-
if raw.state.to_s=="running"
|
22
|
-
# Poweroff
|
23
|
-
raw.stop
|
24
|
-
# Wait for it to happen
|
25
|
-
sleep 2
|
26
|
-
end
|
27
|
-
#:destroy_medium => :delete, will delete machine + all media attachments
|
28
|
-
#vm.destroy(:destroy_medium => :delete)
|
29
|
-
##vm.destroy(:destroy_image => true)
|
30
|
-
|
31
|
-
#VBoxManage unregistervm "test-machine" --delete
|
32
|
-
#because the destroy does remove the .vbox file on 4.0.x
|
33
|
-
#PDB
|
34
|
-
#vm.destroy()
|
35
|
-
|
36
|
-
command="#{@vboxcmd} unregistervm '#{name}' --delete"
|
37
|
-
env.ui.info command
|
38
|
-
env.ui.info "Deleting vm #{name}"
|
39
|
-
|
40
|
-
#Exec and system stop the execution here
|
41
|
-
shell_exec("#{command}")
|
42
|
-
sleep 1
|
43
|
-
|
44
|
-
#if the disk was not attached when the machine was destroyed we also need to delete the disk
|
45
|
-
location=name+"."
|
46
|
-
#+definition.disk_format.downcase
|
47
|
-
found=false
|
48
|
-
VirtualBox::HardDrive.all.each do |d|
|
49
|
-
if d.location.match(/#{location}/)
|
50
|
-
|
51
|
-
if File.exists?(d.location)
|
52
|
-
command="#{@vboxcmd} closemedium disk '#{d.location}' --delete"
|
53
|
-
else
|
54
|
-
command="#{@vboxcmd} closemedium disk '#{d.location}'"
|
55
|
-
end
|
56
|
-
|
57
|
-
#command="#{@vboxcmd} closemedium disk '#{d.location}' --delete"
|
58
|
-
env.ui.info "Deleting disk #{d.location}"
|
59
|
-
env.ui.info "#{command}"
|
60
|
-
|
61
|
-
shell_exec("#{command}")
|
62
|
-
|
63
|
-
if File.exists?(d.location)
|
64
|
-
env.ui.info "We tried to delete the disk file via virtualbox '#{d.location} but failed"
|
65
|
-
env.ui.info "Removing it manually"
|
66
|
-
FileUtils.rm(d.location)
|
67
|
-
exit -1
|
68
|
-
end
|
69
|
-
#v.3
|
70
|
-
#d.destroy(true)
|
71
|
-
break
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
end #Module
|
77
|
-
end #Module
|
78
|
-
end #Module
|
79
|
-
end #Module
|
@@ -1,87 +0,0 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
module Veewee
|
3
|
-
module Builder
|
4
|
-
module Virtualbox
|
5
|
-
module BuilderHelper
|
6
|
-
|
7
|
-
# Shellutil.execute("vagrant package --base #{vmname} --include /tmp/Vagrantfile --output /tmp/#{vmname}.box", {:progress => "on"})
|
8
|
-
|
9
|
-
def export_vagrant(box_name,options)
|
10
|
-
definition=env.get_definition(box_name)
|
11
|
-
box=get_box(box_name)
|
12
|
-
|
13
|
-
#Check if box already exists
|
14
|
-
unless box.exists?
|
15
|
-
env.ui.info "#{name} is not found, maybe you need to build it first?"
|
16
|
-
exit
|
17
|
-
end
|
18
|
-
#We need to shutdown first
|
19
|
-
if box.raw.state==:running
|
20
|
-
env.ui.info "Vagrant requires the box to be shutdown, before it can export"
|
21
|
-
env.ui.info "Sudo also needs to work for user #{definition.ssh_user}"
|
22
|
-
env.ui.info "Performing a clean shutdown now."
|
23
|
-
|
24
|
-
ssh_exec("localhost","sudo #{definition.shutdown_cmd}",ssh_options(definition))
|
25
|
-
|
26
|
-
#Wait for state poweroff
|
27
|
-
while (box.raw.state==:running) do
|
28
|
-
env.ui.info ".",{:new_line => false}
|
29
|
-
sleep 1
|
30
|
-
end
|
31
|
-
env.ui.info ""
|
32
|
-
env.ui.info "Machine #{name} is powered off cleanly"
|
33
|
-
end
|
34
|
-
|
35
|
-
#Vagrant requires a relative path for output of boxes
|
36
|
-
|
37
|
-
#4.0.x. not using boxes as a subdir
|
38
|
-
boxdir=Pathname.new(Dir.pwd)
|
39
|
-
|
40
|
-
full_path=File.join(boxdir,box.name+".box")
|
41
|
-
path1=Pathname.new(full_path)
|
42
|
-
path2=Pathname.new(Dir.pwd)
|
43
|
-
box_path=path1.relative_path_from(path2).to_s
|
44
|
-
|
45
|
-
if File.exists?("#{box_path}")
|
46
|
-
env.ui.info "box #{name}.box already exists"
|
47
|
-
exit
|
48
|
-
end
|
49
|
-
|
50
|
-
env.ui.info "Excuting vagrant voodoo:"
|
51
|
-
export_command="vagrant package --base '#{box_name}' --output '#{box_path}'"
|
52
|
-
env.ui.info "#{export_command}"
|
53
|
-
shell_exec("#{export_command}") #hmm, needs to get the gem_home set?
|
54
|
-
env.ui.info ""
|
55
|
-
|
56
|
-
#add_ssh_nat_mapping back!!!!
|
57
|
-
#vagrant removes the mapping
|
58
|
-
#we need to restore it in order to be able to login again
|
59
|
-
box.add_ssh_nat_mapping(definition)
|
60
|
-
|
61
|
-
env.ui.info "To import it into vagrant type:"
|
62
|
-
env.ui.info "vagrant box add '#{box_name}' '#{box_path}'"
|
63
|
-
env.ui.info ""
|
64
|
-
env.ui.info "To use it:"
|
65
|
-
env.ui.info "vagrant init '#{box_name}'"
|
66
|
-
env.ui.info "vagrant up"
|
67
|
-
env.ui.info "vagrant ssh"
|
68
|
-
end
|
69
|
-
|
70
|
-
end #Module
|
71
|
-
end #Module
|
72
|
-
end #Module
|
73
|
-
end #Module
|
74
|
-
|
75
|
-
|
76
|
-
# #currently vagrant has a problem with the machine up, it calculates the wrong port to ssh to poweroff the system
|
77
|
-
# thebox.execute("shutdown -h now")
|
78
|
-
# thebox.wait_for_state("poweroff")
|
79
|
-
|
80
|
-
# Shellutil.execute("echo 'Vagrant::Config.run do |config|' > /tmp/Vagrantfile")
|
81
|
-
# Shellutil.execute("echo ' config.ssh.forwarded_port_key = \"ssh\"' >> /tmp/Vagrantfile")
|
82
|
-
# Shellutil.execute("echo ' config.raw.forward_port(\"ssh\",22,#{host_port})' >> /tmp/Vagrantfile")
|
83
|
-
# Shellutil.execute("echo 'end' >> /tmp/Vagrantfile")
|
84
|
-
|
85
|
-
|
86
|
-
#vagrant export disables the machine
|
87
|
-
# thebox.ssh_enable_vmachine({:hostport => host_port , :guestport => 22} )
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module Veewee
|
2
|
-
module Builder
|
3
|
-
module Virtualbox
|
4
|
-
module BuilderHelper
|
5
|
-
|
6
|
-
def validate_vagrant(box_name,options)
|
7
|
-
require 'cucumber'
|
8
|
-
|
9
|
-
require 'cucumber/rspec/disable_option_parser'
|
10
|
-
require 'cucumber/cli/main'
|
11
|
-
|
12
|
-
ENV['veewee_user']=options[:user]
|
13
|
-
feature_path=File.join(File.dirname(__FILE__),"..","..","..","..","..","validation","vagrant.feature")
|
14
|
-
|
15
|
-
features=Array.new
|
16
|
-
features[0]=feature_path
|
17
|
-
|
18
|
-
begin
|
19
|
-
# The dup is to keep ARGV intact, so that tools like ruby-debug can respawn.
|
20
|
-
failure = Cucumber::Cli::Main.execute(features.dup)
|
21
|
-
Kernel.exit(failure ? 1 : 0)
|
22
|
-
rescue SystemExit => e
|
23
|
-
Kernel.exit(e.status)
|
24
|
-
rescue Exception => e
|
25
|
-
env.ui.error("#{e.message} (#{e.class})")
|
26
|
-
env.ui.error(e.backtrace.join("\n"))
|
27
|
-
Kernel.exit(1)
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
end #Module
|
32
|
-
|
33
|
-
end #Module
|
34
|
-
end #Module
|
35
|
-
end #Module
|