veewee 0.3.0.alpha8 → 0.3.0.alpha9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. data/Gemfile +5 -0
  2. data/Rakefile +41 -1
  3. data/bin/veewee +1 -1
  4. data/doc/kvm.md +9 -1
  5. data/doc/vagrant.md +5 -5
  6. data/lib/veewee/command/vagrant/basebox.rb +2 -0
  7. data/lib/veewee/command/vagrant/build.rb +3 -0
  8. data/lib/veewee/command/vagrant/export.rb +10 -0
  9. data/lib/veewee/command/vagrant/screenshot.rb +45 -0
  10. data/lib/veewee/command/virtualbox.rb +13 -0
  11. data/lib/veewee/config.rb +2 -2
  12. data/lib/veewee/provider/core/box/build.rb +29 -16
  13. data/lib/veewee/provider/core/box/exec.rb +4 -4
  14. data/lib/veewee/provider/core/box/floppy.rb +1 -1
  15. data/lib/veewee/provider/core/helper/iso.rb +14 -10
  16. data/lib/veewee/provider/core/helper/ssh.rb +6 -5
  17. data/lib/veewee/provider/core/helper/tcp.rb +5 -3
  18. data/lib/veewee/provider/kvm/box/destroy.rb +1 -1
  19. data/lib/veewee/provider/parallels/box/destroy.rb +1 -2
  20. data/lib/veewee/provider/virtualbox/box.rb +1 -0
  21. data/lib/veewee/provider/virtualbox/box/build.rb +1 -1
  22. data/lib/veewee/provider/virtualbox/box/destroy.rb +1 -3
  23. data/lib/veewee/provider/virtualbox/box/export_vagrant.rb +3 -2
  24. data/lib/veewee/provider/virtualbox/box/helper/console_type.rb +5 -5
  25. data/lib/veewee/provider/virtualbox/box/helper/natinterface.rb +1 -1
  26. data/lib/veewee/provider/virtualbox/box/screenshot.rb +24 -0
  27. data/lib/veewee/provider/virtualbox/box/up.rb +2 -3
  28. data/lib/veewee/provider/vmfusion/box/destroy.rb +1 -2
  29. data/lib/veewee/provider/vmfusion/box/helper/vnc.rb +1 -1
  30. data/lib/veewee/templates.rb +1 -1
  31. data/lib/veewee/version.rb +1 -1
  32. data/templates/CentOS-4.8-i386/definition.rb +1 -1
  33. data/templates/CentOS-5.5-i386-netboot/definition.rb +1 -1
  34. data/templates/CentOS-5.5-x86_64-netboot/definition.rb +1 -1
  35. data/templates/CentOS-5.7-i386-netboot/definition.rb +1 -1
  36. data/templates/CentOS-5.7-i386-netboot/ks.cfg +2 -0
  37. data/templates/CentOS-5.7-x86_64-netboot/definition.rb +1 -1
  38. data/templates/CentOS-5.7-x86_64-netboot/ks.cfg +3 -1
  39. data/templates/CentOS-5.8-i386-netboot/definition.rb +16 -0
  40. data/templates/CentOS-5.8-i386-netboot/ks.cfg +47 -0
  41. data/templates/CentOS-5.8-i386-netboot/postinstall.sh +53 -0
  42. data/templates/CentOS-5.8-i386/definition.rb +16 -0
  43. data/templates/CentOS-5.8-i386/ks.cfg +47 -0
  44. data/templates/CentOS-5.8-i386/postinstall.sh +53 -0
  45. data/templates/CentOS-5.8-x86_64-netboot/definition.rb +16 -0
  46. data/templates/CentOS-5.8-x86_64-netboot/ks.cfg +47 -0
  47. data/templates/CentOS-5.8-x86_64-netboot/postinstall.sh +53 -0
  48. data/templates/CentOS-5.8-x86_64/definition.rb +16 -0
  49. data/templates/CentOS-5.8-x86_64/ks.cfg +47 -0
  50. data/templates/CentOS-5.8-x86_64/postinstall.sh +60 -0
  51. data/templates/Debian-6.0.4-i386-netboot/ruby.sh +1 -1
  52. data/templates/Fedora-16-i386/definition.rb +1 -1
  53. data/templates/Fedora-16-x86_64/definition.rb +1 -1
  54. data/templates/archlinux-x86_64/definition.rb +1 -1
  55. data/templates/ubuntu-11.04-server-amd64/ruby.sh +4 -4
  56. data/templates/ubuntu-11.04-server-i386/postinstall.sh +12 -12
  57. data/templates/ubuntu-12.04-server-amd64-packages/definition.rb +3 -3
  58. data/templates/ubuntu-12.04-server-amd64/definition.rb +3 -3
  59. data/templates/ubuntu-12.04-server-i386/definition.rb +37 -0
  60. data/templates/ubuntu-12.04-server-i386/postinstall.sh +93 -0
  61. data/templates/ubuntu-12.04-server-i386/preseed.cfg +87 -0
  62. data/templates/windows-2008R2-amd64/definition.rb +1 -1
  63. metadata +20 -3
@@ -0,0 +1,93 @@
1
+ # postinstall.sh created from Mitchell's official lucid32/64 baseboxes
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+
6
+ # Apt-install various things necessary for Ruby, guest additions,
7
+ # etc., and remove optional things to trim down the machine.
8
+ apt-get -y update
9
+ apt-get -y upgrade
10
+ apt-get -y install linux-headers-$(uname -r) build-essential
11
+ apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev
12
+ apt-get -y install vim
13
+ apt-get clean
14
+
15
+ # Installing the virtualbox guest additions
16
+ apt-get -y install dkms
17
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
18
+ cd /tmp
19
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
20
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
21
+ sh /mnt/VBoxLinuxAdditions.run
22
+ umount /mnt
23
+
24
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
25
+
26
+ # Setup sudo to allow no-password sudo for "admin"
27
+ groupadd -r admin
28
+ usermod -a -G admin vagrant
29
+ cp /etc/sudoers /etc/sudoers.orig
30
+ sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
31
+ sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
32
+
33
+ # Install NFS client
34
+ apt-get -y install nfs-common
35
+
36
+ # Install Ruby from source in /opt so that users of Vagrant
37
+ # can install their own Rubies using packages or however.
38
+ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
39
+ tar xvzf ruby-1.9.2-p290.tar.gz
40
+ cd ruby-1.9.2-p290
41
+ ./configure --prefix=/opt/ruby
42
+ make
43
+ make install
44
+ cd ..
45
+ rm -rf ruby-1.9.2-p290
46
+
47
+ # Install RubyGems 1.7.2
48
+ wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.11.tgz
49
+ tar xzf rubygems-1.8.11.tgz
50
+ cd rubygems-1.8.11
51
+ /opt/ruby/bin/ruby setup.rb
52
+ cd ..
53
+ rm -rf rubygems-1.8.11
54
+
55
+ # Installing chef & Puppet
56
+ /opt/ruby/bin/gem install chef --no-ri --no-rdoc
57
+ /opt/ruby/bin/gem install puppet --no-ri --no-rdoc
58
+
59
+ # Add /opt/ruby/bin to the global path as the last resort so
60
+ # Ruby, RubyGems, and Chef/Puppet are visible
61
+ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
62
+
63
+ # Installing vagrant keys
64
+ mkdir /home/vagrant/.ssh
65
+ chmod 700 /home/vagrant/.ssh
66
+ cd /home/vagrant/.ssh
67
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
68
+ chmod 600 /home/vagrant/.ssh/authorized_keys
69
+ chown -R vagrant /home/vagrant/.ssh
70
+
71
+ # Remove items used for building, since they aren't needed anymore
72
+ apt-get -y remove linux-headers-$(uname -r) build-essential
73
+ apt-get -y autoremove
74
+
75
+ # Zero out the free space to save space in the final image:
76
+ dd if=/dev/zero of=/EMPTY bs=1M
77
+ rm -f /EMPTY
78
+
79
+ # Removing leftover leases and persistent rules
80
+ echo "cleaning up dhcp leases"
81
+ rm /var/lib/dhcp3/*
82
+
83
+ # Make sure Udev doesn't block our network
84
+ # http://6.ptmc.org/?p=164
85
+ echo "cleaning up udev rules"
86
+ rm /etc/udev/rules.d/70-persistent-net.rules
87
+ mkdir /etc/udev/rules.d/70-persistent-net.rules
88
+ rm -rf /dev/.udev/
89
+ rm /lib/udev/rules.d/75-persistent-net-generator.rules
90
+
91
+ echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
92
+ echo "pre-up sleep 2" >> /etc/network/interfaces
93
+ exit
@@ -0,0 +1,87 @@
1
+ ## Options to set on the command line
2
+ d-i debian-installer/locale string en_US.utf8
3
+ d-i console-setup/ask_detect boolean false
4
+ d-i console-setup/layout string USA
5
+
6
+ #d-i netcfg/get_hostname string dummy
7
+ d-i netcfg/get_hostname string unassigned-hostname
8
+ d-i netcfg/get_domain string unassigned-domain
9
+
10
+ # Continue without a default route
11
+ # Not working , specify a dummy in the DHCP
12
+ #d-i netcfg/no_default_route boolean
13
+
14
+ d-i time/zone string UTC
15
+ d-i clock-setup/utc-auto boolean true
16
+ d-i clock-setup/utc boolean true
17
+
18
+ d-i kbd-chooser/method select American English
19
+
20
+ d-i netcfg/wireless_wep string
21
+
22
+ d-i base-installer/kernel/override-image string linux-server
23
+ #d-i base-installer/kernel/override-image string linux-image-2.6.32-21-generic
24
+
25
+ # Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive
26
+ d-i debconf debconf/frontend select Noninteractive
27
+
28
+ d-i pkgsel/install-language-support boolean false
29
+ tasksel tasksel/first multiselect standard, ubuntu-server
30
+
31
+ #d-i partman-auto/method string regular
32
+ d-i partman-auto/method string lvm
33
+ #d-i partman-auto/purge_lvm_from_device boolean true
34
+
35
+ d-i partman-lvm/confirm boolean true
36
+ d-i partman-lvm/device_remove_lvm boolean true
37
+ d-i partman-auto/choose_recipe select atomic
38
+
39
+ d-i partman/confirm_write_new_label boolean true
40
+ d-i partman/confirm_nooverwrite boolean true
41
+ d-i partman/choose_partition select finish
42
+ d-i partman/confirm boolean true
43
+
44
+ #http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9626883
45
+ #Message: "write the changes to disk and configure lvm preseed"
46
+ #http://serverfault.com/questions/189328/ubuntu-kickstart-installation-using-lvm-waits-for-input
47
+ #preseed partman-lvm/confirm_nooverwrite boolean true
48
+
49
+ # Write the changes to disks and configure LVM?
50
+ d-i partman-lvm/confirm boolean true
51
+ d-i partman-lvm/confirm_nooverwrite boolean true
52
+ d-i partman-auto-lvm/guided_size string max
53
+
54
+ ## Default user, we can get away with a recipe to change this
55
+ d-i passwd/user-fullname string vagrant
56
+ d-i passwd/username string vagrant
57
+ d-i passwd/user-password password vagrant
58
+ d-i passwd/user-password-again password vagrant
59
+ d-i user-setup/encrypt-home boolean false
60
+ d-i user-setup/allow-password-weak boolean true
61
+
62
+ ## minimum is puppet and ssh and ntp
63
+ # Individual additional packages to install
64
+ d-i pkgsel/include string openssh-server ntp
65
+
66
+ # Whether to upgrade packages after debootstrap.
67
+ # Allowed values: none, safe-upgrade, full-upgrade
68
+ d-i pkgsel/upgrade select full-upgrade
69
+
70
+ d-i grub-installer/only_debian boolean true
71
+ d-i grub-installer/with_other_os boolean true
72
+ d-i finish-install/reboot_in_progress note
73
+
74
+ #For the update
75
+ d-i pkgsel/update-policy select none
76
+
77
+ # debconf-get-selections --install
78
+ #Use mirror
79
+ #d-i apt-setup/use_mirror boolean true
80
+ #d-i mirror/country string manual
81
+ #choose-mirror-bin mirror/protocol string http
82
+ #choose-mirror-bin mirror/http/hostname string 192.168.4.150
83
+ #choose-mirror-bin mirror/http/directory string /ubuntu
84
+ #choose-mirror-bin mirror/suite select maverick
85
+ #d-i debian-installer/allow_unauthenticated string true
86
+
87
+ choose-mirror-bin mirror/http/proxy string
@@ -11,6 +11,6 @@ Veewee::Definition.declare({
11
11
  :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
12
12
  :ssh_host_port => "7222", :ssh_guest_port => "22",
13
13
  :sudo_cmd => "sh '%f'",
14
- :shutdown_cmd => "shutdown -P now",
14
+ :shutdown_cmd => "shutdown /s /t 0 /d P:4:1 /c \"Vagrant Shutdown\"",
15
15
  :postinstall_files => ["postinstall.sh"], :postinstall_timeout => "10000"
16
16
  })
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: veewee
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 0.3.0.alpha8
5
+ version: 0.3.0.alpha9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Patrick Debois
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-04-17 00:00:00 Z
13
+ date: 2012-04-28 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: vagrant
@@ -256,6 +256,7 @@ files:
256
256
  - lib/veewee/command/vagrant/halt.rb
257
257
  - lib/veewee/command/vagrant/list.rb
258
258
  - lib/veewee/command/vagrant/ostypes.rb
259
+ - lib/veewee/command/vagrant/screenshot.rb
259
260
  - lib/veewee/command/vagrant/ssh.rb
260
261
  - lib/veewee/command/vagrant/templates.rb
261
262
  - lib/veewee/command/vagrant/undefine.rb
@@ -341,6 +342,7 @@ files:
341
342
  - lib/veewee/provider/virtualbox/box/helper/status.rb
342
343
  - lib/veewee/provider/virtualbox/box/helper/version.rb
343
344
  - lib/veewee/provider/virtualbox/box/poweroff.rb
345
+ - lib/veewee/provider/virtualbox/box/screenshot.rb
344
346
  - lib/veewee/provider/virtualbox/box/ssh.rb
345
347
  - lib/veewee/provider/virtualbox/box/up.rb
346
348
  - lib/veewee/provider/virtualbox/box/validate_vagrant.rb
@@ -395,6 +397,18 @@ files:
395
397
  - templates/CentOS-5.7-x86_64-netboot/definition.rb
396
398
  - templates/CentOS-5.7-x86_64-netboot/ks.cfg
397
399
  - templates/CentOS-5.7-x86_64-netboot/postinstall.sh
400
+ - templates/CentOS-5.8-i386-netboot/definition.rb
401
+ - templates/CentOS-5.8-i386-netboot/ks.cfg
402
+ - templates/CentOS-5.8-i386-netboot/postinstall.sh
403
+ - templates/CentOS-5.8-i386/definition.rb
404
+ - templates/CentOS-5.8-i386/ks.cfg
405
+ - templates/CentOS-5.8-i386/postinstall.sh
406
+ - templates/CentOS-5.8-x86_64-netboot/definition.rb
407
+ - templates/CentOS-5.8-x86_64-netboot/ks.cfg
408
+ - templates/CentOS-5.8-x86_64-netboot/postinstall.sh
409
+ - templates/CentOS-5.8-x86_64/definition.rb
410
+ - templates/CentOS-5.8-x86_64/ks.cfg
411
+ - templates/CentOS-5.8-x86_64/postinstall.sh
398
412
  - templates/CentOS-6.0-i386-netboot/definition.rb
399
413
  - templates/CentOS-6.0-i386-netboot/ks.cfg
400
414
  - templates/CentOS-6.0-i386-netboot/postinstall.sh
@@ -752,6 +766,9 @@ files:
752
766
  - templates/ubuntu-12.04-server-amd64/definition.rb
753
767
  - templates/ubuntu-12.04-server-amd64/postinstall.sh
754
768
  - templates/ubuntu-12.04-server-amd64/preseed.cfg
769
+ - templates/ubuntu-12.04-server-i386/definition.rb
770
+ - templates/ubuntu-12.04-server-i386/postinstall.sh
771
+ - templates/ubuntu-12.04-server-i386/preseed.cfg
755
772
  - templates/ubuntu-8.04.4-server-amd64/definition.rb
756
773
  - templates/ubuntu-8.04.4-server-amd64/postinstall.sh
757
774
  - templates/ubuntu-8.04.4-server-amd64/preseed.cfg
@@ -917,7 +934,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
917
934
  requirements:
918
935
  - - ">="
919
936
  - !ruby/object:Gem::Version
920
- hash: -3989224323634617638
937
+ hash: -2639122086827787642
921
938
  segments:
922
939
  - 0
923
940
  version: "0"