veewee 0.1.29 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/Gemfile.lock +23 -29
  2. data/lib/veewee/session.rb +10 -7
  3. data/lib/veewee/ssh.rb +70 -42
  4. data/lib/veewee/version.rb +1 -1
  5. data/templates/CentOS-4.8-i386/postinstall.sh +2 -0
  6. data/templates/CentOS-5.6-i386-netboot/postinstall.sh +3 -1
  7. data/templates/CentOS-5.6-i386/postinstall.sh +3 -1
  8. data/templates/CentOS-5.6-x86_64-netboot/postinstall.sh +2 -0
  9. data/templates/CentOS-6.0-i386-netboot/definition.rb +16 -0
  10. data/templates/CentOS-6.0-i386-netboot/ks.cfg +52 -0
  11. data/templates/CentOS-6.0-i386-netboot/postinstall.sh +30 -0
  12. data/templates/CentOS-6.0-i386/definition.rb +17 -0
  13. data/templates/CentOS-6.0-i386/ks.cfg +47 -0
  14. data/templates/CentOS-6.0-i386/postinstall.sh +48 -0
  15. data/templates/CentOS-6.0-x86_64-netboot/definition.rb +16 -0
  16. data/templates/CentOS-6.0-x86_64-netboot/ks.cfg +52 -0
  17. data/templates/CentOS-6.0-x86_64-netboot/postinstall.sh +30 -0
  18. data/templates/CentOS-6.0-x86_64/definition.rb +17 -0
  19. data/templates/CentOS-6.0-x86_64/ks.cfg +47 -0
  20. data/templates/CentOS-6.0-x86_64/postinstall.sh +48 -0
  21. data/templates/Debian-5.0.8-amd64-netboot/postinstall.sh +2 -0
  22. data/templates/Debian-5.0.8-i386-netboot/postinstall.sh +2 -0
  23. data/templates/Debian-6.0.2-amd64-netboot/postinstall.sh +2 -0
  24. data/templates/Debian-6.0.2-i386-netboot/postinstall.sh +2 -0
  25. data/templates/Fedora-14-amd64-netboot/postinstall.sh +2 -0
  26. data/templates/Fedora-14-amd64/postinstall.sh +2 -0
  27. data/templates/Fedora-14-i386-netboot/postinstall.sh +2 -0
  28. data/templates/Fedora-14-i386/postinstall.sh +2 -0
  29. data/templates/Fedora-15-i386-netboot/definition.rb +17 -0
  30. data/templates/Fedora-15-i386-netboot/ks.cfg +82 -0
  31. data/templates/Fedora-15-i386-netboot/postinstall.sh +18 -0
  32. data/templates/Fedora-15-i386/definition.rb +17 -0
  33. data/templates/Fedora-15-i386/ks.cfg +64 -0
  34. data/templates/Fedora-15-i386/postinstall.sh +33 -0
  35. data/templates/archlinux-i386/aif.cfg +33 -0
  36. data/templates/archlinux-i386/definition.rb +29 -0
  37. data/templates/archlinux-i386/postinstall.sh +95 -0
  38. data/templates/archlinux-x86_64/aif.cfg +33 -0
  39. data/templates/{archlinux-64-aif-experimental → archlinux-x86_64}/definition.rb +7 -7
  40. data/templates/archlinux-x86_64/postinstall.sh +95 -0
  41. data/templates/freebsd-8.2-experimental/postinstall.sh +3 -1
  42. data/templates/freebsd-8.2-pcbsd-i386-netboot/postinstall.sh +2 -0
  43. data/templates/freebsd-8.2-pcbsd-i386/postinstall.sh +2 -0
  44. data/templates/gentoo-latest-i386-experimental/postinstall.sh +2 -0
  45. data/templates/openindiana-148-ai-x86/postinstall.sh +2 -0
  46. data/templates/opensuse-11.4-i386-experimental/postinstall.sh +1 -0
  47. data/templates/solaris-11-express-i386/postinstall.sh +2 -0
  48. data/templates/ubuntu-10.04.2-amd64-netboot/postinstall.sh +4 -2
  49. data/templates/ubuntu-10.04.2-server-amd64-alt/definition.rb +57 -0
  50. data/templates/ubuntu-10.04.2-server-amd64-alt/postinstall.sh +249 -0
  51. data/templates/ubuntu-10.04.2-server-amd64-alt/preseed.cfg +124 -0
  52. data/templates/ubuntu-10.04.2-server-amd64/definition.rb +56 -23
  53. data/templates/ubuntu-10.04.2-server-amd64/postinstall.sh +4 -2
  54. data/templates/ubuntu-10.04.2-server-i386-netboot/postinstall.sh +4 -2
  55. data/templates/ubuntu-10.04.2-server-i386/postinstall.sh +3 -1
  56. data/templates/ubuntu-10.10-server-amd64-netboot/postinstall.sh +4 -2
  57. data/templates/ubuntu-10.10-server-amd64/postinstall.sh +3 -1
  58. data/templates/ubuntu-10.10-server-i386-netboot/postinstall.sh +4 -2
  59. data/templates/ubuntu-10.10-server-i386/postinstall.sh +4 -2
  60. data/templates/ubuntu-11.04-server-amd64/postinstall.sh +4 -2
  61. data/templates/ubuntu-11.04-server-i386/postinstall.sh +4 -2
  62. data/templates/ubuntu-8.04.4-server-amd64/postinstall.sh +2 -0
  63. data/templates/ubuntu-8.04.4-server-i386/postinstall.sh +3 -1
  64. data/validation/features/steps/ssh_steps.rb +22 -8
  65. data/veewee.gemspec +2 -2
  66. metadata +40 -21
  67. data/templates/archlinux-64-aif-experimental/postinstall.sh +0 -6
  68. data/templates/archlinux-64-experimental/autorun0 +0 -6
  69. data/templates/archlinux-64-experimental/definition.rb +0 -21
  70. data/templates/archlinux-64-experimental/postinstall.sh +0 -190
  71. data/templates/archlinux-i686/autorun0 +0 -6
  72. data/templates/archlinux-i686/definition.rb +0 -21
  73. data/templates/archlinux-i686/postinstall.sh +0 -191
@@ -0,0 +1,17 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '384',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
4
+ :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,
6
+ :iso_download_instructions => "We can not download the ISO , you need to download it yourself and put it in the iso directory\n"+
7
+ "- URL: http://isoredirect.centos.org/centos/6/isos/i386/",
8
+ :boot_wait => "10", :boot_cmd_sequence => [
9
+ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
10
+ ],
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",
14
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
15
+ :shutdown_cmd => "/sbin/halt -h -p",
16
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
17
+ })
@@ -0,0 +1,47 @@
1
+ install
2
+ cdrom
3
+ lang en_US.UTF-8
4
+ keyboard us
5
+ network --bootproto=dhcp
6
+ rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
7
+ firewall --enabled --service=ssh
8
+ authconfig --enableshadow --passalgo=sha512
9
+ selinux --disabled
10
+ timezone Europe/Brussels
11
+ bootloader --location=mbr
12
+
13
+ text
14
+ skipx
15
+ zerombr
16
+
17
+ clearpart --all --initlabel
18
+ autopart
19
+
20
+ auth --useshadow --enablemd5
21
+ firstboot --disabled
22
+ reboot
23
+
24
+ repo --name=updates --baseurl=http://mirror.centos.org/centos/6/updates/i386 --includepkgs='ruby' --excludepkgs='*'
25
+
26
+ %packages --ignoremissing
27
+ @core
28
+ ruby
29
+ kernel-devel-`uname -r`
30
+ gcc
31
+ bzip2
32
+ make
33
+ gcc-c++
34
+ zlib-devel
35
+ openssl-devel
36
+ readline-devel
37
+ sqlite-devel
38
+
39
+ -ipw2100-firmware
40
+ -ipw2200-firmware
41
+ -ivtv-firmware
42
+
43
+ %post
44
+ /usr/sbin/groupadd vagrant
45
+ /usr/sbin/useradd vagrant -g vagrant -G wheel
46
+ echo "vagrant"|passwd --stdin vagrant
47
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
@@ -0,0 +1,48 @@
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
+ cat > /etc/yum.repos.d/puppetlabs.repo << EOM
6
+ [puppetlabs]
7
+ name=puppetlabs
8
+ baseurl=http://stahnma.fedorapeople.org/puppetlabs/6/\$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
22
+ yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
23
+ yum -y clean all
24
+ rm /etc/yum.repos.d/{puppetlabs,epel}.repo
25
+
26
+ gem install --no-ri --no-rdoc chef
27
+
28
+ # Installing vagrant keys
29
+ mkdir /home/vagrant/.ssh
30
+ chmod 700 /home/vagrant/.ssh
31
+ cd /home/vagrant/.ssh
32
+ wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
33
+ chown -R vagrant /home/vagrant/.ssh
34
+
35
+ # Installing the virtualbox guest additions
36
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
37
+ cd /tmp
38
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
39
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
40
+ sh /mnt/VBoxLinuxAdditions.run
41
+ umount /mnt
42
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
43
+
44
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
45
+
46
+ dd if=/dev/zero of=/tmp/clean || rm /tmp/clean
47
+
48
+ exit
@@ -0,0 +1,16 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '392',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
4
+ :os_type_id => 'RedHat_64',
5
+ :iso_file => "CentOS-6.0-x86_64-netinstall.iso",
6
+ :iso_src => "http://be.mirror.eurid.eu/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-netinstall.iso",
7
+ :iso_md5 => "d13da95c29e585ee15cf403b89468243",
8
+ :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 => "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,52 @@
1
+ install
2
+ url --url=http://be.mirror.eurid.eu/centos/6.0/os/x86_64/
3
+ lang en_US.UTF-8
4
+ keyboard us
5
+ network --bootproto dhcp
6
+ rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
7
+ firewall --enabled --trust eth0 --ssh
8
+ authconfig --enableshadow --enablemd5
9
+ selinux --disabled
10
+ timezone Europe/Brussels
11
+ bootloader --location=mbr
12
+
13
+ text
14
+ skipx
15
+ zerombr
16
+
17
+ clearpart --all --initlabel
18
+ autopart
19
+
20
+ auth --useshadow --enablemd5
21
+ firstboot --disabled
22
+ reboot
23
+
24
+ repo --name=epel --baseurl=http://download.fedora.redhat.com/pub/epel/6/x86_64/ --includepkgs='ruby-augeas,ruby-shadow'
25
+ repo --name=puppetlabs --baseurl=http://stahnma.fedorapeople.org/puppetlabs/6/x86_64 --includepkgs='puppet,facter'
26
+
27
+ %packages
28
+ @ core
29
+ ruby
30
+ ruby-devel
31
+ rubygems
32
+ kernel-devel
33
+ gcc
34
+ gcc-c++
35
+ bzip2
36
+ make
37
+ zlib-devel
38
+ openssl-devel
39
+ readline-devel
40
+ sqlite-devel
41
+ puppet
42
+ facter
43
+
44
+ -ipw2100-firmware
45
+ -ipw2200-firmware
46
+ -ivtv-firmware
47
+
48
+ %post
49
+ /usr/sbin/groupadd vagrant
50
+ /usr/sbin/useradd vagrant -g vagrant -G wheel
51
+ echo "vagrant"|passwd --stdin vagrant
52
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
@@ -0,0 +1,30 @@
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
+ yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
6
+ yum -y clean all
7
+
8
+ gem install --no-ri --no-rdoc chef
9
+
10
+ # Installing vagrant keys
11
+ mkdir /home/vagrant/.ssh
12
+ chmod 700 /home/vagrant/.ssh
13
+ cd /home/vagrant/.ssh
14
+ wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
15
+ chown -R vagrant /home/vagrant/.ssh
16
+
17
+ # Installing the virtualbox guest additions
18
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
19
+ cd /tmp
20
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
21
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
22
+ sh /mnt/VBoxLinuxAdditions.run
23
+ umount /mnt
24
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
25
+
26
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
27
+
28
+ dd if=/dev/zero of=/tmp/clean || rm /tmp/clean
29
+
30
+ exit
@@ -0,0 +1,17 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '384',
3
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
4
+ :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,
6
+ :iso_download_instructions => "We can not download the ISO , you need to download it yourself and put it in the iso directory\n"+
7
+ "- URL: http://isoredirect.centos.org/centos/6/isos/x86_64/ ",
8
+ :boot_wait => "10", :boot_cmd_sequence => [
9
+ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
10
+ ],
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",
14
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
15
+ :shutdown_cmd => "/sbin/halt -h -p",
16
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
17
+ })
@@ -0,0 +1,47 @@
1
+ install
2
+ cdrom
3
+ lang en_US.UTF-8
4
+ keyboard us
5
+ network --bootproto=dhcp
6
+ rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
7
+ firewall --enabled --service=ssh
8
+ authconfig --enableshadow --passalgo=sha512
9
+ selinux --disabled
10
+ timezone Europe/Brussels
11
+ bootloader --location=mbr
12
+
13
+ text
14
+ skipx
15
+ zerombr
16
+
17
+ clearpart --all --initlabel
18
+ autopart
19
+
20
+ auth --useshadow --enablemd5
21
+ firstboot --disabled
22
+ reboot
23
+
24
+ repo --name=updates --baseurl=http://mirror.centos.org/centos/6/updates/x86_64 --includepkgs='ruby' --excludepkgs='*'
25
+
26
+ %packages --ignoremissing
27
+ @core
28
+ ruby
29
+ kernel-devel-`uname -r`
30
+ gcc
31
+ bzip2
32
+ make
33
+ gcc-c++
34
+ zlib-devel
35
+ openssl-devel
36
+ readline-devel
37
+ sqlite-devel
38
+
39
+ -ipw2100-firmware
40
+ -ipw2200-firmware
41
+ -ivtv-firmware
42
+
43
+ %post
44
+ /usr/sbin/groupadd vagrant
45
+ /usr/sbin/useradd vagrant -g vagrant -G wheel
46
+ echo "vagrant"|passwd --stdin vagrant
47
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
@@ -0,0 +1,48 @@
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
+ cat > /etc/yum.repos.d/puppetlabs.repo << EOM
6
+ [puppetlabs]
7
+ name=puppetlabs
8
+ baseurl=http://stahnma.fedorapeople.org/puppetlabs/6/\$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
22
+ yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
23
+ yum -y clean all
24
+ rm /etc/yum.repos.d/{puppetlabs,epel}.repo
25
+
26
+ gem install --no-ri --no-rdoc chef
27
+
28
+ # Installing vagrant keys
29
+ mkdir /home/vagrant/.ssh
30
+ chmod 700 /home/vagrant/.ssh
31
+ cd /home/vagrant/.ssh
32
+ wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
33
+ chown -R vagrant /home/vagrant/.ssh
34
+
35
+ # Installing the virtualbox guest additions
36
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
37
+ cd /tmp
38
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
39
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
40
+ sh /mnt/VBoxLinuxAdditions.run
41
+ umount /mnt
42
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
43
+
44
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
45
+
46
+ dd if=/dev/zero of=/tmp/clean || rm /tmp/clean
47
+
48
+ exit
@@ -1,3 +1,5 @@
1
+ date > /etc/vagrant_box_build_time
2
+
1
3
  #Updating the box
2
4
  apt-get -y update
3
5
  apt-get -y install linux-headers-$(uname -r) build-essential
@@ -1,3 +1,5 @@
1
+ date > /etc/vagrant_box_build_time
2
+
1
3
  #Updating the box
2
4
  apt-get -y update
3
5
  apt-get -y install linux-headers-$(uname -r) build-essential
@@ -1,5 +1,7 @@
1
1
  #http://adrianbravo.tumblr.com/post/644860401
2
2
 
3
+ date > /etc/vagrant_box_build_time
4
+
3
5
  #Updating the box
4
6
  apt-get -y update
5
7
  apt-get -y install linux-headers-$(uname -r) build-essential
@@ -1,5 +1,7 @@
1
1
  #http://adrianbravo.tumblr.com/post/644860401
2
2
 
3
+ date > /etc/vagrant_box_build_time
4
+
3
5
  # Update the box
4
6
  apt-get -y update
5
7
  apt-get -y install linux-headers-$(uname -r) build-essential
@@ -1,6 +1,8 @@
1
1
  #http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
2
2
  #kernel source is needed for vbox additions
3
3
 
4
+ date > /etc/vagrant_box_build_time
5
+
4
6
  yum -y install gcc bzip2 make patch kernel-devel-`uname -r`
5
7
 
6
8
  #yum -y update
@@ -1,6 +1,8 @@
1
1
  #http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
2
2
  #kernel source is needed for vbox additions
3
3
 
4
+ date > /etc/vagrant_box_build_time
5
+
4
6
  yum -y install gcc bzip2 make patch kernel-devel-`uname -r`
5
7
 
6
8
  #yum -y update
@@ -1,6 +1,8 @@
1
1
  #http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
2
2
  #kernel source is needed for vbox additions
3
3
 
4
+ date > /etc/vagrant_box_build_time
5
+
4
6
  yum -y install gcc bzip2 make patch kernel-devel-`uname -r`
5
7
 
6
8
  #yum -y update
@@ -1,6 +1,8 @@
1
1
  #http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
2
2
  #kernel source is needed for vbox additions
3
3
 
4
+ date > /etc/vagrant_box_build_time
5
+
4
6
  yum -y install gcc bzip2 make patch kernel-devel-`uname -r`
5
7
 
6
8
  #yum -y update
@@ -0,0 +1,17 @@
1
+ Veewee::Session.declare({
2
+ # Minimum RAM requirement for installation is 640MB.
3
+ :cpu_count => '1', :memory_size=> '640',
4
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :hwvirtext => 'on',
5
+ :os_type_id => 'Fedora',
6
+ :iso_file => "Fedora-15-i386-netinst.iso",
7
+ :iso_src => "http://download.fedoraproject.org/pub/fedora/linux/releases/15/Fedora/i386/iso/Fedora-15-i386-netinst.iso",
8
+ :iso_md5 => "9a91492ac84dde9ceff0cb346a079487",
9
+ :iso_download_timeout => 1000,
10
+ :boot_wait => "10", :boot_cmd_sequence => [ '<Tab> linux text ks=http://%IP%:%PORT%/ks.cfg<Enter><Enter>' ],
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",
14
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
15
+ :shutdown_cmd => "/sbin/halt -h -p",
16
+ :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000
17
+ })
@@ -0,0 +1,82 @@
1
+ # Kickstart file automatically generated by anaconda.
2
+
3
+ install
4
+ cdrom
5
+ lang en_US.UTF-8
6
+ keyboard us
7
+ network --onboot yes --device p2p1 --bootproto dhcp --noipv6
8
+ timezone --utc America/Los_Angeles
9
+ rootpw --iscrypted $6$n/NGsk5H2aiBMXL4$r/oPkJtB5rasvQHPo9AvIJBe6sNVlQbpZxvTRMN7.qZk/Sn9u2qZ0XgNxflUvK20y7OIWdr/vv7MED6gzkBiH0
10
+ selinux --enforcing
11
+ authconfig --enableshadow --passalgo=sha512
12
+ firewall --service=ssh
13
+ # The following is the partition information you requested
14
+ # Note that any partitions you deleted are not expressed
15
+ # here so unless you clear all partitions first, this is
16
+ # not guaranteed to work
17
+ clearpart --all --drives=sda --initlabel
18
+
19
+ part /boot --fstype=ext4 --size=500
20
+ part pv.2 --grow --size=500
21
+
22
+ volgroup vg_vagrant --pesize=32768 pv.2
23
+ logvol / --fstype=ext4 --name=lv_root --vgname=vg_vagrant --size=1024 --grow
24
+ logvol swap --fstype=swap --name=lv_swap --vgname=vg_vagrant --size=528 --grow --maxsize=1056
25
+ bootloader --location=mbr --driveorder=sda --append="norhgb"
26
+ repo --name="Fedora 15 - i386" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-15&arch=i386 --cost=1000
27
+ repo --name="Fedora 15 - i386 - Updates" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f15&arch=i386 --cost=1000
28
+ services --enabled network
29
+ reboot
30
+
31
+ %packages
32
+ @core
33
+ @online-docs
34
+
35
+ # Requirements for vagrant
36
+ kernel-PAE-devel
37
+ kernel-headers
38
+ make
39
+ gcc
40
+
41
+ # For puppet
42
+ puppet
43
+
44
+ # For Chef
45
+ ruby-devel
46
+ rubygems
47
+ rubygem-erubis
48
+ rubygem-highline
49
+ rubygem-json
50
+ rubygem-mime-types
51
+ rubygem-net-ssh
52
+ rubygem-polyglot
53
+ rubygem-rest-client
54
+ rubygem-treetop
55
+ rubygem-uuidtools
56
+ %end
57
+
58
+ %post
59
+ # Make ssh quicker in disconnected situations.
60
+ echo 'UseDNS no' >> /etc/ssh/sshd_config
61
+
62
+ # Add Vagrant user and group.
63
+ /usr/sbin/groupadd vagrant
64
+ /usr/sbin/useradd vagrant -g vagrant
65
+ echo "vagrant"|passwd --stdin vagrant
66
+
67
+ # Give Vagrant user permission to sudo.
68
+ echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant
69
+ echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant
70
+ chmod 440 /etc/sudoers.d/vagrant
71
+
72
+ # Install chef.
73
+ gem install chef --no-ri --no-rdoc
74
+
75
+ # Install vagrant authorized ssh key.
76
+ mkdir /home/vagrant/.ssh
77
+ curl -L 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' > /home/vagrant/.ssh/authorized_keys
78
+ chown vagrant:vagrant -R /home/vagrant/.ssh
79
+ chmod 700 /home/vagrant/.ssh
80
+ chmod 600 /home/vagrant/.ssh/authorized_keys
81
+ chcon -R unconfined_u:object_r:user_home_t:s0 /home/vagrant/.ssh
82
+ %end