veewee 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/Gemfile +4 -0
  2. data/README.md +1 -1
  3. data/doc/definition.md +18 -0
  4. data/doc/kvm.md +28 -1
  5. data/doc/template.md +53 -2
  6. data/lib/veewee/command/fusion.rb +37 -3
  7. data/lib/veewee/command/vagrant/basebox.rb +2 -0
  8. data/lib/veewee/command/vagrant/winrm.rb +39 -0
  9. data/lib/veewee/command/vbox.rb +18 -0
  10. data/lib/veewee/definition.rb +13 -3
  11. data/lib/veewee/error.rb +3 -0
  12. data/lib/veewee/provider/core/box.rb +7 -0
  13. data/lib/veewee/provider/core/box/build.rb +34 -14
  14. data/lib/veewee/provider/core/box/copy.rb +17 -0
  15. data/lib/veewee/provider/core/box/exec.rb +31 -12
  16. data/lib/veewee/provider/core/box/floppy.rb +1 -0
  17. data/lib/veewee/provider/core/box/halt.rb +7 -3
  18. data/lib/veewee/provider/core/box/validate_tags.rb +8 -2
  19. data/lib/veewee/provider/core/box/wincp.rb +120 -0
  20. data/lib/veewee/provider/core/box/winrm.rb +59 -0
  21. data/lib/veewee/provider/core/helper/comm.rb +47 -0
  22. data/lib/veewee/provider/core/helper/web.rb +20 -9
  23. data/lib/veewee/provider/core/helper/winrm.rb +167 -0
  24. data/lib/veewee/provider/kvm/box/create.rb +59 -3
  25. data/lib/veewee/provider/kvm/provider.rb +6 -6
  26. data/lib/veewee/provider/parallels/box/helper/buildinfo.rb +1 -1
  27. data/lib/veewee/provider/virtualbox/box.rb +1 -0
  28. data/lib/veewee/provider/virtualbox/box/build.rb +4 -2
  29. data/lib/veewee/provider/virtualbox/box/create.rb +32 -12
  30. data/lib/veewee/provider/virtualbox/box/helper/buildinfo.rb +6 -3
  31. data/lib/veewee/provider/virtualbox/box/helper/create.rb +20 -5
  32. data/lib/veewee/provider/virtualbox/box/helper/winrm_options.rb +31 -0
  33. data/lib/veewee/provider/virtualbox/box/up.rb +33 -12
  34. data/lib/veewee/provider/virtualbox/box/winrm.rb +13 -0
  35. data/lib/veewee/provider/vmfusion/box.rb +2 -0
  36. data/lib/veewee/provider/vmfusion/box/add_share.rb +18 -0
  37. data/lib/veewee/provider/vmfusion/box/build.rb +3 -1
  38. data/lib/veewee/provider/vmfusion/box/create.rb +7 -2
  39. data/lib/veewee/provider/vmfusion/box/helper/buildinfo.rb +9 -6
  40. data/lib/veewee/provider/vmfusion/box/helper/ip.rb +1 -1
  41. data/lib/veewee/provider/vmfusion/box/helper/winrm_options.rb +21 -0
  42. data/lib/veewee/provider/vmfusion/box/template.rb +7 -3
  43. data/lib/veewee/provider/vmfusion/box/template.vmx.erb +6 -0
  44. data/lib/veewee/provider/vmfusion/box/winrm.rb +12 -0
  45. data/lib/veewee/provider/vmfusion/provider.rb +7 -1
  46. data/lib/veewee/version.rb +1 -1
  47. data/templates/CentOS-5.6-x86_64-netboot-packages/definition.rb +16 -0
  48. data/templates/CentOS-5.6-x86_64-netboot-packages/ks.cfg +47 -0
  49. data/templates/CentOS-5.6-x86_64-netboot-packages/postinstall.sh +61 -0
  50. data/templates/Debian-7.0-b3-amd64-netboot/base.sh +27 -0
  51. data/templates/Debian-7.0-b3-amd64-netboot/chef.sh +2 -0
  52. data/templates/Debian-7.0-b3-amd64-netboot/cleanup-virtualbox.sh +4 -0
  53. data/templates/Debian-7.0-b3-amd64-netboot/cleanup.sh +17 -0
  54. data/templates/Debian-7.0-b3-amd64-netboot/definition.rb +51 -0
  55. data/templates/Debian-7.0-b3-amd64-netboot/preseed.cfg +313 -0
  56. data/templates/Debian-7.0-b3-amd64-netboot/puppet.sh +2 -0
  57. data/templates/Debian-7.0-b3-amd64-netboot/ruby.sh +10 -0
  58. data/templates/Debian-7.0-b3-amd64-netboot/vagrant.sh +25 -0
  59. data/templates/Debian-7.0-b3-amd64-netboot/virtualbox.sh +13 -0
  60. data/templates/Debian-7.0-b3-amd64-netboot/zerodisk.sh +3 -0
  61. data/templates/Fedora-18-i386/definition.rb +17 -0
  62. data/templates/Fedora-18-i386/ks.cfg +75 -0
  63. data/templates/Fedora-18-i386/postinstall.sh +38 -0
  64. data/templates/Fedora-18-x86_64/definition.rb +17 -0
  65. data/templates/Fedora-18-x86_64/ks.cfg +75 -0
  66. data/templates/Fedora-18-x86_64/postinstall.sh +38 -0
  67. data/templates/OracleLinux-6.3-x86_64-DVD/base.sh +30 -0
  68. data/templates/OracleLinux-6.3-x86_64-DVD/chef.sh +3 -0
  69. data/templates/OracleLinux-6.3-x86_64-DVD/cleanup.sh +5 -0
  70. data/templates/OracleLinux-6.3-x86_64-DVD/definition.rb +40 -0
  71. data/templates/OracleLinux-6.3-x86_64-DVD/ks.cfg +42 -0
  72. data/templates/OracleLinux-6.3-x86_64-DVD/puppet.sh +12 -0
  73. data/templates/OracleLinux-6.3-x86_64-DVD/ruby.sh +3 -0
  74. data/templates/OracleLinux-6.3-x86_64-DVD/vagrant.sh +18 -0
  75. data/templates/OracleLinux-6.3-x86_64-DVD/virtualbox.sh +8 -0
  76. data/templates/OracleLinux-6.3-x86_64-DVD/zerodisk.sh +3 -0
  77. data/templates/funtoo-latest-x86_64/definition.rb +37 -0
  78. data/templates/funtoo-latest-x86_64/postinstall.sh +401 -0
  79. data/templates/openbsd50_amd64/definition.rb +3 -2
  80. data/templates/openbsd50_amd64/postinstall.sh +4 -4
  81. data/templates/openbsd50_i386/definition.rb +4 -4
  82. data/templates/openbsd52_amd64/README +28 -0
  83. data/templates/openbsd52_amd64/definition.rb +85 -0
  84. data/templates/openbsd52_amd64/postinstall.sh +81 -0
  85. data/templates/openbsd52_i386/README +28 -0
  86. data/templates/openbsd52_i386/definition.rb +85 -0
  87. data/templates/openbsd52_i386/postinstall.sh +81 -0
  88. data/templates/windows-2008R1-serverstandard-amd64/Autounattend.xml +6 -6
  89. data/templates/windows-2008R1-serverweb-amd64/install-winrm.bat +1 -1
  90. data/templates/windows-2008R2-serverstandard-amd64-winrm/Autounattend.xml +224 -0
  91. data/templates/windows-2008R2-serverstandard-amd64-winrm/README.md +87 -0
  92. data/templates/windows-2008R2-serverstandard-amd64-winrm/definition.rb +33 -0
  93. data/templates/windows-2008R2-serverstandard-amd64-winrm/install-chef.bat +2 -0
  94. data/templates/windows-2008R2-serverstandard-amd64-winrm/install-vbox.bat +4 -0
  95. data/templates/windows-2008R2-serverstandard-amd64-winrm/oracle-cert.cer +0 -0
  96. data/templates/windows-2008R2-serverstandard-amd64-winrm/postinstall.sh +74 -0
  97. data/templates/windows-7-enterprise-amd64-winrm/Autounattend.xml +227 -0
  98. data/templates/windows-7-enterprise-amd64-winrm/README.md +52 -0
  99. data/templates/windows-7-enterprise-amd64-winrm/definition.rb +27 -0
  100. data/templates/windows-7-enterprise-amd64-winrm/install-chef.bat +2 -0
  101. data/templates/windows-7-enterprise-amd64-winrm/install-fusion.bat +18 -0
  102. data/templates/windows-7-enterprise-amd64-winrm/install-puppet.bat +4 -0
  103. data/templates/windows-7-enterprise-amd64-winrm/install-vbox.bat +4 -0
  104. data/templates/windows-7-enterprise-amd64-winrm/oracle-cert.cer +0 -0
  105. data/templates/windows-7-enterprise-amd64-winrm/postinstall.bat +74 -0
  106. data/validation/veewee-windows.feature +34 -0
  107. data/veewee.gemspec +1 -1
  108. metadata +73 -7
@@ -0,0 +1,13 @@
1
+ if test -f .vbox_version ; then
2
+ # The netboot installs the VirtualBox support (old) so we have to remove it
3
+ /etc/init.d/virtualbox-ose-guest-utils stop
4
+ rmmod vboxguest
5
+ aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils
6
+
7
+ # Install the VirtualBox guest additions
8
+ VBOX_VERSION=$(cat .vbox_version)
9
+ VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso
10
+ mount -o loop $VBOX_ISO /mnt
11
+ yes|sh /mnt/VBoxLinuxAdditions.run
12
+ umount /mnt
13
+ fi
@@ -0,0 +1,3 @@
1
+ # Zero out the free space to save space in the final image:
2
+ dd if=/dev/zero of=/EMPTY bs=1M
3
+ rm -f /EMPTY
@@ -0,0 +1,17 @@
1
+ Veewee::Session.declare({
2
+ # Minimum RAM requirement for installation is 768MB.
3
+ :cpu_count => '1', :memory_size=> '768',
4
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :hwvirtext => 'on',
5
+ :os_type_id => 'Fedora',
6
+ :iso_file => "Fedora-18-Beta-TC9-i386-DVD.iso",
7
+ :iso_src => "http://dl.fedoraproject.org/pub/alt/stage/18-Beta-TC9/Fedora/i386/iso/Fedora-18-Beta-TC9-i386-DVD.iso",
8
+ :iso_md5 => "a673a3c4fa6fd731a7caeef75e3ca729",
9
+ :iso_download_timeout => 1000,
10
+ :boot_wait => "10", :boot_cmd_sequence => [ '<Tab> linux text biosdevname=0 ks=http://%IP%:%PORT%/ks.cfg<Enter><Enter>' ],
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",
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,75 @@
1
+ # Kickstart file automatically generated by anaconda.
2
+
3
+ install
4
+ cdrom
5
+ lang en_US.UTF-8
6
+ keyboard 'us'
7
+ # note we set biosdevname=0 when launching install
8
+ # this means we will be using standard ethernet devices, e.g. eth[0,1,2] eth
9
+ network --onboot yes --device eth0 --bootproto dhcp --noipv6
10
+ timezone --utc America/New_York
11
+ rootpw --iscrypted $6$n/NGsk5H2aiBMXL4$r/oPkJtB5rasvQHPo9AvIJBe6sNVlQbpZxvTRMN7.qZk/Sn9u2qZ0XgNxflUvK20y7OIWdr/vv7MED6gzkBiH0
12
+ selinux --enforcing
13
+ auth --enableshadow --passalgo=sha512
14
+ firewall --service=ssh
15
+
16
+ # Avoiding warning message on Storage device breaking automated generation
17
+ zerombr
18
+
19
+ # The following is the partition information you requested
20
+ # Note that any partitions you deleted are not expressed
21
+ # here so unless you clear all partitions first, this is
22
+ # not guaranteed to work
23
+ clearpart --all --drives=sda --initlabel
24
+
25
+ #part biosboot --fstype=biosboot --size=1
26
+ part /boot --fstype=ext4 --size=500
27
+ part pv.2 --grow --size=500
28
+
29
+ volgroup vg_vagrant --pesize=32768 pv.2
30
+ logvol / --fstype=ext4 --name=lv_root --vgname=vg_vagrant --size=1024 --grow
31
+ logvol swap --fstype=swap --name=lv_swap --vgname=vg_vagrant --size=528 --grow --maxsize=1056
32
+ bootloader --location=mbr --driveorder=sda --append="norhgb biosdevname=0"
33
+ # Disable remote repositories, as this is a non-netinst install.
34
+ #repo --name="Fedora 17 - x86_64" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-17&arch=x86_64 --cost=1000
35
+ #repo --name="Fedora 17 - x86_64 - Updates" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f17&arch=x86_64 --cost=1000
36
+ services --enabled network
37
+ reboot
38
+
39
+ %packages
40
+ @core
41
+
42
+ # Requirements for vagrant
43
+ kernel-devel
44
+ kernel-headers
45
+ make
46
+ gcc
47
+ %end
48
+
49
+ %post
50
+ # Make ssh quicker in disconnected situations.
51
+ echo 'UseDNS no' >> /etc/ssh/sshd_config
52
+
53
+ # Disable udev persistent net rules
54
+ # We do this so that we do not persist rules mapped to virtual machines
55
+ # instances created from this basebox.
56
+ ln -s /dev/null /etc/udev/rule.d/70-persistent-net.rules
57
+
58
+ # Add Vagrant user and group.
59
+ /usr/sbin/groupadd vagrant
60
+ /usr/sbin/useradd vagrant -g vagrant
61
+ echo "vagrant"|passwd --stdin vagrant
62
+
63
+ # Give Vagrant user permission to sudo.
64
+ echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant
65
+ echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant
66
+ chmod 440 /etc/sudoers.d/vagrant
67
+
68
+ # Install vagrant authorized ssh key.
69
+ mkdir /home/vagrant/.ssh
70
+ curl -L 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' > /home/vagrant/.ssh/authorized_keys
71
+ chown vagrant:vagrant -R /home/vagrant/.ssh
72
+ chmod 700 /home/vagrant/.ssh
73
+ chmod 600 /home/vagrant/.ssh/authorized_keys
74
+ chcon -R unconfined_u:object_r:user_home_t:s0 /home/vagrant/.ssh
75
+ %end
@@ -0,0 +1,38 @@
1
+ #!/bin/sh
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
6
+
7
+ yum -y update
8
+
9
+ yum -y install \
10
+ ruby \
11
+ ruby-devel \
12
+ puppet \
13
+ rubygems \
14
+ rubygem-erubis \
15
+ rubygem-highline \
16
+ rubygem-json \
17
+ rubygem-mime-types \
18
+ rubygem-net-ssh \
19
+ rubygem-polyglot \
20
+ rubygem-rest-client \
21
+ rubygem-treetop \
22
+ rubygem-uuidtools \
23
+ wget \
24
+ tar \
25
+ bzip2
26
+
27
+ cd /tmp
28
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
29
+ mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
30
+ sh /mnt/VBoxLinuxAdditions.run
31
+ umount /mnt
32
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
33
+
34
+ gem install chef --no-rdoc --no-ri
35
+
36
+ exit
37
+
38
+ # EOF
@@ -0,0 +1,17 @@
1
+ Veewee::Session.declare({
2
+ # Minimum RAM requirement for installation is 768MB.
3
+ :cpu_count => '1', :memory_size=> '768',
4
+ :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :hwvirtext => 'on',
5
+ :os_type_id => 'Fedora_64',
6
+ :iso_file => "Fedora-18-Beta-TC9-x86_64-DVD.iso",
7
+ :iso_src => "http://dl.fedoraproject.org/pub/alt/stage/18-Beta-TC9/Fedora/x86_64/iso/Fedora-18-Beta-TC9-x86_64-DVD.iso",
8
+ :iso_md5 => "4bc92931769a3cff344d706385cfaf77",
9
+ :iso_download_timeout => 1000,
10
+ :boot_wait => "10", :boot_cmd_sequence => [ '<Tab> linux text biosdevname=0 ks=http://%IP%:%PORT%/ks.cfg<Enter><Enter>' ],
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",
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,75 @@
1
+ # Kickstart file automatically generated by anaconda.
2
+
3
+ install
4
+ cdrom
5
+ lang en_US.UTF-8
6
+ keyboard 'us'
7
+ # note we set biosdevname=0 when launching install
8
+ # this means we will be using standard ethernet devices, e.g. eth[0,1,2] eth
9
+ network --onboot yes --device eth0 --bootproto dhcp --noipv6
10
+ timezone --utc America/New_York
11
+ rootpw --iscrypted $6$n/NGsk5H2aiBMXL4$r/oPkJtB5rasvQHPo9AvIJBe6sNVlQbpZxvTRMN7.qZk/Sn9u2qZ0XgNxflUvK20y7OIWdr/vv7MED6gzkBiH0
12
+ selinux --enforcing
13
+ auth --enableshadow --passalgo=sha512
14
+ firewall --service=ssh
15
+
16
+ # Avoiding warning message on Storage device breaking automated generation
17
+ zerombr
18
+
19
+ # The following is the partition information you requested
20
+ # Note that any partitions you deleted are not expressed
21
+ # here so unless you clear all partitions first, this is
22
+ # not guaranteed to work
23
+ clearpart --all --drives=sda --initlabel
24
+
25
+ #part biosboot --fstype=biosboot --size=1
26
+ part /boot --fstype=ext4 --size=500
27
+ part pv.2 --grow --size=500
28
+
29
+ volgroup vg_vagrant --pesize=32768 pv.2
30
+ logvol / --fstype=ext4 --name=lv_root --vgname=vg_vagrant --size=1024 --grow
31
+ logvol swap --fstype=swap --name=lv_swap --vgname=vg_vagrant --size=528 --grow --maxsize=1056
32
+ bootloader --location=mbr --driveorder=sda --append="norhgb biosdevname=0"
33
+ # Disable remote repositories, as this is a non-netinst install.
34
+ #repo --name="Fedora 17 - x86_64" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-17&arch=x86_64 --cost=1000
35
+ #repo --name="Fedora 17 - x86_64 - Updates" --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f17&arch=x86_64 --cost=1000
36
+ services --enabled network
37
+ reboot
38
+
39
+ %packages
40
+ @core
41
+
42
+ # Requirements for vagrant
43
+ kernel-devel
44
+ kernel-headers
45
+ make
46
+ gcc
47
+ %end
48
+
49
+ %post
50
+ # Make ssh quicker in disconnected situations.
51
+ echo 'UseDNS no' >> /etc/ssh/sshd_config
52
+
53
+ # Disable udev persistent net rules
54
+ # We do this so that we do not persist rules mapped to virtual machines
55
+ # instances created from this basebox.
56
+ ln -s /dev/null /etc/udev/rule.d/70-persistent-net.rules
57
+
58
+ # Add Vagrant user and group.
59
+ /usr/sbin/groupadd vagrant
60
+ /usr/sbin/useradd vagrant -g vagrant
61
+ echo "vagrant"|passwd --stdin vagrant
62
+
63
+ # Give Vagrant user permission to sudo.
64
+ echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant
65
+ echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant
66
+ chmod 440 /etc/sudoers.d/vagrant
67
+
68
+ # Install vagrant authorized ssh key.
69
+ mkdir /home/vagrant/.ssh
70
+ curl -L 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' > /home/vagrant/.ssh/authorized_keys
71
+ chown vagrant:vagrant -R /home/vagrant/.ssh
72
+ chmod 700 /home/vagrant/.ssh
73
+ chmod 600 /home/vagrant/.ssh/authorized_keys
74
+ chcon -R unconfined_u:object_r:user_home_t:s0 /home/vagrant/.ssh
75
+ %end
@@ -0,0 +1,38 @@
1
+ #!/bin/sh
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
6
+
7
+ yum -y update
8
+
9
+ yum -y install \
10
+ ruby \
11
+ ruby-devel \
12
+ puppet \
13
+ rubygems \
14
+ rubygem-erubis \
15
+ rubygem-highline \
16
+ rubygem-json \
17
+ rubygem-mime-types \
18
+ rubygem-net-ssh \
19
+ rubygem-polyglot \
20
+ rubygem-rest-client \
21
+ rubygem-treetop \
22
+ rubygem-uuidtools \
23
+ wget \
24
+ tar \
25
+ bzip2
26
+
27
+ cd /tmp
28
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
29
+ mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
30
+ sh /mnt/VBoxLinuxAdditions.run
31
+ umount /mnt
32
+ rm VBoxGuestAdditions_$VBOX_VERSION.iso
33
+
34
+ gem install chef --no-rdoc --no-ri
35
+
36
+ exit
37
+
38
+ # EOF
@@ -0,0 +1,30 @@
1
+ # Base install
2
+
3
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
4
+
5
+ cat > /etc/yum.repos.d/public-yum-ol6.repo << EOM
6
+ [ol6_u3_base]
7
+ name=Oracle Linux $releasever Update 3 installation media copy (\$basearch)
8
+ baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/3/base/\$basearch/
9
+ gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
10
+ gpgcheck=1
11
+ enabled=1
12
+
13
+ [ol6_UEK_latest]
14
+ name=Latest Unbreakable Enterprise Kernel for Oracle Linux \$releasever (\$basearch)
15
+ baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/\$basearch/
16
+ gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
17
+ gpgcheck=1
18
+ enabled=1
19
+ EOM
20
+
21
+ cat > /etc/yum.repos.d/epel.repo << EOM
22
+ [epel]
23
+ name=epel
24
+ baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
25
+ enabled=1
26
+ gpgcheck=0
27
+ EOM
28
+
29
+ yum -y install gcc make gcc-c++ kernel-devel-`uname -r` kernel-uek-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget
30
+
@@ -0,0 +1,3 @@
1
+ # Install Chef
2
+ gem install --no-ri --no-rdoc chef
3
+
@@ -0,0 +1,5 @@
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
5
+
@@ -0,0 +1,40 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1',
3
+ :memory_size=> '480',
4
+ :disk_size => '10140',
5
+ :disk_format => 'VDI',
6
+ :hostiocache => 'off',
7
+ :os_type_id => 'RedHat_64',
8
+ :iso_file => "OracleLinux-R6-U3-Server-x86_64-dvd.iso",
9
+ :iso_src => "http://mirrors.wimmekes.net/pub/OracleLinux/OL6/U3/x86_64/OracleLinux-R6-U3-Server-x86_64-dvd.iso",
10
+ :iso_md5 => "7daae91cc0437f6a98a4359ad9706d678a9f19de",
11
+ :iso_download_timeout => 1000,
12
+ :boot_wait => "10",
13
+ :boot_cmd_sequence => [
14
+ '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
15
+ ],
16
+ :kickstart_port => "7122",
17
+ :kickstart_timeout => 10000,
18
+ :kickstart_file => "ks.cfg",
19
+ :ssh_login_timeout => "10000",
20
+ :ssh_user => "veewee",
21
+ :ssh_password => "veewee",
22
+ :ssh_key => "",
23
+ :ssh_host_port => "7222",
24
+ :ssh_guest_port => "22",
25
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
26
+ :shutdown_cmd => "/sbin/halt -h -p",
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
+ "zerodisk.sh"
38
+ ],
39
+ :postinstall_timeout => 10000
40
+ })
@@ -0,0 +1,42 @@
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 UTC
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
+ %packages --ignoremissing
25
+ @core
26
+ bzip2
27
+ kernel-devel
28
+ kernel-headers
29
+ -ipw2100-firmware
30
+ -ipw2200-firmware
31
+ -ivtv-firmware
32
+ %end
33
+
34
+ %post
35
+ /usr/bin/yum -y install sudo
36
+ /usr/sbin/groupadd veewee
37
+ /usr/sbin/useradd veewee -g veewee -G wheel
38
+ echo "veewee"|passwd --stdin veewee
39
+ echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
40
+ chmod 0440 /etc/sudoers.d/veewee
41
+ %end
42
+
@@ -0,0 +1,12 @@
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
12
+
@@ -0,0 +1,3 @@
1
+ # Install Ruby
2
+ yum -y install ruby ruby-devel rubygems
3
+
@@ -0,0 +1,18 @@
1
+ # Vagrant specific
2
+ date > /etc/vagrant_box_build_time
3
+
4
+ # Add vagrant user
5
+ /usr/sbin/groupadd vagrant
6
+ /usr/sbin/useradd vagrant -g vagrant -G wheel
7
+ echo "vagrant"|passwd --stdin vagrant
8
+ echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
9
+ chmod 0440 /etc/sudoers.d/vagrant
10
+
11
+ # Installing vagrant keys
12
+ mkdir -pm 700 /home/vagrant/.ssh
13
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
14
+ chmod 0600 /home/vagrant/.ssh/authorized_keys
15
+ chown -R vagrant /home/vagrant/.ssh
16
+
17
+ # Customize the message of the day
18
+ echo 'Welcome to your Vagrant-built virtual machine.' > /etc/motd