Skip to content
This repository

V03 templ cent os 6.0 #221

Closed
wants to merge 10 commits into from

1 participant

Tom De Vylder
This page is out of date. Refresh to see the latest.

Showing 43 changed files with 438 additions and 42 deletions. Show diff stats Hide diff stats

  1. 13  templates/CentOS-6.0-i386-netboot/base.sh
  2. 2  templates/CentOS-6.0-i386-netboot/chef.sh
  3. 4  templates/CentOS-6.0-i386-netboot/cleanup.sh
  4. 34  templates/CentOS-6.0-i386-netboot/definition.rb
  5. 18  templates/CentOS-6.0-i386-netboot/postinstall.sh
  6. 11  templates/CentOS-6.0-i386-netboot/puppet.sh
  7. 2  templates/CentOS-6.0-i386-netboot/ruby.sh
  8. 9  templates/CentOS-6.0-i386-netboot/vagrant.sh
  9. 8  templates/CentOS-6.0-i386-netboot/virtualbox.sh
  10. 13  templates/CentOS-6.0-i386/base.sh
  11. 2  templates/CentOS-6.0-i386/chef.sh
  12. 4  templates/CentOS-6.0-i386/cleanup.sh
  13. 40  templates/CentOS-6.0-i386/definition.rb
  14. 11  templates/CentOS-6.0-i386/puppet.sh
  15. 2  templates/CentOS-6.0-i386/ruby.sh
  16. 9  templates/CentOS-6.0-i386/vagrant.sh
  17. 8  templates/CentOS-6.0-i386/virtualbox.sh
  18. 13  templates/CentOS-6.0-x86_64-minimal/base.sh
  19. 2  templates/CentOS-6.0-x86_64-minimal/chef.sh
  20. 4  templates/CentOS-6.0-x86_64-minimal/cleanup.sh
  21. 40  templates/CentOS-6.0-x86_64-minimal/definition.rb
  22. 8  templates/CentOS-6.0-x86_64-minimal/postinstall.sh
  23. 11  templates/CentOS-6.0-x86_64-minimal/puppet.sh
  24. 2  templates/CentOS-6.0-x86_64-minimal/ruby.sh
  25. 9  templates/CentOS-6.0-x86_64-minimal/vagrant.sh
  26. 8  templates/CentOS-6.0-x86_64-minimal/virtualbox.sh
  27. 13  templates/CentOS-6.0-x86_64-netboot/base.sh
  28. 2  templates/CentOS-6.0-x86_64-netboot/chef.sh
  29. 4  templates/CentOS-6.0-x86_64-netboot/cleanup.sh
  30. 37  templates/CentOS-6.0-x86_64-netboot/definition.rb
  31. 18  templates/CentOS-6.0-x86_64-netboot/postinstall.sh
  32. 11  templates/CentOS-6.0-x86_64-netboot/puppet.sh
  33. 2  templates/CentOS-6.0-x86_64-netboot/ruby.sh
  34. 9  templates/CentOS-6.0-x86_64-netboot/vagrant.sh
  35. 8  templates/CentOS-6.0-x86_64-netboot/virtualbox.sh
  36. 13  templates/CentOS-6.0-x86_64/base.sh
  37. 2  templates/CentOS-6.0-x86_64/chef.sh
  38. 4  templates/CentOS-6.0-x86_64/cleanup.sh
  39. 40  templates/CentOS-6.0-x86_64/definition.rb
  40. 11  templates/CentOS-6.0-x86_64/puppet.sh
  41. 2  templates/CentOS-6.0-x86_64/ruby.sh
  42. 9  templates/CentOS-6.0-x86_64/vagrant.sh
  43. 8  templates/CentOS-6.0-x86_64/virtualbox.sh
13  templates/CentOS-6.0-i386-netboot/base.sh
... ...
@@ -0,0 +1,13 @@
  1
+# Base install
  2
+
  3
+sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
  4
+
  5
+cat > /etc/yum.repos.d/epel.repo << EOM
  6
+[epel]
  7
+name=epel
  8
+baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
  9
+enabled=1
  10
+gpgcheck=0
  11
+EOM
  12
+
  13
+yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl
2  templates/CentOS-6.0-i386-netboot/chef.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Chef
  2
+gem install --no-ri --no-rdoc chef
4  templates/CentOS-6.0-i386-netboot/cleanup.sh
... ...
@@ -0,0 +1,4 @@
  1
+yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
  2
+yum -y clean all
  3
+rm -rf /etc/yum.repos.d/{puppetlabs,epel}.repo
  4
+rm -rf VBoxGuestAdditions_*.iso
34  templates/CentOS-6.0-i386-netboot/definition.rb
... ...
@@ -1,16 +1,38 @@
1 1
 Veewee::Definition.declare({
2 2
   :cpu_count => '1', :memory_size=> '392',
3  
-  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
  3
+  :disk_size => '10140',
  4
+  :disk_format => 'VDI',
  5
+  :hostiocache => 'off',
  6
+  :ioapic => 'on',
  7
+  :pae => 'on',
4 8
   :os_type_id => 'RedHat',
5 9
   :iso_file => "CentOS-6.0-i386-netinstall.iso",
6 10
   :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/i386/CentOS-6.0-i386-netinstall.iso",
7 11
   :iso_md5 => "65731c29c49630dea6cde103d02ccffb",
8 12
   :iso_download_timeout => 1000,
9  
-  :boot_wait => "15", :boot_cmd_sequence => [ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
10  
-  :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
11  
-  :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
12  
-  :ssh_host_port => "7222", :ssh_guest_port => "22",
  13
+  :boot_wait => "15",
  14
+  :boot_cmd_sequence => [ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
  15
+  :kickstart_port => "7122",
  16
+  :kickstart_timeout => 10000,
  17
+  :kickstart_file => "ks.cfg",
  18
+  :ssh_login_timeout => "10000",
  19
+  :ssh_user => "vagrant",
  20
+  :ssh_password => "vagrant",
  21
+  :ssh_key => "",
  22
+  :ssh_host_port => "7222",
  23
+  :ssh_guest_port => "22",
13 24
   :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
14 25
   :shutdown_cmd => "/sbin/halt -h -p",
15  
-  :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
  26
+  :postinstall_files => [
  27
+    "base.sh",
  28
+    "ruby.sh",
  29
+    "chef.sh",
  30
+    "puppet.sh",
  31
+    "vagrant.sh",
  32
+    "virtualbox.sh",
  33
+    "kvm.sh",
  34
+    "vmfusion.sh",
  35
+    "cleanup.sh"
  36
+  ],
  37
+  :postinstall_timeout => 10000
16 38
 })
18  templates/CentOS-6.0-i386-netboot/postinstall.sh
@@ -2,8 +2,26 @@
2 2
 
3 3
 date > /etc/vagrant_box_build_time
4 4
 
  5
+cat > /etc/yum.repos.d/puppetlabs.repo << EOM
  6
+[puppetlabs]
  7
+name=puppetlabs
  8
+baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
  9
+enabled=1
  10
+gpgcheck=0
  11
+EOM
  12
+
  13
+cat > /etc/yum.repos.d/epel.repo << EOM
  14
+[epel]
  15
+name=epel
  16
+baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
  17
+enabled=1
  18
+gpgcheck=0
  19
+EOM
  20
+
  21
+yum -y install puppet facter ruby-devel rubygems
5 22
 yum -y erase  gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
6 23
 yum -y clean all
  24
+rm /etc/yum.repos.d/{puppetlabs,epel}.repo
7 25
 
8 26
 gem install --no-ri --no-rdoc chef
9 27
 
11  templates/CentOS-6.0-i386-netboot/puppet.sh
... ...
@@ -0,0 +1,11 @@
  1
+# Install Puppet
  2
+
  3
+cat > /etc/yum.repos.d/puppetlabs.repo << EOM
  4
+[puppetlabs]
  5
+name=puppetlabs
  6
+baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
  7
+enabled=1
  8
+gpgcheck=0
  9
+EOM
  10
+
  11
+yum -y install puppet facter
2  templates/CentOS-6.0-i386-netboot/ruby.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Ruby
  2
+yum -y install ruby-devel rubygems
9  templates/CentOS-6.0-i386-netboot/vagrant.sh
... ...
@@ -0,0 +1,9 @@
  1
+# Vagrant specific
  2
+date > /etc/vagrant_box_build_time
  3
+
  4
+# Installing vagrant keys
  5
+mkdir /home/vagrant/.ssh
  6
+chmod 700 /home/vagrant/.ssh
  7
+cd /home/vagrant/.ssh
  8
+wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
  9
+chown -R vagrant /home/vagrant/.ssh
8  templates/CentOS-6.0-i386-netboot/virtualbox.sh
... ...
@@ -0,0 +1,8 @@
  1
+# Installing the virtualbox guest additions
  2
+VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
  3
+cd /tmp
  4
+wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
  5
+mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
  6
+sh /mnt/VBoxLinuxAdditions.run
  7
+umount /mnt
  8
+rm VBoxGuestAdditions_$VBOX_VERSION.iso
13  templates/CentOS-6.0-i386/base.sh
... ...
@@ -0,0 +1,13 @@
  1
+# Base install
  2
+
  3
+sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
  4
+
  5
+cat > /etc/yum.repos.d/epel.repo << EOM
  6
+[epel]
  7
+name=epel
  8
+baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
  9
+enabled=1
  10
+gpgcheck=0
  11
+EOM
  12
+
  13
+yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl
2  templates/CentOS-6.0-i386/chef.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Chef
  2
+gem install --no-ri --no-rdoc chef
4  templates/CentOS-6.0-i386/cleanup.sh
... ...
@@ -0,0 +1,4 @@
  1
+yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
  2
+yum -y clean all
  3
+rm -rf /etc/yum.repos.d/{puppetlabs,epel}.repo
  4
+rm -rf VBoxGuestAdditions_*.iso
40  templates/CentOS-6.0-i386/definition.rb
... ...
@@ -1,17 +1,41 @@
1 1
 Veewee::Definition.declare({
2  
-  :cpu_count => '1', :memory_size=> '384',
3  
-  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
  2
+  :cpu_count => '1',
  3
+  :memory_size=> '384',
  4
+  :disk_size => '10140',
  5
+  :disk_format => 'VDI',
  6
+  :hostiocache => 'off',
4 7
   :os_type_id => 'RedHat',
5  
-  :iso_file => "CentOS-6.0-i386-bin-DVD.iso", :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/i386/CentOS-6.0-i386-bin-DVD.iso", :iso_md5 => "d7e57d6edaca1556d5bad2fa88602309", :iso_download_timeout => 1000,
  8
+  :iso_file => "CentOS-6.0-i386-bin-DVD.iso",
  9
+  :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/i386/CentOS-6.0-i386-bin-DVD.iso",
  10
+  :iso_md5 => "d7e57d6edaca1556d5bad2fa88602309",
  11
+  :iso_download_timeout => 1000,
6 12
   :iso_download_instructions => "We can not download the ISO , you need to download it yourself and put it in the iso directory\n"+
7 13
   "- URL: http://isoredirect.centos.org/centos/6/isos/i386/",
8  
-  :boot_wait => "10", :boot_cmd_sequence => [
  14
+  :boot_wait => "10",
  15
+  :boot_cmd_sequence => [
9 16
     '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
10 17
   ],
11  
-  :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
12  
-  :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
13  
-  :ssh_host_port => "7222", :ssh_guest_port => "22",
  18
+  :kickstart_port => "7122",
  19
+  :kickstart_timeout => 10000,
  20
+  :kickstart_file => "ks.cfg",
  21
+  :ssh_login_timeout => "10000",
  22
+  :ssh_user => "vagrant",
  23
+  :ssh_password => "vagrant",
  24
+  :ssh_key => "",
  25
+  :ssh_host_port => "7222",
  26
+  :ssh_guest_port => "22",
14 27
   :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
15 28
   :shutdown_cmd => "/sbin/halt -h -p",
16  
-  :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
  29
+  :postinstall_files => [
  30
+    "base.sh",
  31
+    "ruby.sh",
  32
+    "chef.sh",
  33
+    "puppet.sh",
  34
+    "vagrant.sh",
  35
+    "virtualbox.sh",
  36
+    "kvm.sh",
  37
+    "vmfusion.sh",
  38
+    "cleanup.sh"
  39
+  ],
  40
+  :postinstall_timeout => 10000
17 41
 })
11  templates/CentOS-6.0-i386/puppet.sh
... ...
@@ -0,0 +1,11 @@
  1
+# Install Puppet
  2
+
  3
+cat > /etc/yum.repos.d/puppetlabs.repo << EOM
  4
+[puppetlabs]
  5
+name=puppetlabs
  6
+baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
  7
+enabled=1
  8
+gpgcheck=0
  9
+EOM
  10
+
  11
+yum -y install puppet facter
2  templates/CentOS-6.0-i386/ruby.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Ruby
  2
+yum -y install ruby-devel rubygems
9  templates/CentOS-6.0-i386/vagrant.sh
... ...
@@ -0,0 +1,9 @@
  1
+# Vagrant specific
  2
+date > /etc/vagrant_box_build_time
  3
+
  4
+# Installing vagrant keys
  5
+mkdir /home/vagrant/.ssh
  6
+chmod 700 /home/vagrant/.ssh
  7
+cd /home/vagrant/.ssh
  8
+wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
  9
+chown -R vagrant /home/vagrant/.ssh
8  templates/CentOS-6.0-i386/virtualbox.sh
... ...
@@ -0,0 +1,8 @@
  1
+# Installing the virtualbox guest additions
  2
+VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
  3
+cd /tmp
  4
+wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
  5
+mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
  6
+sh /mnt/VBoxLinuxAdditions.run
  7
+umount /mnt
  8
+rm VBoxGuestAdditions_$VBOX_VERSION.iso
13  templates/CentOS-6.0-x86_64-minimal/base.sh
... ...
@@ -0,0 +1,13 @@
  1
+# Base install
  2
+
  3
+sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
  4
+
  5
+cat > /etc/yum.repos.d/epel.repo << EOM
  6
+[epel]
  7
+name=epel
  8
+baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
  9
+enabled=1
  10
+gpgcheck=0
  11
+EOM
  12
+
  13
+yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl
2  templates/CentOS-6.0-x86_64-minimal/chef.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Chef
  2
+gem install --no-ri --no-rdoc chef
4  templates/CentOS-6.0-x86_64-minimal/cleanup.sh
... ...
@@ -0,0 +1,4 @@
  1
+yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
  2
+yum -y clean all
  3
+rm -rf /etc/yum.repos.d/{puppetlabs,epel}.repo
  4
+rm -rf VBoxGuestAdditions_*.iso
40  templates/CentOS-6.0-x86_64-minimal/definition.rb
... ...
@@ -1,17 +1,41 @@
1 1
 Veewee::Session.declare({
2  
-  :cpu_count => '1', :memory_size=> '384',
3  
-  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
  2
+  :cpu_count => '1',
  3
+  :memory_size=> '384',
  4
+  :disk_size => '10140',
  5
+  :disk_format => 'VDI',
  6
+  :hostiocache => 'off',
4 7
   :os_type_id => 'RedHat_64',
5  
-  :iso_file => "CentOS-6.0-x86_64-minimal.iso", :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-minimal.iso", :iso_md5 => "b9fff4dad7aad0edaa564d7a251cb971", :iso_download_timeout => 1000,
  8
+  :iso_file => "CentOS-6.0-x86_64-minimal.iso",
  9
+  :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-minimal.iso",
  10
+  :iso_md5 => "b9fff4dad7aad0edaa564d7a251cb971",
  11
+  :iso_download_timeout => 1000,
6 12
   :iso_download_instructions => "We can not download the ISO , you need to download it yourself and put it in the iso directory\n"+
7 13
   "- URL: http://isoredirect.centos.org/centos/6/isos/x86_64/ ",
8  
-  :boot_wait => "10", :boot_cmd_sequence => [
  14
+  :boot_wait => "10",
  15
+  :boot_cmd_sequence => [
9 16
     '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
10 17
   ],
11  
-  :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
12  
-  :ssh_login_timeout => "100", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
13  
-  :ssh_host_port => "7222", :ssh_guest_port => "22",
  18
+  :kickstart_port => "7122",
  19
+  :kickstart_timeout => 10000,
  20
+  :kickstart_file => "ks.cfg",
  21
+  :ssh_login_timeout => "100",
  22
+  :ssh_user => "vagrant",
  23
+  :ssh_password => "vagrant",
  24
+  :ssh_key => "",
  25
+  :ssh_host_port => "7222",
  26
+  :ssh_guest_port => "22",
14 27
   :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
15 28
   :shutdown_cmd => "/sbin/halt -h -p",
16  
-  :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
  29
+  :postinstall_files => [
  30
+    "base.sh",
  31
+    "ruby.sh",
  32
+    "chef.sh",
  33
+    "puppet.sh",
  34
+    "vagrant.sh",
  35
+    "virtualbox.sh",
  36
+    "kvm.sh",
  37
+    "vmfusion.sh",
  38
+    "cleanup.sh"
  39
+  ],
  40
+  :postinstall_timeout => 10000
17 41
 })
8  templates/CentOS-6.0-x86_64-minimal/postinstall.sh
@@ -2,8 +2,6 @@
2 2
 
3 3
 date > /etc/vagrant_box_build_time
4 4
 
5  
-yum -y install gcc make gcc-c++ ruby kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl
6  
-
7 5
 cat > /etc/yum.repos.d/puppetlabs.repo << EOM
8 6
 [puppetlabs]
9 7
 name=puppetlabs
@@ -21,6 +19,7 @@ gpgcheck=0
21 19
 EOM
22 20
 
23 21
 yum -y install puppet facter ruby-devel rubygems
  22
+yum -y erase  gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
24 23
 yum -y clean all
25 24
 rm /etc/yum.repos.d/{puppetlabs,epel}.repo
26 25
 
@@ -30,17 +29,16 @@ gem install --no-ri --no-rdoc chef
30 29
 mkdir /home/vagrant/.ssh
31 30
 chmod 700 /home/vagrant/.ssh
32 31
 cd /home/vagrant/.ssh
33  
-curl -L -o authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub
  32
+wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
34 33
 chown -R vagrant /home/vagrant/.ssh
35 34
 
36 35
 # Installing the virtualbox guest additions
37 36
 VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
38 37
 cd /tmp
39  
-curl -L -o VBoxGuestAdditions_$VBOX_VERSION.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
  38
+wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
40 39
 mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
41 40
 sh /mnt/VBoxLinuxAdditions.run
42 41
 umount /mnt
43  
-
44 42
 rm VBoxGuestAdditions_$VBOX_VERSION.iso
45 43
 
46 44
 sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
11  templates/CentOS-6.0-x86_64-minimal/puppet.sh
... ...
@@ -0,0 +1,11 @@
  1
+# Install Puppet
  2
+
  3
+cat > /etc/yum.repos.d/puppetlabs.repo << EOM
  4
+[puppetlabs]
  5
+name=puppetlabs
  6
+baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
  7
+enabled=1
  8
+gpgcheck=0
  9
+EOM
  10
+
  11
+yum -y install puppet facter
2  templates/CentOS-6.0-x86_64-minimal/ruby.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Ruby
  2
+yum -y install ruby-devel rubygems
9  templates/CentOS-6.0-x86_64-minimal/vagrant.sh
... ...
@@ -0,0 +1,9 @@
  1
+# Vagrant specific
  2
+date > /etc/vagrant_box_build_time
  3
+
  4
+# Installing vagrant keys
  5
+mkdir /home/vagrant/.ssh
  6
+chmod 700 /home/vagrant/.ssh
  7
+cd /home/vagrant/.ssh
  8
+wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
  9
+chown -R vagrant /home/vagrant/.ssh
8  templates/CentOS-6.0-x86_64-minimal/virtualbox.sh
... ...
@@ -0,0 +1,8 @@
  1
+# Installing the virtualbox guest additions
  2
+VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
  3
+cd /tmp
  4
+wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
  5
+mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
  6
+sh /mnt/VBoxLinuxAdditions.run
  7
+umount /mnt
  8
+rm VBoxGuestAdditions_$VBOX_VERSION.iso
13  templates/CentOS-6.0-x86_64-netboot/base.sh
... ...
@@ -0,0 +1,13 @@
  1
+# Base install
  2
+
  3
+sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
  4
+
  5
+cat > /etc/yum.repos.d/epel.repo << EOM
  6
+[epel]
  7
+name=epel
  8
+baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
  9
+enabled=1
  10
+gpgcheck=0
  11
+EOM
  12
+
  13
+yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl
2  templates/CentOS-6.0-x86_64-netboot/chef.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Chef
  2
+gem install --no-ri --no-rdoc chef
4  templates/CentOS-6.0-x86_64-netboot/cleanup.sh
... ...
@@ -0,0 +1,4 @@
  1
+yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
  2
+yum -y clean all
  3
+rm -rf /etc/yum.repos.d/{puppetlabs,epel}.repo
  4
+rm -rf VBoxGuestAdditions_*.iso
37  templates/CentOS-6.0-x86_64-netboot/definition.rb
... ...
@@ -1,16 +1,39 @@
1 1
 Veewee::Definition.declare({
2  
-  :cpu_count => '1', :memory_size=> '392',
3  
-  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
  2
+  :cpu_count => '1',
  3
+  :memory_size=> '392',
  4
+  :disk_size => '10140',
  5
+  :disk_format => 'VDI',
  6
+  :hostiocache => 'off',
  7
+  :ioapic => 'on',
  8
+  :pae => 'on',
4 9
   :os_type_id => 'RedHat_64',
5 10
   :iso_file => "CentOS-6.0-x86_64-netinstall.iso",
6 11
   :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-netinstall.iso",
7 12
   :iso_md5 => "d13da95c29e585ee15cf403b89468243",
8 13
   :iso_download_timeout => 1000,
9  
-  :boot_wait => "15", :boot_cmd_sequence => [ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
10  
-  :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
11  
-  :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
12  
-  :ssh_host_port => "7222", :ssh_guest_port => "22",
  14
+  :boot_wait => "15",
  15
+  :boot_cmd_sequence => [ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
  16
+  :kickstart_port => "7122",
  17
+  :kickstart_timeout => 10000,
  18
+  :kickstart_file => "ks.cfg",
  19
+  :ssh_login_timeout => "10000",
  20
+  :ssh_user => "vagrant",
  21
+  :ssh_password => "vagrant",
  22
+  :ssh_key => "",
  23
+  :ssh_host_port => "7222",
  24
+  :ssh_guest_port => "22",
13 25
   :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
14 26
   :shutdown_cmd => "/sbin/halt -h -p",
15  
-  :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
  27
+  :postinstall_files => [
  28
+    "base.sh",
  29
+    "ruby.sh",
  30
+    "chef.sh",
  31
+    "puppet.sh",
  32
+    "vagrant.sh",
  33
+    "virtualbox.sh",
  34
+    "kvm.sh",
  35
+    "vmfusion.sh",
  36
+    "cleanup.sh"
  37
+  ],
  38
+  :postinstall_timeout => 10000
16 39
 })
18  templates/CentOS-6.0-x86_64-netboot/postinstall.sh
@@ -2,8 +2,26 @@
2 2
 
3 3
 date > /etc/vagrant_box_build_time
4 4
 
  5
+cat > /etc/yum.repos.d/puppetlabs.repo << EOM
  6
+[puppetlabs]
  7
+name=puppetlabs
  8
+baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
  9
+enabled=1
  10
+gpgcheck=0
  11
+EOM
  12
+
  13
+cat > /etc/yum.repos.d/epel.repo << EOM
  14
+[epel]
  15
+name=epel
  16
+baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
  17
+enabled=1
  18
+gpgcheck=0
  19
+EOM
  20
+
  21
+yum -y install puppet facter ruby-devel rubygems
5 22
 yum -y erase  gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
6 23
 yum -y clean all
  24
+rm /etc/yum.repos.d/{puppetlabs,epel}.repo
7 25
 
8 26
 gem install --no-ri --no-rdoc chef
9 27
 
11  templates/CentOS-6.0-x86_64-netboot/puppet.sh
... ...
@@ -0,0 +1,11 @@
  1
+# Install Puppet
  2
+
  3
+cat > /etc/yum.repos.d/puppetlabs.repo << EOM
  4
+[puppetlabs]
  5
+name=puppetlabs
  6
+baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
  7
+enabled=1
  8
+gpgcheck=0
  9
+EOM
  10
+
  11
+yum -y install puppet facter
2  templates/CentOS-6.0-x86_64-netboot/ruby.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Ruby
  2
+yum -y install ruby-devel rubygems
9  templates/CentOS-6.0-x86_64-netboot/vagrant.sh
... ...
@@ -0,0 +1,9 @@
  1
+# Vagrant specific
  2
+date > /etc/vagrant_box_build_time
  3
+
  4
+# Installing vagrant keys
  5
+mkdir /home/vagrant/.ssh
  6
+chmod 700 /home/vagrant/.ssh
  7
+cd /home/vagrant/.ssh
  8
+wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
  9
+chown -R vagrant /home/vagrant/.ssh
8  templates/CentOS-6.0-x86_64-netboot/virtualbox.sh
... ...
@@ -0,0 +1,8 @@
  1
+# Installing the virtualbox guest additions
  2
+VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
  3
+cd /tmp
  4
+wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
  5
+mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
  6
+sh /mnt/VBoxLinuxAdditions.run
  7
+umount /mnt
  8
+rm VBoxGuestAdditions_$VBOX_VERSION.iso
13  templates/CentOS-6.0-x86_64/base.sh
... ...
@@ -0,0 +1,13 @@
  1
+# Base install
  2
+
  3
+sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
  4
+
  5
+cat > /etc/yum.repos.d/epel.repo << EOM
  6
+[epel]
  7
+name=epel
  8
+baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
  9
+enabled=1
  10
+gpgcheck=0
  11
+EOM
  12
+
  13
+yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl
2  templates/CentOS-6.0-x86_64/chef.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Chef
  2
+gem install --no-ri --no-rdoc chef
4  templates/CentOS-6.0-x86_64/cleanup.sh
... ...
@@ -0,0 +1,4 @@
  1
+yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
  2
+yum -y clean all
  3
+rm -rf /etc/yum.repos.d/{puppetlabs,epel}.repo
  4
+rm -rf VBoxGuestAdditions_*.iso
40  templates/CentOS-6.0-x86_64/definition.rb
... ...
@@ -1,17 +1,41 @@
1 1
 Veewee::Definition.declare({
2  
-  :cpu_count => '1', :memory_size=> '384',
3  
-  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
  2
+  :cpu_count => '1',
  3
+  :memory_size=> '384',
  4
+  :disk_size => '10140',
  5
+  :disk_format => 'VDI',
  6
+  :hostiocache => 'off',
4 7
   :os_type_id => 'RedHat_64',
5  
-  :iso_file => "CentOS-6.0-x86_64-bin-DVD1.iso", :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-bin-DVD1.iso", :iso_md5 => "7c148e0a1b330186adef66ee3e2d433d", :iso_download_timeout => 1000,
  8
+  :iso_file => "CentOS-6.0-x86_64-bin-DVD1.iso",
  9
+  :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-bin-DVD1.iso",
  10
+  :iso_md5 => "7c148e0a1b330186adef66ee3e2d433d",
  11
+  :iso_download_timeout => 1000,
6 12
   :iso_download_instructions => "We can not download the ISO , you need to download it yourself and put it in the iso directory\n"+
7 13
   "- URL: http://isoredirect.centos.org/centos/6/isos/x86_64/ ",
8  
-  :boot_wait => "10", :boot_cmd_sequence => [
  14
+  :boot_wait => "10",
  15
+  :boot_cmd_sequence => [
9 16
     '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
10 17
   ],
11  
-  :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
12  
-  :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
13  
-  :ssh_host_port => "7222", :ssh_guest_port => "22",
  18
+  :kickstart_port => "7122",
  19
+  :kickstart_timeout => 10000,
  20
+  :kickstart_file => "ks.cfg",
  21
+  :ssh_login_timeout => "10000",
  22
+  :ssh_user => "vagrant",
  23
+  :ssh_password => "vagrant",
  24
+  :ssh_key => "",
  25
+  :ssh_host_port => "7222",
  26
+  :ssh_guest_port => "22",
14 27
   :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
15 28
   :shutdown_cmd => "/sbin/halt -h -p",
16  
-  :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
  29
+  :postinstall_files => [
  30
+    "base.sh",
  31
+    "ruby.sh",
  32
+    "chef.sh",
  33
+    "puppet.sh",
  34
+    "vagrant.sh",
  35
+    "virtualbox.sh",
  36
+    "kvm.sh",
  37
+    "vmfusion.sh",
  38
+    "cleanup.sh"
  39
+  ],
  40
+  :postinstall_timeout => 10000
17 41
 })
11  templates/CentOS-6.0-x86_64/puppet.sh
... ...
@@ -0,0 +1,11 @@
  1
+# Install Puppet
  2
+
  3
+cat > /etc/yum.repos.d/puppetlabs.repo << EOM
  4
+[puppetlabs]
  5
+name=puppetlabs
  6
+baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
  7
+enabled=1
  8
+gpgcheck=0
  9
+EOM
  10
+
  11
+yum -y install puppet facter
2  templates/CentOS-6.0-x86_64/ruby.sh
... ...
@@ -0,0 +1,2 @@
  1
+# Install Ruby
  2
+yum -y install ruby-devel rubygems
9  templates/CentOS-6.0-x86_64/vagrant.sh
... ...
@@ -0,0 +1,9 @@
  1
+# Vagrant specific
  2
+date > /etc/vagrant_box_build_time
  3
+
  4
+# Installing vagrant keys
  5
+mkdir /home/vagrant/.ssh
  6
+chmod 700 /home/vagrant/.ssh
  7
+cd /home/vagrant/.ssh
  8
+wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
  9
+chown -R vagrant /home/vagrant/.ssh
8  templates/CentOS-6.0-x86_64/virtualbox.sh
... ...
@@ -0,0 +1,8 @@
  1
+# Installing the virtualbox guest additions
  2
+VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
  3
+cd /tmp
  4
+wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
  5
+mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
  6
+sh /mnt/VBoxLinuxAdditions.run
  7
+umount /mnt
  8
+rm VBoxGuestAdditions_$VBOX_VERSION.iso
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.