veewee 0.2.0 → 0.2.1

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 (137) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +5 -1
  3. data/Gemfile.lock +29 -26
  4. data/README.md +51 -26
  5. data/Rakefile +41 -36
  6. data/lib/veewee/scancode.rb +1 -1
  7. data/lib/veewee/session.rb +156 -159
  8. data/lib/veewee/version.rb +1 -1
  9. data/templates/CentOS-4.8-i386/postinstall.sh +1 -1
  10. data/templates/CentOS-5.5-x86_64-netboot/definition.rb +16 -0
  11. data/templates/CentOS-5.5-x86_64-netboot/ks.cfg +46 -0
  12. data/templates/CentOS-5.5-x86_64-netboot/postinstall.sh +60 -0
  13. data/templates/CentOS-5.6-i386-netboot/definition.rb +1 -1
  14. data/templates/CentOS-5.6-i386-netboot/ks.cfg +2 -2
  15. data/templates/CentOS-5.6-i386-netboot/postinstall.sh +1 -1
  16. data/templates/CentOS-5.6-i386/postinstall.sh +1 -1
  17. data/templates/CentOS-5.6-x86_64-netboot/definition.rb +1 -1
  18. data/templates/CentOS-5.6-x86_64-netboot/ks.cfg +1 -1
  19. data/templates/CentOS-5.6-x86_64-netboot/postinstall.sh +3 -2
  20. data/templates/CentOS-5.7-i386-netboot/definition.rb +16 -0
  21. data/templates/CentOS-5.7-i386-netboot/ks.cfg +45 -0
  22. data/templates/CentOS-5.7-i386-netboot/postinstall.sh +53 -0
  23. data/templates/CentOS-5.7-x86_64-netboot/definition.rb +16 -0
  24. data/templates/CentOS-5.7-x86_64-netboot/ks.cfg +45 -0
  25. data/templates/CentOS-5.7-x86_64-netboot/postinstall.sh +60 -0
  26. data/templates/CentOS-6.0-i386-netboot/ks.cfg +1 -1
  27. data/templates/CentOS-6.0-i386-netboot/postinstall.sh +1 -1
  28. data/templates/CentOS-6.0-i386/postinstall.sh +2 -2
  29. data/templates/CentOS-6.0-x86_64-minimal/definition.rb +17 -0
  30. data/templates/CentOS-6.0-x86_64-minimal/ks.cfg +37 -0
  31. data/templates/CentOS-6.0-x86_64-minimal/postinstall.sh +50 -0
  32. data/templates/CentOS-6.0-x86_64-netboot/ks.cfg +1 -1
  33. data/templates/CentOS-6.0-x86_64-netboot/postinstall.sh +1 -1
  34. data/templates/CentOS-6.0-x86_64/postinstall.sh +2 -2
  35. data/templates/Debian-5.0.8-amd64-netboot/postinstall.sh +1 -1
  36. data/templates/Debian-5.0.8-i386-netboot/postinstall.sh +1 -1
  37. data/templates/{Debian-6.0.2-amd64-netboot → Debian-6.0.3-amd64-netboot}/definition.rb +3 -3
  38. data/templates/Debian-6.0.3-amd64-netboot/postinstall.sh +80 -0
  39. data/templates/{Debian-6.0.2-amd64-netboot → Debian-6.0.3-amd64-netboot}/preseed.cfg +0 -0
  40. data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/definition.rb +3 -3
  41. data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/postinstall.sh +2 -2
  42. data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/preseed.cfg +0 -0
  43. data/templates/Fedora-14-amd64-netboot/definition.rb +1 -1
  44. data/templates/Fedora-14-amd64-netboot/postinstall.sh +1 -1
  45. data/templates/Fedora-14-amd64/definition.rb +1 -1
  46. data/templates/Fedora-14-amd64/postinstall.sh +1 -1
  47. data/templates/Fedora-14-i386-netboot/postinstall.sh +1 -1
  48. data/templates/Fedora-14-i386/postinstall.sh +1 -1
  49. data/templates/Fedora-15-x86_64-netboot/definition.rb +29 -0
  50. data/templates/Fedora-15-x86_64-netboot/ks.cfg +64 -0
  51. data/templates/Fedora-15-x86_64-netboot/postinstall.sh +33 -0
  52. data/templates/Fedora-15-x86_64/definition.rb +17 -0
  53. data/templates/Fedora-15-x86_64/ks.cfg +64 -0
  54. data/templates/Fedora-15-x86_64/postinstall.sh +33 -0
  55. data/templates/archlinux-i386-netboot/aif.cfg +28 -0
  56. data/templates/archlinux-i386-netboot/definition.rb +26 -0
  57. data/templates/archlinux-i386-netboot/postinstall.sh +75 -0
  58. data/templates/archlinux-i386-netboot/postinstall2.sh +30 -0
  59. data/templates/archlinux-i386/postinstall.sh +12 -1
  60. data/templates/archlinux-x86_64-netboot/aif.cfg +28 -0
  61. data/templates/archlinux-x86_64-netboot/definition.rb +26 -0
  62. data/templates/archlinux-x86_64-netboot/postinstall.sh +75 -0
  63. data/templates/archlinux-x86_64-netboot/postinstall2.sh +30 -0
  64. data/templates/archlinux-x86_64/aif.cfg +1 -1
  65. data/templates/archlinux-x86_64/definition.rb +1 -1
  66. data/templates/archlinux-x86_64/postinstall.sh +16 -21
  67. data/templates/archlinux-x86_64/postinstall2.sh +38 -0
  68. data/templates/freebsd-8.2-pcbsd-i386-netboot/definition.rb +2 -4
  69. data/templates/freebsd-8.2-pcbsd-i386-netboot/postinstall.sh +1 -1
  70. data/templates/freebsd-8.2-pcbsd-i386/definition.rb +3 -2
  71. data/templates/freebsd-8.2-pcbsd-i386/postinstall.sh +1 -1
  72. data/templates/gentoo-latest-i386-experimental/definition.rb +4 -4
  73. data/templates/gentoo-latest-i386-experimental/postinstall.sh +1 -1
  74. data/templates/openSUSE-11.4-DVD-i586/autoinst_de.xml +1284 -0
  75. data/templates/openSUSE-11.4-DVD-i586/autoinst_en.xml +1284 -0
  76. data/templates/openSUSE-11.4-DVD-i586/definition.rb +28 -0
  77. data/templates/openSUSE-11.4-DVD-i586/postinstall.sh +43 -0
  78. data/templates/openSUSE-11.4-DVD-x86_64/autoinst_de.xml +1459 -0
  79. data/templates/openSUSE-11.4-DVD-x86_64/autoinst_en.xml +1459 -0
  80. data/templates/openSUSE-11.4-DVD-x86_64/definition.rb +28 -0
  81. data/templates/openSUSE-11.4-DVD-x86_64/postinstall.sh +43 -0
  82. data/templates/openSUSE-11.4-NET-i586/autoinst_de.xml +1278 -0
  83. data/templates/openSUSE-11.4-NET-i586/autoinst_en.xml +1278 -0
  84. data/templates/openSUSE-11.4-NET-i586/definition.rb +28 -0
  85. data/templates/openSUSE-11.4-NET-i586/postinstall.sh +43 -0
  86. data/templates/openSUSE-11.4-NET-x86_64/autoinst_de.xml +1453 -0
  87. data/templates/openSUSE-11.4-NET-x86_64/autoinst_en.xml +1453 -0
  88. data/templates/openSUSE-11.4-NET-x86_64/definition.rb +28 -0
  89. data/templates/openSUSE-11.4-NET-x86_64/postinstall.sh +43 -0
  90. data/templates/openindiana-148-ai-x86/postinstall.sh +1 -1
  91. data/templates/opensuse-11.4-i386-experimental/postinstall.sh +1 -1
  92. data/templates/scientificlinux-6.1-i386-netboot/definition.rb +16 -0
  93. data/templates/scientificlinux-6.1-i386-netboot/ks.cfg +53 -0
  94. data/templates/scientificlinux-6.1-i386-netboot/postinstall.sh +30 -0
  95. data/templates/scientificlinux-6.1-x86_64-netboot/definition.rb +16 -0
  96. data/templates/scientificlinux-6.1-x86_64-netboot/ks.cfg +53 -0
  97. data/templates/scientificlinux-6.1-x86_64-netboot/postinstall.sh +30 -0
  98. data/templates/solaris-11-express-i386/postinstall.sh +1 -1
  99. data/templates/ubuntu-10.04.2-amd64-netboot/postinstall.sh +1 -1
  100. data/templates/ubuntu-10.04.2-server-i386-netboot/postinstall.sh +1 -1
  101. data/templates/{ubuntu-10.04.2-server-amd64-alt → ubuntu-10.04.3-server-amd64-alt}/definition.rb +4 -4
  102. data/templates/{ubuntu-10.04.2-server-amd64-alt → ubuntu-10.04.3-server-amd64-alt}/postinstall.sh +1 -1
  103. data/templates/{ubuntu-10.04.2-server-amd64-alt → ubuntu-10.04.3-server-amd64-alt}/preseed.cfg +0 -0
  104. data/templates/{ubuntu-10.04.2-server-amd64 → ubuntu-10.04.3-server-amd64}/definition.rb +3 -6
  105. data/templates/{ubuntu-10.04.2-server-amd64 → ubuntu-10.04.3-server-amd64}/postinstall.sh +1 -1
  106. data/templates/{ubuntu-10.04.2-server-amd64 → ubuntu-10.04.3-server-amd64}/preseed.cfg +0 -0
  107. data/templates/{ubuntu-10.04.2-server-i386 → ubuntu-10.04.3-server-i386}/definition.rb +4 -4
  108. data/templates/{ubuntu-10.04.2-server-i386 → ubuntu-10.04.3-server-i386}/postinstall.sh +1 -1
  109. data/templates/{ubuntu-10.04.2-server-i386 → ubuntu-10.04.3-server-i386}/preseed.cfg +0 -0
  110. data/templates/ubuntu-10.10-server-amd64-netboot/postinstall.sh +1 -1
  111. data/templates/ubuntu-10.10-server-amd64/postinstall.sh +1 -1
  112. data/templates/ubuntu-10.10-server-i386-netboot/postinstall.sh +1 -1
  113. data/templates/ubuntu-10.10-server-i386/postinstall.sh +1 -1
  114. data/templates/ubuntu-11.04-server-amd64/postinstall.sh +7 -1
  115. data/templates/ubuntu-11.04-server-i386/definition.rb +1 -1
  116. data/templates/ubuntu-11.04-server-i386/postinstall.sh +1 -1
  117. data/templates/ubuntu-11.10-server-amd64-ishaya/definition.rb +24 -0
  118. data/templates/{Debian-6.0.2-amd64-netboot → ubuntu-11.10-server-amd64-ishaya}/postinstall.sh +42 -23
  119. data/templates/ubuntu-11.10-server-amd64-ishaya/preseed.cfg +87 -0
  120. data/templates/ubuntu-11.10-server-amd64-ruby192/definition.rb +24 -0
  121. data/templates/ubuntu-11.10-server-amd64-ruby192/postinstall.sh +90 -0
  122. data/templates/ubuntu-11.10-server-amd64-ruby192/preseed.cfg +87 -0
  123. data/templates/ubuntu-11.10-server-amd64/definition.rb +35 -0
  124. data/templates/ubuntu-11.10-server-amd64/postinstall.sh +88 -0
  125. data/templates/ubuntu-11.10-server-amd64/preseed.cfg +87 -0
  126. data/templates/ubuntu-11.10-server-i386/definition.rb +35 -0
  127. data/templates/ubuntu-11.10-server-i386/postinstall.sh +88 -0
  128. data/templates/ubuntu-11.10-server-i386/preseed.cfg +87 -0
  129. data/templates/ubuntu-8.04.4-server-amd64/definition.rb +1 -0
  130. data/templates/ubuntu-8.04.4-server-amd64/postinstall.sh +8 -7
  131. data/templates/ubuntu-8.04.4-server-amd64/preseed.cfg +0 -1
  132. data/templates/ubuntu-8.04.4-server-i386/postinstall.sh +25 -3
  133. data/templates/windows-2008R2-amd64/postinstall.sh +1 -1
  134. data/validation/features/steps/ssh_steps.rb +1 -1
  135. data/validation/vagrant.feature +35 -35
  136. data/veewee.gemspec +6 -6
  137. metadata +109 -103
@@ -0,0 +1,35 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1',
3
+ :memory_size=> '384',
4
+ :disk_size => '10140',
5
+ :disk_format => 'VDI',
6
+ :hostiocache => 'off',
7
+ :os_type_id => 'Ubuntu_64',
8
+ :iso_file => "ubuntu-11.10-server-amd64.iso",
9
+ :iso_src => "http://releases.ubuntu.com/11.10/ubuntu-11.10-server-amd64.iso",
10
+ :iso_md5 => "f8a0112b7cb5dcd6d564dbe59f18c35f",
11
+ :iso_download_timeout => "1000",
12
+ :boot_wait => "10",
13
+ :boot_cmd_sequence => [
14
+ '<Esc><Esc><Enter>',
15
+ '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
16
+ 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
17
+ 'hostname=%NAME% ',
18
+ 'fb=false debconf/frontend=noninteractive ',
19
+ 'keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ',
20
+ 'initrd=/install/initrd.gz -- <Enter>'
21
+ ],
22
+ :kickstart_port => "7122",
23
+ :kickstart_timeout => "10000",
24
+ :kickstart_file => "preseed.cfg",
25
+ :ssh_login_timeout => "10000",
26
+ :ssh_user => "vagrant",
27
+ :ssh_password => "vagrant",
28
+ :ssh_key => "",
29
+ :ssh_host_port => "7222",
30
+ :ssh_guest_port => "22",
31
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
32
+ :shutdown_cmd => "shutdown -P now",
33
+ :postinstall_files => [ "postinstall.sh"],
34
+ :postinstall_timeout => "10000"
35
+ })
@@ -0,0 +1,88 @@
1
+ # postinstall.sh created from Mitchell's official lucid32/64 baseboxes
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ # Apt-install various things necessary for Ruby, guest additions,
6
+ # etc., and remove optional things to trim down the machine.
7
+ apt-get -y update
8
+ apt-get -y upgrade
9
+ apt-get -y install linux-headers-$(uname -r) build-essential
10
+ apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev
11
+ apt-get clean
12
+
13
+ # Setup sudo to allow no-password sudo for "admin"
14
+ cp /etc/sudoers /etc/sudoers.orig
15
+ sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
16
+ sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
17
+
18
+ # Install NFS client
19
+ apt-get -y install nfs-common
20
+
21
+ # Install Ruby from source in /opt so that users of Vagrant
22
+ # can install their own Rubies using packages or however.
23
+ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
24
+ tar xvzf ruby-1.9.2-p290.tar.gz
25
+ cd ruby-1.9.2-p290
26
+ ./configure --prefix=/opt/ruby
27
+ make
28
+ make install
29
+ cd ..
30
+ rm -rf ruby-1.9.2-p290
31
+
32
+ # Install RubyGems 1.7.2
33
+ wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.11.tgz
34
+ tar xzf rubygems-1.8.11.tgz
35
+ cd rubygems-1.8.11
36
+ /opt/ruby/bin/ruby setup.rb
37
+ cd ..
38
+ rm -rf rubygems-1.8.11
39
+
40
+ # Installing chef & Puppet
41
+ /opt/ruby/bin/gem install chef --no-ri --no-rdoc
42
+ /opt/ruby/bin/gem install puppet --no-ri --no-rdoc
43
+
44
+ # Add /opt/ruby/bin to the global path as the last resort so
45
+ # Ruby, RubyGems, and Chef/Puppet are visible
46
+ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
47
+
48
+ # Installing vagrant keys
49
+ mkdir /home/vagrant/.ssh
50
+ chmod 700 /home/vagrant/.ssh
51
+ cd /home/vagrant/.ssh
52
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
53
+ chmod 600 /home/vagrant/.ssh/authorized_keys
54
+ chown -R vagrant /home/vagrant/.ssh
55
+
56
+ # Installing the virtualbox guest additions
57
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
58
+ cd /tmp
59
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
60
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
61
+ sh /mnt/VBoxLinuxAdditions.run
62
+ umount /mnt
63
+
64
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
65
+
66
+ # Remove items used for building, since they aren't needed anymore
67
+ apt-get -y remove linux-headers-$(uname -r) build-essential
68
+ apt-get -y autoremove
69
+
70
+ # Zero out the free space to save space in the final image:
71
+ dd if=/dev/zero of=/EMPTY bs=1M
72
+ rm -f /EMPTY
73
+
74
+ # Removing leftover leases and persistent rules
75
+ echo "cleaning up dhcp leases"
76
+ rm /var/lib/dhcp3/*
77
+
78
+ # Make sure Udev doesn't block our network
79
+ # http://6.ptmc.org/?p=164
80
+ echo "cleaning up udev rules"
81
+ rm /etc/udev/rules.d/70-persistent-net.rules
82
+ mkdir /etc/udev/rules.d/70-persistent-net.rules
83
+ rm -rf /dev/.udev/
84
+ rm /lib/udev/rules.d/75-persistent-net-generator.rules
85
+
86
+ echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
87
+ echo "pre-up sleep 2" >> /etc/network/interfaces
88
+ 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
@@ -0,0 +1,35 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1',
3
+ :memory_size=> '384',
4
+ :disk_size => '10140',
5
+ :disk_format => 'VDI',
6
+ :hostiocache => 'off',
7
+ :os_type_id => 'Ubuntu',
8
+ :iso_file => "ubuntu-11.10-server-i386.iso",
9
+ :iso_src => "http://releases.ubuntu.com/11.10/ubuntu-11.10-server-i386.iso",
10
+ :iso_md5 => "881d188cb1ca5fb18e3d9132275dceda",
11
+ :iso_download_timeout => "1000",
12
+ :boot_wait => "10",
13
+ :boot_cmd_sequence => [
14
+ '<Esc><Esc><Enter>',
15
+ '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
16
+ 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
17
+ 'hostname=%NAME% ',
18
+ 'fb=false debconf/frontend=noninteractive ',
19
+ 'keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ',
20
+ 'initrd=/install/initrd.gz -- <Enter>'
21
+ ],
22
+ :kickstart_port => "7122",
23
+ :kickstart_timeout => "10000",
24
+ :kickstart_file => "preseed.cfg",
25
+ :ssh_login_timeout => "10000",
26
+ :ssh_user => "vagrant",
27
+ :ssh_password => "vagrant",
28
+ :ssh_key => "",
29
+ :ssh_host_port => "7222",
30
+ :ssh_guest_port => "22",
31
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
32
+ :shutdown_cmd => "shutdown -P now",
33
+ :postinstall_files => [ "postinstall.sh"],
34
+ :postinstall_timeout => "10000"
35
+ })
@@ -0,0 +1,88 @@
1
+ # postinstall.sh created from Mitchell's official lucid32/64 baseboxes
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ # Apt-install various things necessary for Ruby, guest additions,
6
+ # etc., and remove optional things to trim down the machine.
7
+ apt-get -y update
8
+ apt-get -y upgrade
9
+ apt-get -y install linux-headers-$(uname -r) build-essential
10
+ apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev
11
+ apt-get clean
12
+
13
+ # Setup sudo to allow no-password sudo for "admin"
14
+ cp /etc/sudoers /etc/sudoers.orig
15
+ sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
16
+ sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
17
+
18
+ # Install NFS client
19
+ apt-get -y install nfs-common
20
+
21
+ # Install Ruby from source in /opt so that users of Vagrant
22
+ # can install their own Rubies using packages or however.
23
+ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
24
+ tar xvzf ruby-1.9.2-p290.tar.gz
25
+ cd ruby-1.9.2-p290
26
+ ./configure --prefix=/opt/ruby
27
+ make
28
+ make install
29
+ cd ..
30
+ rm -rf ruby-1.9.2-p290
31
+
32
+ # Install RubyGems 1.7.2
33
+ wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.11.tgz
34
+ tar xzf rubygems-1.8.11.tgz
35
+ cd rubygems-1.8.11
36
+ /opt/ruby/bin/ruby setup.rb
37
+ cd ..
38
+ rm -rf rubygems-1.8.11
39
+
40
+ # Installing chef & Puppet
41
+ /opt/ruby/bin/gem install chef --no-ri --no-rdoc
42
+ /opt/ruby/bin/gem install puppet --no-ri --no-rdoc
43
+
44
+ # Add /opt/ruby/bin to the global path as the last resort so
45
+ # Ruby, RubyGems, and Chef/Puppet are visible
46
+ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
47
+
48
+ # Installing vagrant keys
49
+ mkdir /home/vagrant/.ssh
50
+ chmod 700 /home/vagrant/.ssh
51
+ cd /home/vagrant/.ssh
52
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
53
+ chmod 600 /home/vagrant/.ssh/authorized_keys
54
+ chown -R vagrant /home/vagrant/.ssh
55
+
56
+ # Installing the virtualbox guest additions
57
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
58
+ cd /tmp
59
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
60
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
61
+ sh /mnt/VBoxLinuxAdditions.run
62
+ umount /mnt
63
+
64
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
65
+
66
+ # Remove items used for building, since they aren't needed anymore
67
+ apt-get -y remove linux-headers-$(uname -r) build-essential
68
+ apt-get -y autoremove
69
+
70
+ # Zero out the free space to save space in the final image:
71
+ dd if=/dev/zero of=/EMPTY bs=1M
72
+ rm -f /EMPTY
73
+
74
+ # Removing leftover leases and persistent rules
75
+ echo "cleaning up dhcp leases"
76
+ rm /var/lib/dhcp3/*
77
+
78
+ # Make sure Udev doesn't block our network
79
+ # http://6.ptmc.org/?p=164
80
+ echo "cleaning up udev rules"
81
+ rm /etc/udev/rules.d/70-persistent-net.rules
82
+ mkdir /etc/udev/rules.d/70-persistent-net.rules
83
+ rm -rf /dev/.udev/
84
+ rm /lib/udev/rules.d/75-persistent-net-generator.rules
85
+
86
+ echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
87
+ echo "pre-up sleep 2" >> /etc/network/interfaces
88
+ 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
@@ -2,6 +2,7 @@ Veewee::Session.declare({
2
2
  :cpu_count => '1', :memory_size=> '384',
3
3
  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
4
4
  :os_type_id => 'Ubuntu_64',
5
+ :pae => true, :io_apic_enabled => true,
5
6
  :iso_file => "ubuntu-8.04.4-server-amd64.iso",
6
7
  :iso_src => "http://releases.ubuntu.com/8.04.4/ubuntu-8.04.4-server-amd64.iso",
7
8
  :iso_md5 => "89fdc8289630fceb036c9818ac19ca4",
@@ -5,7 +5,7 @@ date > /etc/vagrant_box_build_time
5
5
  #Updating the box
6
6
  apt-get -y update
7
7
  apt-get -y install linux-headers-$(uname -r) build-essential
8
- apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
8
+ apt-get -y install zlib1g-dev libssl-dev libreadline5-dev nfs-common
9
9
  apt-get clean
10
10
 
11
11
  #Setting up sudo
@@ -28,7 +28,7 @@ rm ruby-enterprise-1.8.7-2010.02.tar.gz
28
28
  mkdir /home/vagrant/.ssh
29
29
  chmod 700 /home/vagrant/.ssh
30
30
  cd /home/vagrant/.ssh
31
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
31
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
32
32
  chmod 600 /home/vagrant/.ssh/authorized_keys
33
33
  chown -R vagrant /home/vagrant/.ssh
34
34
 
@@ -46,11 +46,6 @@ rm VBoxGuestAdditions_$VBOX_VERSION.iso
46
46
  apt-get -y remove linux-headers-$(uname -r) build-essential
47
47
  apt-get -y autoremove
48
48
 
49
- # Zero out the free space to save space in the final image:
50
- dd if=/dev/zero of=/EMPTY bs=1M
51
- rm -f /EMPTY
52
-
53
- exit
54
49
  # Not sure if this is needed for hardy too
55
50
  # Removing leftover leases and persistent rules
56
51
  echo "cleaning up dhcp leases"
@@ -66,3 +61,9 @@ rm /lib/udev/rules.d/75-persistent-net-generator.rules
66
61
 
67
62
  echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
68
63
  echo "pre-up sleep 2" >> /etc/network/interfaces
64
+
65
+ # Zero out the free space to save space in the final image:
66
+ dd if=/dev/zero of=/EMPTY bs=1M
67
+ rm -f /EMPTY
68
+
69
+ exit