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
data/lib/veewee/command.rb
CHANGED
data/lib/veewee/command/kvm.rb
CHANGED
@@ -2,25 +2,54 @@ module Veewee
|
|
2
2
|
module Command
|
3
3
|
class Kvm< Veewee::Command::GroupBase
|
4
4
|
|
5
|
-
register "kvm", "Subcommand for
|
6
|
-
desc "build [
|
5
|
+
register "kvm", "Subcommand for KVM"
|
6
|
+
desc "build [BOX_NAME]", "Build box"
|
7
7
|
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the build"
|
8
8
|
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
9
9
|
method_option :nogui,:type => :boolean , :default => false, :aliases => "-n", :desc => "no gui"
|
10
10
|
method_option :auto,:type => :boolean , :default => false, :aliases => "-a", :desc => "auto answers"
|
11
|
-
method_option :postinstall_include, :type => :array, :default => [], :aliases => "-i", :desc => "
|
12
|
-
method_option :postinstall_exclude, :type => :array, :default => [], :aliases => "-e", :desc => "
|
13
|
-
def build(
|
11
|
+
method_option :postinstall_include, :type => :array, :default => [], :aliases => "-i", :desc => "ruby regexp of postinstall filenames to additionally include"
|
12
|
+
method_option :postinstall_exclude, :type => :array, :default => [], :aliases => "-e", :desc => "ruby regexp of postinstall filenames to exclude"
|
13
|
+
def build(box_name)
|
14
14
|
venv=Veewee::Environment.new(options)
|
15
15
|
venv.ui=env.ui
|
16
|
-
venv.
|
16
|
+
venv.providers["kvm"].get_box(box_name).build(options)
|
17
17
|
end
|
18
18
|
|
19
|
-
|
19
|
+
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the destroy"
|
20
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
21
|
+
method_option :nogui,:type => :boolean , :default => false, :aliases => "-n", :desc => "no gui"
|
22
|
+
desc "destroy [BOXNAME]", "Destroys the virtualmachine that was built"
|
20
23
|
def destroy(box_name)
|
21
24
|
venv=Veewee::Environment.new(options)
|
22
25
|
venv.ui=env.ui
|
23
|
-
venv.
|
26
|
+
venv.providers["kvm"].get_box(box_name).destroy(options)
|
27
|
+
end
|
28
|
+
|
29
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
30
|
+
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the shutdown"
|
31
|
+
desc "halt [BOXNAME]", "Activates a shutdown the virtualmachine"
|
32
|
+
def halt(box_name)
|
33
|
+
venv=Veewee::Environment.new(options)
|
34
|
+
venv.ui=env.ui
|
35
|
+
venv.providers["kvm"].get_box(box_name).halt(options)
|
36
|
+
end
|
37
|
+
|
38
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
39
|
+
method_option :nogui,:type => :boolean , :default => false, :aliases => "-n", :desc => "no gui"
|
40
|
+
desc "up [BOXNAME]", "Starts a Box"
|
41
|
+
def up(box_name)
|
42
|
+
venv=Veewee::Environment.new(options)
|
43
|
+
venv.ui=env.ui
|
44
|
+
venv.providers["kvm"].get_box(box_name).up(options)
|
45
|
+
end
|
46
|
+
|
47
|
+
desc "ssh [BOXNAME] [COMMAND]", "SSH to box"
|
48
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
49
|
+
def ssh(box_name,command=nil)
|
50
|
+
venv=Veewee::Environment.new(options)
|
51
|
+
venv.ui=env.ui
|
52
|
+
venv.providers["kvm"].get_box(box_name).issh(command)
|
24
53
|
end
|
25
54
|
|
26
55
|
desc "define [BOXNAME] [TEMPLATE]", "Define a new basebox starting from a template"
|
@@ -29,10 +58,10 @@ module Veewee
|
|
29
58
|
def define(definition_name, template_name)
|
30
59
|
venv=Veewee::Environment.new(options)
|
31
60
|
venv.ui=env.ui
|
32
|
-
venv.define(definition_name,template_name,options)
|
61
|
+
venv.definitions.define(definition_name,template_name,options)
|
33
62
|
env.ui.info "The basebox '#{definition_name}' has been succesfully created from the template '#{template_name}'"
|
34
63
|
env.ui.info "You can now edit the definition files stored in definitions/#{definition_name} or build the box with:"
|
35
|
-
env.ui.info "veewee
|
64
|
+
env.ui.info "veewee kvm build '#{definition_name}'"
|
36
65
|
end
|
37
66
|
|
38
67
|
desc "undefine [BOXNAME]", "Removes the definition of a basebox "
|
@@ -43,19 +72,29 @@ module Veewee
|
|
43
72
|
venv=Veewee::Environment.new(options)
|
44
73
|
venv.ui=env.ui
|
45
74
|
venv.undefine(definition_name,options)
|
46
|
-
venv.
|
75
|
+
venv.definitions.undefine(definition_name,options)
|
47
76
|
rescue Error => ex
|
48
77
|
env.ui.error "#{ex}"
|
49
78
|
exit -1
|
50
79
|
end
|
51
80
|
end
|
52
81
|
|
82
|
+
desc "validate [NAME]", "Validates a box against kvm compliancy rules"
|
83
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
84
|
+
def validate(box_name)
|
85
|
+
venv=Veewee::Environment.new(options)
|
86
|
+
venv.ui=env.ui
|
87
|
+
venv.providers["kvm"].get_box(box_name).validate_kvm(options)
|
88
|
+
end
|
89
|
+
|
53
90
|
desc "ostypes", "List the available Operating System types"
|
54
91
|
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
55
92
|
def ostypes
|
56
93
|
venv=Veewee::Environment.new(options)
|
57
94
|
venv.ui=env.ui
|
58
|
-
venv.
|
95
|
+
venv.ostypes.each do |name|
|
96
|
+
env.ui.info "- #{name}"
|
97
|
+
end
|
59
98
|
end
|
60
99
|
|
61
100
|
desc "templates", "List the currently available templates"
|
@@ -64,8 +103,8 @@ module Veewee
|
|
64
103
|
env.ui.info "The following templates are available:"
|
65
104
|
venv=Veewee::Environment.new(options)
|
66
105
|
venv.ui=env.ui
|
67
|
-
venv.
|
68
|
-
env.ui.info "veewee
|
106
|
+
venv.templates.each do |name,template|
|
107
|
+
env.ui.info "veewee kvm define '<box_name>' '#{name}'",:prefix => false
|
69
108
|
end
|
70
109
|
end
|
71
110
|
|
@@ -75,7 +114,8 @@ module Veewee
|
|
75
114
|
env.ui.info "The following local definitions are available:"
|
76
115
|
venv=Veewee::Environment.new(options)
|
77
116
|
venv.ui=env.ui
|
78
|
-
venv.
|
117
|
+
venv.ui=env.ui
|
118
|
+
venv.definitions.each do |name,definition|
|
79
119
|
env.ui.info "- #{name}"
|
80
120
|
end
|
81
121
|
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
module Veewee
|
2
|
+
module Command
|
3
|
+
class Parallels< Veewee::Command::GroupBase
|
4
|
+
|
5
|
+
register "parallels", "Subcommand for Parallels"
|
6
|
+
desc "build [BOX_NAME]", "Build box"
|
7
|
+
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the build"
|
8
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
9
|
+
method_option :auto,:type => :boolean , :default => false, :aliases => "-a", :desc => "auto answers"
|
10
|
+
method_option :postinstall_include, :type => :array, :default => [], :aliases => "-i", :desc => "ruby regexp of postinstall filenames to additionally include"
|
11
|
+
method_option :postinstall_exclude, :type => :array, :default => [], :aliases => "-e", :desc => "ruby regexp of postinstall filenames to exclude"
|
12
|
+
def build(box_name)
|
13
|
+
venv=Veewee::Environment.new(options)
|
14
|
+
venv.ui=env.ui
|
15
|
+
venv.providers["parallels"].get_box(box_name).build(options)
|
16
|
+
end
|
17
|
+
|
18
|
+
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the destroy"
|
19
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
20
|
+
desc "destroy [BOXNAME]", "Destroys the virtualmachine that was built"
|
21
|
+
def destroy(box_name)
|
22
|
+
venv=Veewee::Environment.new(options)
|
23
|
+
venv.ui=env.ui
|
24
|
+
venv.providers["parallels"].get_box(box_name).destroy(options)
|
25
|
+
end
|
26
|
+
|
27
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
28
|
+
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the shutdown"
|
29
|
+
desc "halt [BOXNAME]", "Activates a shutdown the virtualmachine"
|
30
|
+
def halt(box_name)
|
31
|
+
venv=Veewee::Environment.new(options)
|
32
|
+
venv.ui=env.ui
|
33
|
+
venv.providers["parallels"].get_box(box_name).halt(options)
|
34
|
+
end
|
35
|
+
|
36
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
37
|
+
method_option :nogui,:type => :boolean , :default => false, :aliases => "-n", :desc => "no gui"
|
38
|
+
desc "up [BOXNAME]", "Starts a Box"
|
39
|
+
def up(box_name)
|
40
|
+
venv=Veewee::Environment.new(options)
|
41
|
+
venv.ui=env.ui
|
42
|
+
venv.providers["parallels"].get_box(box_name).up(options)
|
43
|
+
end
|
44
|
+
|
45
|
+
desc "ssh [BOXNAME] [COMMAND]", "SSH to box"
|
46
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
47
|
+
def ssh(box_name,command=nil)
|
48
|
+
venv=Veewee::Environment.new(options)
|
49
|
+
venv.ui=env.ui
|
50
|
+
venv.providers["parallels"].get_box(box_name).issh(command)
|
51
|
+
end
|
52
|
+
|
53
|
+
desc "define [BOXNAME] [TEMPLATE]", "Define a new basebox starting from a template"
|
54
|
+
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "overwrite the definition"
|
55
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
56
|
+
def define(definition_name, template_name)
|
57
|
+
venv=Veewee::Environment.new(options)
|
58
|
+
venv.ui=env.ui
|
59
|
+
venv.definitions.define(definition_name,template_name,options)
|
60
|
+
env.ui.info "The basebox '#{definition_name}' has been succesfully created from the template '#{template_name}'"
|
61
|
+
env.ui.info "You can now edit the definition files stored in definitions/#{definition_name} or build the box with:"
|
62
|
+
env.ui.info "veewee parallels build '#{definition_name}'"
|
63
|
+
end
|
64
|
+
|
65
|
+
desc "undefine [BOXNAME]", "Removes the definition of a basebox "
|
66
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
67
|
+
def undefine(definition_name)
|
68
|
+
env.ui.info "Removing definition #{definition_name}" , :prefix => false
|
69
|
+
begin
|
70
|
+
venv=Veewee::Environment.new(options)
|
71
|
+
venv.ui=env.ui
|
72
|
+
venv.definitions.undefine(definition_name,options)
|
73
|
+
env.ui.info "Definition #{definition_name} succesfully removed",:prefix => false
|
74
|
+
rescue Error => ex
|
75
|
+
env.ui.error "#{ex}" , :prefix => false
|
76
|
+
exit -1
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
desc "validate [NAME]", "Validates a box against parallels compliancy rules"
|
81
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
82
|
+
def validate(box_name)
|
83
|
+
venv=Veewee::Environment.new(options)
|
84
|
+
venv.ui=env.ui
|
85
|
+
venv.providers["parallels"].get_box(box_name).validate_parallels(options)
|
86
|
+
end
|
87
|
+
|
88
|
+
desc "ostypes", "List the available Operating System types"
|
89
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
90
|
+
def ostypes
|
91
|
+
venv=Veewee::Environment.new(options)
|
92
|
+
venv.ui=env.ui
|
93
|
+
venv.ostypes.each do |name|
|
94
|
+
env.ui.info "- #{name}"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
desc "templates", "List the currently available templates"
|
99
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
100
|
+
def templates
|
101
|
+
env.ui.info "The following templates are available:",:prefix => false
|
102
|
+
venv=Veewee::Environment.new(options)
|
103
|
+
venv.ui=env.ui
|
104
|
+
venv.templates.each do |name,template|
|
105
|
+
env.ui.info "veewee parallels define '<box_name>' '#{name}'",:prefix => false
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
desc "list", "Lists all defined boxes"
|
110
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
111
|
+
def list
|
112
|
+
env.ui.info "The following local definitions are available:",:prefix => false
|
113
|
+
venv=Veewee::Environment.new(options)
|
114
|
+
venv.ui=env.ui
|
115
|
+
venv.definitions.each do |name,definition|
|
116
|
+
env.ui.info "- #{name}"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
end
|
122
|
+
|
123
|
+
end
|
124
|
+
end
|
@@ -1,108 +1,4 @@
|
|
1
1
|
require 'veewee'
|
2
|
+
require 'veewee/command/vagrant/basebox'
|
2
3
|
|
3
|
-
|
4
|
-
module Vagrant
|
5
|
-
class Command < ::Vagrant::Command::GroupBase
|
6
|
-
|
7
|
-
register "basebox", "Commands to manage baseboxes"
|
8
|
-
desc "build [TEMPLATE_NAME] [BOX_NAME]", "Build box"
|
9
|
-
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the build"
|
10
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
11
|
-
method_option :nogui,:type => :boolean , :default => false, :aliases => "-n", :desc => "no gui"
|
12
|
-
method_option :auto,:type => :boolean , :default => false, :aliases => "-a", :desc => "auto answers"
|
13
|
-
method_option :postinstall_include, :type => :array, :default => [], :aliases => "-i", :desc => "patterns of postinstall filenames to additionally include"
|
14
|
-
method_option :postinstall_exclude, :type => :array, :default => [], :aliases => "-e", :desc => "patterns of postinstall filenames to exclude"
|
15
|
-
def build(definition_name,box_name=nil)
|
16
|
-
venv=Veewee::Environment.new(options)
|
17
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
18
|
-
venv.config.builders["virtualbox"].build(definition_name,box_name,options)
|
19
|
-
end
|
20
|
-
|
21
|
-
desc "destroy [BOXNAME]", "Destroys the virtualmachine that was build"
|
22
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
23
|
-
def destroy(box_name)
|
24
|
-
venv=Veewee::Environment.new(options)
|
25
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
26
|
-
venv.config.builders["virtualbox"].get_box(box_name).destroy
|
27
|
-
end
|
28
|
-
|
29
|
-
desc "define [BOXNAME] [TEMPLATE]", "Define a new basebox starting from a template"
|
30
|
-
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "overwrite the definition"
|
31
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
32
|
-
def define(definition_name, template_name)
|
33
|
-
venv=Veewee::Environment.new(options)
|
34
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
35
|
-
|
36
|
-
venv.define(definition_name,template_name,options)
|
37
|
-
venv.ui.info "The basebox '#{definition_name}' has been succesfully created from the template '#{template_name}'"
|
38
|
-
venv.ui.info "You can now edit the definition files stored in definitions/#{definition_name} or build the box with:"
|
39
|
-
venv.ui.info "vagrant basebox build '#{definition_name}'"
|
40
|
-
end
|
41
|
-
|
42
|
-
desc "undefine [BOXNAME]", "Removes the definition of a basebox "
|
43
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
44
|
-
def undefine(definition_name)
|
45
|
-
venv=Veewee::Environment.new(options)
|
46
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
47
|
-
begin
|
48
|
-
venv.ui.info "Removing definition #{definition_name}"
|
49
|
-
venv.undefine(definition_name,options)
|
50
|
-
venv.ui.info "Definition #{definition_name} succesfully removed"
|
51
|
-
rescue Error => ex
|
52
|
-
venv.ui.error"#{ex}"
|
53
|
-
exit -1
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
desc "templates", "List the currently available templates"
|
58
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
59
|
-
def templates
|
60
|
-
venv=Veewee::Environment.new(options)
|
61
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
62
|
-
venv.ui.info "The following templates are available:"
|
63
|
-
|
64
|
-
venv.get_template_paths.keys.each do |name|
|
65
|
-
venv.ui.info "vagrant basebox define '<box_name>' '#{name}'"
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
desc "list", "Lists all defined boxes"
|
70
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
71
|
-
def list
|
72
|
-
venv=Veewee::Environment.new(options)
|
73
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
74
|
-
venv.ui.info "The following local definitions are available:"
|
75
|
-
|
76
|
-
venv.get_definition_paths.keys.each do |name|
|
77
|
-
venv.ui.info "- #{name}"
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
desc "ostypes", "List the available Operating System types"
|
82
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
83
|
-
def ostypes
|
84
|
-
venv=Veewee::Environment.new(options)
|
85
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
86
|
-
venv.list_ostypes
|
87
|
-
end
|
88
|
-
|
89
|
-
desc "validate [NAME]", "Validates a box against vagrant compliancy rules"
|
90
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
91
|
-
def validate(box_name)
|
92
|
-
venv=Veewee::Environment.new(options)
|
93
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
94
|
-
|
95
|
-
venv.config.builders["virtualbox"].validate_vagrant(box_name,options)
|
96
|
-
end
|
97
|
-
|
98
|
-
desc "export [NAME]", "Exports the basebox to the vagrant box format"
|
99
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
100
|
-
def export(box_name)
|
101
|
-
venv=Veewee::Environment.new(options)
|
102
|
-
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
103
|
-
venv.config.builders["virtualbox"].export_vagrant(box_name,options)
|
104
|
-
end
|
105
|
-
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
4
|
+
Vagrant.commands.register(:basebox) { Veewee::Command::Vagrant::Basebox }
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'veewee'
|
2
|
+
require 'optparse'
|
3
|
+
require 'veewee/command/vagrant/ostypes'
|
4
|
+
require 'veewee/command/vagrant/templates'
|
5
|
+
require 'veewee/command/vagrant/list'
|
6
|
+
require 'veewee/command/vagrant/build'
|
7
|
+
require 'veewee/command/vagrant/destroy'
|
8
|
+
require 'veewee/command/vagrant/up'
|
9
|
+
require 'veewee/command/vagrant/halt'
|
10
|
+
require 'veewee/command/vagrant/ssh'
|
11
|
+
require 'veewee/command/vagrant/define'
|
12
|
+
require 'veewee/command/vagrant/undefine'
|
13
|
+
require 'veewee/command/vagrant/export'
|
14
|
+
|
15
|
+
|
16
|
+
module Veewee
|
17
|
+
module Command
|
18
|
+
module Vagrant
|
19
|
+
class Basebox < ::Vagrant::Command::Base
|
20
|
+
def initialize(argv,env)
|
21
|
+
super
|
22
|
+
|
23
|
+
@main_args, @sub_command, @sub_args = split_main_and_subcommand(argv)
|
24
|
+
|
25
|
+
@subcommands = ::Vagrant::Registry.new
|
26
|
+
@subcommands.register(:ostypes) { Veewee::Command::Vagrant::Ostypes }
|
27
|
+
@subcommands.register(:templates) { Veewee::Command::Vagrant::Templates }
|
28
|
+
@subcommands.register(:list) { Veewee::Command::Vagrant::List }
|
29
|
+
@subcommands.register(:build) { Veewee::Command::Vagrant::Build }
|
30
|
+
@subcommands.register(:destroy) { Veewee::Command::Vagrant::Destroy }
|
31
|
+
@subcommands.register(:up) { Veewee::Command::Vagrant::Up }
|
32
|
+
@subcommands.register(:halt) { Veewee::Command::Vagrant::Halt }
|
33
|
+
@subcommands.register(:ssh) { Veewee::Command::Vagrant::Ssh }
|
34
|
+
@subcommands.register(:define) { Veewee::Command::Vagrant::Define }
|
35
|
+
@subcommands.register(:undefine) { Veewee::Command::Vagrant::Undefine }
|
36
|
+
@subcommands.register(:export) { Veewee::Command::Vagrant::Export }
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
def execute
|
42
|
+
if @main_args.include?("-h") || @main_args.include?("--help")
|
43
|
+
# Print the help for all the box commands.
|
44
|
+
return help
|
45
|
+
end
|
46
|
+
|
47
|
+
# If we reached this far then we must have a subcommand. If not,
|
48
|
+
# then we also just print the help and exit.
|
49
|
+
command_class = @subcommands.get(@sub_command.to_sym) if @sub_command
|
50
|
+
return help if !command_class || !@sub_command
|
51
|
+
@logger.debug("Invoking command class: #{command_class} #{@sub_args.inspect}")
|
52
|
+
|
53
|
+
# Initialize and execute the command class
|
54
|
+
command_class.new(@sub_args, @env).execute
|
55
|
+
end
|
56
|
+
|
57
|
+
# Prints the help out for this command
|
58
|
+
def help
|
59
|
+
opts = OptionParser.new do |opts|
|
60
|
+
opts.banner = "Usage: vagrant basebox <command> [<args>]"
|
61
|
+
opts.separator ""
|
62
|
+
opts.separator "Available subcommands:"
|
63
|
+
|
64
|
+
# Add the available subcommands as separators in order to print them
|
65
|
+
# out as well.
|
66
|
+
keys = []
|
67
|
+
@subcommands.each { |key, value| keys << key.to_s }
|
68
|
+
|
69
|
+
keys.sort.each do |key|
|
70
|
+
opts.separator " #{key}"
|
71
|
+
end
|
72
|
+
|
73
|
+
opts.separator ""
|
74
|
+
opts.separator "For help on any individual command run `vagrant basebox COMMAND -h`"
|
75
|
+
end
|
76
|
+
|
77
|
+
@env.ui.info(opts.help, :prefix => false)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|