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
@@ -51,7 +51,7 @@ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
51
51
  mkdir /home/vagrant/.ssh
52
52
  chmod 700 /home/vagrant/.ssh
53
53
  cd /home/vagrant/.ssh
54
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
54
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
55
55
  chmod 600 /home/vagrant/.ssh/authorized_keys
56
56
  chown -R vagrant /home/vagrant/.ssh
57
57
 
@@ -51,7 +51,7 @@ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
51
51
  mkdir /home/vagrant/.ssh
52
52
  chmod 700 /home/vagrant/.ssh
53
53
  cd /home/vagrant/.ssh
54
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
54
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
55
55
  chmod 600 /home/vagrant/.ssh/authorized_keys
56
56
  chown -R vagrant /home/vagrant/.ssh
57
57
 
@@ -39,6 +39,12 @@ cd rubygems-1.7.2
39
39
  cd ..
40
40
  rm -rf rubygems-1.7.2*
41
41
 
42
+ # Installing make tool for chef
43
+ apt-get install make
44
+
45
+ # Installing dependencies for chef
46
+ /opt/ruby/bin/gem install polyglot net-ssh-gateway mime-types
47
+
42
48
  # Installing chef & Puppet
43
49
  /opt/ruby/bin/gem install chef --no-ri --no-rdoc
44
50
  /opt/ruby/bin/gem install puppet --no-ri --no-rdoc
@@ -51,7 +57,7 @@ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
51
57
  mkdir /home/vagrant/.ssh
52
58
  chmod 700 /home/vagrant/.ssh
53
59
  cd /home/vagrant/.ssh
54
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
60
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
55
61
  chmod 600 /home/vagrant/.ssh/authorized_keys
56
62
  chown -R vagrant /home/vagrant/.ssh
57
63
 
@@ -4,7 +4,7 @@ Veewee::Session.declare({
4
4
  :os_type_id => 'Ubuntu',
5
5
  :iso_file => "ubuntu-11.04-server-i386.iso",
6
6
  :iso_src => "http://releases.ubuntu.com/11.04/ubuntu-11.04-server-i386.iso",
7
- :iso_md5 => "ce1cee108de737d7492e37069eed538e",
7
+ :iso_md5 => "b1a479c6593a90029414d201cb83a9cc",
8
8
  :iso_download_timeout => "1000",
9
9
  :boot_wait => "10", :boot_cmd_sequence => [
10
10
  '<Esc><Esc><Enter>',
@@ -51,7 +51,7 @@ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
51
51
  mkdir /home/vagrant/.ssh
52
52
  chmod 700 /home/vagrant/.ssh
53
53
  cd /home/vagrant/.ssh
54
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
54
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
55
55
  chmod 600 /home/vagrant/.ssh/authorized_keys
56
56
  chown -R vagrant /home/vagrant/.ssh
57
57
 
@@ -0,0 +1,24 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '384',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
4
+ :os_type_id => 'Ubuntu_64',
5
+ :iso_file => "ubuntu-11.10-server-amd64.iso",
6
+ :iso_src => "http://releases.ubuntu.com/11.10/ubuntu-11.10-server-amd64.iso",
7
+ :iso_md5 => "f8a0112b7cb5dcd6d564dbe59f18c35f",
8
+ :iso_download_timeout => "1000",
9
+ :boot_wait => "10", :boot_cmd_sequence => [
10
+ '<Esc><Esc><Enter>',
11
+ '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
12
+ 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
13
+ 'hostname=%NAME% ',
14
+ 'fb=false debconf/frontend=noninteractive ',
15
+ 'keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ',
16
+ 'initrd=/install/initrd.gz -- <Enter>'
17
+ ],
18
+ :kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "preseed.cfg",
19
+ :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
20
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
21
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
22
+ :shutdown_cmd => "shutdown -P now",
23
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000"
24
+ })
@@ -1,30 +1,53 @@
1
- #http://adrianbravo.tumblr.com/post/644860401
1
+ # postinstall.sh created from Mitchell's official lucid32/64 baseboxes
2
2
 
3
3
  date > /etc/vagrant_box_build_time
4
4
 
5
- #Updating the box
5
+ # Apt-install various things necessary for Ruby, guest additions,
6
+ # etc., and remove optional things to trim down the machine.
6
7
  apt-get -y update
8
+ apt-get -y upgrade
7
9
  apt-get -y install linux-headers-$(uname -r) build-essential
8
- apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
10
+ apt-get -y install zlib1g-dev libssl-dev libreadline5
9
11
  apt-get clean
10
12
 
11
- #Setting up sudo
13
+ # Setup sudo to allow no-password sudo for "admin"
12
14
  cp /etc/sudoers /etc/sudoers.orig
13
- sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
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
14
17
 
15
- #Installing ruby
16
- wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
17
- tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
18
- ./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby --no-dev-docs --dont-install-useful-gems
19
- echo 'PATH=$PATH:/opt/ruby/bin'> /etc/profile.d/rubyenterprise.sh
20
- rm -rf ./ruby-enterprise-1.8.7-2010.02/
21
- rm ruby-enterprise-1.8.7-2010.02.tar.gz
18
+ # Install NFS client
19
+ apt-get -y install nfs-common
22
20
 
23
- #Installing chef & Puppet
21
+ # Install Ruby from source in /opt so that users of Vagrant
22
+ # can install their own Rubies using packages or however.
23
+ # We must install the 1.8.x series since Puppet doesn't support
24
+ # Ruby 1.9 yet.
25
+ wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.gz
26
+ tar xvzf ruby-1.8.7-p352.tar.gz
27
+ cd ruby-1.8.7-p352
28
+ ./configure --prefix=/opt/ruby
29
+ make
30
+ make install
31
+ cd ..
32
+ rm -rf ruby-1.8.7-p352*
33
+
34
+ # Install RubyGems 1.7.2
35
+ wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
36
+ tar xzf rubygems-1.7.2.tgz
37
+ cd rubygems-1.7.2
38
+ /opt/ruby/bin/ruby setup.rb
39
+ cd ..
40
+ rm -rf rubygems-1.7.2*
41
+
42
+ # Installing chef & Puppet
24
43
  /opt/ruby/bin/gem install chef --no-ri --no-rdoc
25
44
  /opt/ruby/bin/gem install puppet --no-ri --no-rdoc
26
45
 
27
- #Installing vagrant keys
46
+ # Add /opt/ruby/bin to the global path as the last resort so
47
+ # Ruby, RubyGems, and Chef/Puppet are visible
48
+ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
49
+
50
+ # Installing vagrant keys
28
51
  mkdir /home/vagrant/.ssh
29
52
  chmod 700 /home/vagrant/.ssh
30
53
  cd /home/vagrant/.ssh
@@ -32,24 +55,20 @@ wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys
32
55
  chmod 600 /home/vagrant/.ssh/authorized_keys
33
56
  chown -R vagrant /home/vagrant/.ssh
34
57
 
35
- #the netboot install the virtualbox stuff so we have to remove it
36
- /etc/init.d/virtualbox-ose-guest-utils stop
37
- rmmod vboxguest
38
- aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils
39
-
40
- #Installing the virtualbox guest additions
58
+ # Installing the virtualbox guest additions
41
59
  VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
42
60
  cd /tmp
43
61
  wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
44
62
  mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
45
- yes|sh /mnt/VBoxLinuxAdditions.run
63
+ sh /mnt/VBoxLinuxAdditions.run
46
64
  umount /mnt
47
65
 
66
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
67
+
68
+ # Remove items used for building, since they aren't needed anymore
48
69
  apt-get -y remove linux-headers-$(uname -r) build-essential
49
70
  apt-get -y autoremove
50
71
 
51
- rm VBoxGuestAdditions_$VBOX_VERSION.iso
52
-
53
72
  # Zero out the free space to save space in the final image:
54
73
  dd if=/dev/zero of=/EMPTY bs=1M
55
74
  rm -f /EMPTY
@@ -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,24 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '384',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
4
+ :os_type_id => 'Ubuntu_64',
5
+ :iso_file => "ubuntu-11.10-server-amd64.iso",
6
+ :iso_src => "http://releases.ubuntu.com/11.10/ubuntu-11.10-server-amd64.iso",
7
+ :iso_md5 => "f8a0112b7cb5dcd6d564dbe59f18c35f",
8
+ :iso_download_timeout => "1000",
9
+ :boot_wait => "10", :boot_cmd_sequence => [
10
+ '<Esc><Esc><Enter>',
11
+ '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
12
+ 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
13
+ 'hostname=%NAME% ',
14
+ 'fb=false debconf/frontend=noninteractive ',
15
+ 'keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ',
16
+ 'initrd=/install/initrd.gz -- <Enter>'
17
+ ],
18
+ :kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "preseed.cfg",
19
+ :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
20
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
21
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
22
+ :shutdown_cmd => "shutdown -P now",
23
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000"
24
+ })
@@ -0,0 +1,90 @@
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 libreadline5
11
+ apt-get -y install libc6-dev libmysql++-dev libsqlite3-dev make libreadline5-dev zlib1g-dev
12
+ apt-get clean
13
+
14
+ # Setup sudo to allow no-password sudo for "admin"
15
+ cp /etc/sudoers /etc/sudoers.orig
16
+ sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
17
+ sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
18
+
19
+ # Install NFS client
20
+ apt-get -y install nfs-common
21
+
22
+ # Install Ruby from source in /opt so that users of Vagrant
23
+ # can install their own Rubies using packages or however.
24
+ # We're installing 1.9.2 because we don't care about Puppet.
25
+ cd /tmp
26
+ mkdir src
27
+ cd src
28
+ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
29
+ tar xvf ruby-1.9.2-p290.tar.gz
30
+ cd ruby-1.9.2-p290
31
+ ./configure --prefix=/opt/ruby
32
+ sudo make && sudo make install
33
+
34
+ # Install RubyGems 1.8.10
35
+ cd /tmp/src
36
+ wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
37
+ tar xzf rubygems-1.8.10.tgz
38
+ cd rubygems-1.8.10
39
+ /opt/ruby/bin/ruby setup.rb
40
+
41
+ # Installing chef & Puppet
42
+ /opt/ruby/bin/gem install chef --no-ri --no-rdoc
43
+ # Don't install puppet. We use chef.
44
+ # /opt/ruby/bin/gem install puppet --no-ri --no-rdoc
45
+
46
+ # Add /opt/ruby/bin to the global path as the last resort so
47
+ # Ruby, RubyGems, and Chef/Puppet are visible
48
+ echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
49
+
50
+ # Installing vagrant keys
51
+ mkdir /home/vagrant/.ssh
52
+ chmod 700 /home/vagrant/.ssh
53
+ cd /home/vagrant/.ssh
54
+ wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
55
+ chmod 600 /home/vagrant/.ssh/authorized_keys
56
+ chown -R vagrant /home/vagrant/.ssh
57
+
58
+ # Installing the virtualbox guest additions
59
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
60
+ cd /tmp
61
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
62
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
63
+ sh /mnt/VBoxLinuxAdditions.run
64
+ umount /mnt
65
+
66
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
67
+
68
+ # Remove items used for building, since they aren't needed anymore
69
+ apt-get -y remove linux-headers-$(uname -r) build-essential
70
+ apt-get -y autoremove
71
+
72
+ # Zero out the free space to save space in the final image:
73
+ dd if=/dev/zero of=/EMPTY bs=1M
74
+ rm -f /EMPTY
75
+
76
+ # Removing leftover leases and persistent rules
77
+ echo "cleaning up dhcp leases"
78
+ rm /var/lib/dhcp3/*
79
+
80
+ # Make sure Udev doesn't block our network
81
+ # http://6.ptmc.org/?p=164
82
+ echo "cleaning up udev rules"
83
+ rm /etc/udev/rules.d/70-persistent-net.rules
84
+ mkdir /etc/udev/rules.d/70-persistent-net.rules
85
+ rm -rf /dev/.udev/
86
+ rm /lib/udev/rules.d/75-persistent-net-generator.rules
87
+
88
+ echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
89
+ echo "pre-up sleep 2" >> /etc/network/interfaces
90
+ 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