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
@@ -1,3 +1,3 @@
1
1
  module Veewee
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -30,7 +30,7 @@ rm ruby-enterprise-1.8.7-2010.02.tar.gz
30
30
  mkdir /home/vagrant/.ssh
31
31
  chmod 700 /home/vagrant/.ssh
32
32
  cd /home/vagrant/.ssh
33
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
33
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
34
34
  chown -R vagrant /home/vagrant/.ssh
35
35
 
36
36
  #Installing the virtualbox guest additions
@@ -0,0 +1,16 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '384',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
4
+ :os_type_id => 'RedHat_64',
5
+ :iso_file => "CentOS-5.5-x86_64-netinstall.iso",
6
+ :iso_src => "http://vault.centos.org/5.5/isos/x86_64/CentOS-5.5-x86_64-netinstall.iso",
7
+ :iso_md5 => "560a964657c92508ae110a35cb963632",
8
+ :iso_download_timeout => 1000,
9
+ :boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
10
+ :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
11
+ :ssh_login_timeout => "100", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
12
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
13
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
14
+ :shutdown_cmd => "/sbin/halt -h -p",
15
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
16
+ })
@@ -0,0 +1,46 @@
1
+ # Kickstart file automatically generated by anaconda.
2
+
3
+ install
4
+ url --url=http://ftp.hosteurope.de/mirror/centos.org/5.5//os/x86_64
5
+ lang en_US.UTF-8
6
+ langsupport --default=en_US.UTF-8 en_US.UTF-8
7
+ keyboard us
8
+ xconfig --card "VMWare" --videoram 16384 --hsync 31.5-37.9 --vsync 50-70 --resolution 800x600 --depth 16
9
+ network --device eth0 --bootproto dhcp
10
+ rootpw --iscrypted $1$vSG8FjAu$ekQ0grf16hS4G93HTPcco/
11
+ firewall --enabled --trust eth0 --ssh
12
+ selinux --enforcing
13
+ authconfig --enableshadow --enablemd5
14
+ timezone UTC
15
+ bootloader --location=mbr
16
+ # The following is the partition information you requested
17
+ # Note that any partitions you deleted are not expressed
18
+ # here so unless you clear all partitions first, this is
19
+ # not guaranteed to work
20
+ clearpart --all --drives=sda --initlabel
21
+ part /boot --fstype ext3 --size=100 --ondisk=sda
22
+ part pv.2 --size=0 --grow --ondisk=sda
23
+ volgroup VolGroup00 --pesize=32768 pv.2
24
+ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=528 --grow --maxsize=1056
25
+ logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
26
+ reboot
27
+
28
+ %packages
29
+ #@ admin-tools
30
+ #@ text-internet
31
+ #@ dialup
32
+ #@ smb-server
33
+ #@ web-server
34
+ #@ printing
35
+ #@ server-cfg
36
+ @ core
37
+ grub
38
+ e2fsprogs
39
+ lvm2
40
+ kernel-devel
41
+
42
+ %post
43
+ /usr/sbin/groupadd vagrant
44
+ /usr/sbin/useradd vagrant -g vagrant -G wheel
45
+ echo "vagrant"|passwd --stdin vagrant
46
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
@@ -0,0 +1,60 @@
1
+ #http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ fail()
6
+ {
7
+ echo "FATAL: $*"
8
+ exit 1
9
+ }
10
+
11
+ #kernel source is needed for vbox additions
12
+ yum -y install gcc bzip2 make kernel-devel-`uname -r`
13
+ #yum -y update
14
+ #yum -y upgrade
15
+
16
+ yum -y install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel
17
+ yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
18
+ yum -y clean all
19
+
20
+ #Installing ruby
21
+ cd /tmp
22
+ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz || fail "Could not download Ruby source"
23
+ tar xzvf ruby-1.9.2-p180.tar.gz
24
+ cd ruby-1.9.2-p180
25
+ ./configure
26
+ make && make install
27
+ cd /tmp
28
+ rm -rf /tmp/ruby-1.9.2-p180
29
+ rm /tmp/ruby-1.9.2-p180.tar.gz
30
+ ln -s /usr/local/bin/ruby /usr/bin/ruby # Create a sym link for the same path
31
+ ln -s /usr/local/bin/gem /usr/bin/gem # Create a sym link for the same path
32
+
33
+ #Installing chef & Puppet
34
+ echo "Installing chef and puppet"
35
+ /usr/local/bin/gem install chef --no-ri --no-rdoc || fail "Could not install chef"
36
+ /usr/local/bin/gem install puppet --no-ri --no-rdoc || fail "Could not install puppet"
37
+
38
+ #Installing vagrant keys
39
+ mkdir /home/vagrant/.ssh
40
+ chmod 700 /home/vagrant/.ssh
41
+ cd /home/vagrant/.ssh
42
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
43
+ chown -R vagrant /home/vagrant/.ssh
44
+
45
+ #Installing the virtualbox guest additions
46
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
47
+ cd /tmp
48
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
49
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
50
+ sh /mnt/VBoxLinuxAdditions.run
51
+ umount /mnt
52
+
53
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
54
+
55
+
56
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
57
+
58
+ #poweroff -h
59
+
60
+ exit
@@ -3,7 +3,7 @@ Veewee::Session.declare({
3
3
  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
4
4
  :os_type_id => 'RedHat',
5
5
  :iso_file => "CentOS-5.6-i386-netinstall.iso",
6
- :iso_src => "http://mirror.bytemark.co.uk/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso",
6
+ :iso_src => "http://vault.centos.org/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso",
7
7
  :iso_md5 => "a710105f7f9fe3516f08f6f8514ed2b0",
8
8
  :iso_download_timeout => 1000,
9
9
  :boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
@@ -1,7 +1,7 @@
1
1
  # Kickstart file automatically generated by anaconda.
2
2
 
3
3
  install
4
- url --url=http://mirror.bytemark.co.uk/centos/5.5/os/i386
4
+ url --url=http://vault.centos.org/5.6/os/i386
5
5
  lang en_US.UTF-8
6
6
  langsupport --default=en_US.UTF-8 en_US.UTF-8
7
7
  keyboard us
@@ -42,4 +42,4 @@ lvm2
42
42
  /usr/sbin/groupadd vagrant
43
43
  /usr/sbin/useradd vagrant -g vagrant -G wheel
44
44
  echo "vagrant"|passwd --stdin vagrant
45
- echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
45
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
@@ -31,7 +31,7 @@ rm ruby-enterprise-1.8.7-2010.02.tar.gz
31
31
  mkdir /home/vagrant/.ssh
32
32
  chmod 700 /home/vagrant/.ssh
33
33
  cd /home/vagrant/.ssh
34
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
34
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
35
35
  chown -R vagrant /home/vagrant/.ssh
36
36
 
37
37
  #Installing the virtualbox guest additions
@@ -30,7 +30,7 @@ rm ruby-enterprise-1.8.7-2010.02.tar.gz
30
30
  mkdir /home/vagrant/.ssh
31
31
  chmod 700 /home/vagrant/.ssh
32
32
  cd /home/vagrant/.ssh
33
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
33
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
34
34
  chown -R vagrant /home/vagrant/.ssh
35
35
 
36
36
  #Installing the virtualbox guest additions
@@ -3,7 +3,7 @@ Veewee::Session.declare({
3
3
  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
4
4
  :os_type_id => 'RedHat_64',
5
5
  :iso_file => "CentOS-5.6-x86_64-netinstall.iso",
6
- :iso_src => "http://mirror.ukhost4u.com/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso",
6
+ :iso_src => "http://vault.centos.org/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso",
7
7
  :iso_md5 => "02cf3a5e32aaa5eed27af775ad292beb",
8
8
  :iso_download_timeout => 1000,
9
9
  :boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
@@ -1,7 +1,7 @@
1
1
  # Kickstart file automatically generated by anaconda.
2
2
 
3
3
  install
4
- url --url=http://mirror.bytemark.co.uk/centos/5.6/os/x86_64
4
+ url --url=http://vault.centos.org/5.6/os/x86_64
5
5
  lang en_US.UTF-8
6
6
  langsupport --default=en_US.UTF-8 en_US.UTF-8
7
7
  keyboard us
@@ -14,7 +14,7 @@ yum -y install gcc bzip2 make kernel-devel-`uname -r`
14
14
  #yum -y upgrade
15
15
 
16
16
  yum -y install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel
17
- yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
17
+ yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
18
18
  yum -y clean all
19
19
 
20
20
  #Installing ruby
@@ -39,7 +39,7 @@ echo "Installing chef and puppet"
39
39
  mkdir /home/vagrant/.ssh
40
40
  chmod 700 /home/vagrant/.ssh
41
41
  cd /home/vagrant/.ssh
42
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
42
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
43
43
  chown -R vagrant /home/vagrant/.ssh
44
44
 
45
45
  #Installing the virtualbox guest additions
@@ -54,6 +54,7 @@ rm VBoxGuestAdditions_$VBOX_VERSION.iso
54
54
 
55
55
 
56
56
  sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
57
+ sed -i "s/^\(.*env_keep = \"\)/\1PATH /" /etc/sudoers
57
58
 
58
59
  #poweroff -h
59
60
 
@@ -0,0 +1,16 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '384',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
4
+ :os_type_id => 'RedHat',
5
+ :iso_file => "CentOS-5.7-i386-netinstall.iso",
6
+ :iso_src => "http://mirror.atlanticmetro.net/centos/5.7/isos/i386/CentOS-5.7-i386-netinstall.iso",
7
+ :iso_md5 => "11222d9134cdfc101f6f91fe544254c9",
8
+ :iso_download_timeout => 1000,
9
+ :boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
10
+ :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
11
+ :ssh_login_timeout => "100", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
12
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
13
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
14
+ :shutdown_cmd => "/sbin/halt -h -p",
15
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
16
+ })
@@ -0,0 +1,45 @@
1
+ # Kickstart file automatically generated by anaconda.
2
+
3
+ install
4
+ url --url=http://mirror.atlanticmetro.net/centos/5.7/os/i386
5
+ lang en_US.UTF-8
6
+ langsupport --default=en_US.UTF-8 en_US.UTF-8
7
+ keyboard us
8
+ xconfig --card "VMWare" --videoram 16384 --hsync 31.5-37.9 --vsync 50-70 --resolution 800x600 --depth 16
9
+ network --device eth0 --bootproto dhcp
10
+ rootpw --iscrypted $1$vSG8FjAu$ekQ0grf16hS4G93HTPcco/
11
+ firewall --enabled --trust eth0 --ssh
12
+ selinux --enforcing
13
+ authconfig --enableshadow --enablemd5
14
+ timezone America/New_York
15
+ bootloader --location=mbr
16
+ # The following is the partition information you requested
17
+ # Note that any partitions you deleted are not expressed
18
+ # here so unless you clear all partitions first, this is
19
+ # not guaranteed to work
20
+ clearpart --all --drives=sda --initlabel
21
+ part /boot --fstype ext3 --size=100 --ondisk=sda
22
+ part pv.2 --size=0 --grow --ondisk=sda
23
+ volgroup VolGroup00 --pesize=32768 pv.2
24
+ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=528 --grow --maxsize=1056
25
+ logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
26
+ reboot
27
+
28
+ %packages
29
+ #@ admin-tools
30
+ #@ text-internet
31
+ #@ dialup
32
+ #@ smb-server
33
+ #@ web-server
34
+ #@ printing
35
+ #@ server-cfg
36
+ @ core
37
+ grub
38
+ e2fsprogs
39
+ lvm2
40
+
41
+ %post
42
+ /usr/sbin/groupadd vagrant
43
+ /usr/sbin/useradd vagrant -g vagrant -G wheel
44
+ echo "vagrant"|passwd --stdin vagrant
45
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
@@ -0,0 +1,53 @@
1
+ #http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
2
+ #kernel source is needed for vbox additions
3
+
4
+ date > /etc/vagrant_box_build_time
5
+
6
+ yum -y install gcc bzip2 make kernel-devel-`uname -r`
7
+ #yum -y update
8
+ #yum -y upgrade
9
+
10
+ yum -y install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel
11
+ yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
12
+ yum -y clean all
13
+
14
+ #Installing ruby
15
+ cd /tmp
16
+ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz || fail "Could not download Ruby source"
17
+ tar xzvf ruby-1.9.2-p180.tar.gz
18
+ cd ruby-1.9.2-p180
19
+ ./configure
20
+ make && make install
21
+ cd /tmp
22
+ rm -rf /tmp/ruby-1.9.2-p180
23
+ rm /tmp/ruby-1.9.2-p180.tar.gz
24
+ ln -s /usr/local/bin/ruby /usr/bin/ruby # Create a sym link for the same path
25
+ ln -s /usr/local/bin/gem /usr/bin/gem # Create a sym link for the same path
26
+
27
+ #Installing chef & Puppet
28
+ /usr/bin/gem install chef --no-ri --no-rdoc
29
+ /usr/bin/gem install puppet --no-ri --no-rdoc
30
+
31
+ #Installing vagrant keys
32
+ mkdir /home/vagrant/.ssh
33
+ chmod 700 /home/vagrant/.ssh
34
+ cd /home/vagrant/.ssh
35
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
36
+ chown -R vagrant /home/vagrant/.ssh
37
+
38
+ #Installing the virtualbox guest additions
39
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
40
+ cd /tmp
41
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
42
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
43
+ sh /mnt/VBoxLinuxAdditions.run
44
+ umount /mnt
45
+
46
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
47
+
48
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
49
+ sed -i "s/^\(.*env_keep = \"\)/\1PATH /" /etc/sudoers
50
+
51
+ #poweroff -h
52
+
53
+ exit
@@ -0,0 +1,16 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '384',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
4
+ :os_type_id => 'RedHat_64',
5
+ :iso_file => "CentOS-5.7-x86_64-netinstall.iso",
6
+ :iso_src => "http://mirror.atlanticmetro.net/centos/5.7/isos/x86_64/CentOS-5.7-x86_64-netinstall.iso",
7
+ :iso_md5 => "5db3d49ba7a2c56810822914fadc1edf",
8
+ :iso_download_timeout => 1000,
9
+ :boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
10
+ :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
11
+ :ssh_login_timeout => "100", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
12
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
13
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
14
+ :shutdown_cmd => "/sbin/halt -h -p",
15
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
16
+ })
@@ -0,0 +1,45 @@
1
+ # Kickstart file automatically generated by anaconda.
2
+
3
+ install
4
+ url --url=http://mirror.atlanticmetro.net/centos/5.7/os/x86_64
5
+ lang en_US.UTF-8
6
+ langsupport --default=en_US.UTF-8 en_US.UTF-8
7
+ keyboard us
8
+ xconfig --card "VMWare" --videoram 16384 --hsync 31.5-37.9 --vsync 50-70 --resolution 800x600 --depth 16
9
+ network --device eth0 --bootproto dhcp
10
+ rootpw --iscrypted $1$vSG8FjAu$ekQ0grf16hS4G93HTPcco/
11
+ firewall --enabled --trust eth0 --ssh
12
+ selinux --enforcing
13
+ authconfig --enableshadow --enablemd5
14
+ timezone America/New_York
15
+ bootloader --location=mbr
16
+ # The following is the partition information you requested
17
+ # Note that any partitions you deleted are not expressed
18
+ # here so unless you clear all partitions first, this is
19
+ # not guaranteed to work
20
+ clearpart --all --drives=sda --initlabel
21
+ part /boot --fstype ext3 --size=100 --ondisk=sda
22
+ part pv.2 --size=0 --grow --ondisk=sda
23
+ volgroup VolGroup00 --pesize=32768 pv.2
24
+ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=528 --grow --maxsize=1056
25
+ logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
26
+ reboot
27
+
28
+ %packages
29
+ #@ admin-tools
30
+ #@ text-internet
31
+ #@ dialup
32
+ #@ smb-server
33
+ #@ web-server
34
+ #@ printing
35
+ #@ server-cfg
36
+ @ core
37
+ grub
38
+ e2fsprogs
39
+ lvm2
40
+
41
+ %post
42
+ /usr/sbin/groupadd vagrant
43
+ /usr/sbin/useradd vagrant -g vagrant -G wheel
44
+ echo "vagrant"|passwd --stdin vagrant
45
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
@@ -0,0 +1,60 @@
1
+ #http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ fail()
6
+ {
7
+ echo "FATAL: $*"
8
+ exit 1
9
+ }
10
+
11
+ #kernel source is needed for vbox additions
12
+ yum -y install gcc bzip2 make kernel-devel-`uname -r`
13
+ #yum -y update
14
+ #yum -y upgrade
15
+
16
+ yum -y install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel
17
+ yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
18
+ yum -y clean all
19
+
20
+ #Installing ruby
21
+ cd /tmp
22
+ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz || fail "Could not download Ruby source"
23
+ tar xzvf ruby-1.9.2-p180.tar.gz
24
+ cd ruby-1.9.2-p180
25
+ ./configure
26
+ make && make install
27
+ cd /tmp
28
+ rm -rf /tmp/ruby-1.9.2-p180
29
+ rm /tmp/ruby-1.9.2-p180.tar.gz
30
+ ln -s /usr/local/bin/ruby /usr/bin/ruby # Create a sym link for the same path
31
+ ln -s /usr/local/bin/gem /usr/bin/gem # Create a sym link for the same path
32
+
33
+ #Installing chef & Puppet
34
+ echo "Installing chef and puppet"
35
+ /usr/local/bin/gem install chef --no-ri --no-rdoc || fail "Could not install chef"
36
+ /usr/local/bin/gem install puppet --no-ri --no-rdoc || fail "Could not install puppet"
37
+
38
+ #Installing vagrant keys
39
+ mkdir /home/vagrant/.ssh
40
+ chmod 700 /home/vagrant/.ssh
41
+ cd /home/vagrant/.ssh
42
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
43
+ chown -R vagrant /home/vagrant/.ssh
44
+
45
+ #Installing the virtualbox guest additions
46
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
47
+ cd /tmp
48
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
49
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
50
+ sh /mnt/VBoxLinuxAdditions.run
51
+ umount /mnt
52
+
53
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
54
+
55
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
56
+ sed -i "s/^\(.*env_keep = \"\)/\1PATH /" /etc/sudoers
57
+
58
+ #poweroff -h
59
+
60
+ exit