veewee 0.5.0.alpha3 → 0.5.0.alpha4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +5 -13
  2. data/doc/installation.md +2 -2
  3. data/lib/veewee/provider/core/box/validate_tags.rb +6 -0
  4. data/lib/veewee/provider/core/helper/web.rb +1 -1
  5. data/lib/veewee/version.rb +1 -1
  6. data/templates/CentOS-5.10/definition.yml +1 -1
  7. data/templates/CentOS-5.10/{ks.cfg → ks.cfg.erb} +0 -0
  8. data/templates/{CentOS-6.5-x86_64-minimal → CentOS-6.5}/base.sh +1 -1
  9. data/templates/CentOS-6.5/centos_32_minimal.yml +4 -0
  10. data/templates/CentOS-6.5/centos_32_netboot.yml +5 -0
  11. data/templates/CentOS-6.5/centos_64_minimal.yml +5 -0
  12. data/templates/CentOS-6.5/centos_64_netboot.yml +5 -0
  13. data/templates/{CentOS-6.5-i386-minimal → CentOS-6.5}/chef.sh +0 -0
  14. data/templates/{CentOS-6.5-i386-minimal → CentOS-6.5}/cleanup.sh +0 -0
  15. data/templates/CentOS-6.5/definition.rb +5 -0
  16. data/templates/CentOS-6.5/definition.yml +32 -0
  17. data/templates/{CentOS-6.5-x86_64-netboot/ks.cfg → CentOS-6.5/ks.cfg.erb} +7 -1
  18. data/templates/{CentOS-6.5-i386-minimal → CentOS-6.5}/puppet.sh +0 -0
  19. data/templates/{CentOS-6.5-i386-netboot → CentOS-6.5}/ruby.sh +0 -0
  20. data/templates/{CentOS-6.5-i386-minimal → CentOS-6.5}/vagrant.sh +0 -0
  21. data/templates/{CentOS-6.5-i386-minimal → CentOS-6.5}/virtualbox.sh +0 -0
  22. data/templates/{CentOS-6.5-i386-minimal → CentOS-6.5}/vmfusion.sh +0 -0
  23. data/templates/{CentOS-6.5-i386-minimal → CentOS-6.5}/zerodisk.sh +0 -0
  24. data/templates/OSX/postinstall.sh +8 -8
  25. data/templates/archlinux-x86_64/vagrant.sh +1 -1
  26. metadata +64 -90
  27. data/templates/CentOS-6.5-i386-minimal/base.sh +0 -16
  28. data/templates/CentOS-6.5-i386-minimal/definition.rb +0 -38
  29. data/templates/CentOS-6.5-i386-minimal/ks.cfg +0 -37
  30. data/templates/CentOS-6.5-i386-netboot/base.sh +0 -16
  31. data/templates/CentOS-6.5-i386-netboot/cfengine.sh +0 -69
  32. data/templates/CentOS-6.5-i386-netboot/chef.sh +0 -4
  33. data/templates/CentOS-6.5-i386-netboot/cleanup.sh +0 -8
  34. data/templates/CentOS-6.5-i386-netboot/definition.rb +0 -40
  35. data/templates/CentOS-6.5-i386-netboot/ks.cfg +0 -41
  36. data/templates/CentOS-6.5-i386-netboot/puppet.sh +0 -18
  37. data/templates/CentOS-6.5-i386-netboot/vagrant.sh +0 -18
  38. data/templates/CentOS-6.5-i386-netboot/virtualbox.sh +0 -8
  39. data/templates/CentOS-6.5-i386-netboot/vmfusion.sh +0 -10
  40. data/templates/CentOS-6.5-i386-netboot/zerodisk.sh +0 -3
  41. data/templates/CentOS-6.5-x86_64-minimal/chef.sh +0 -4
  42. data/templates/CentOS-6.5-x86_64-minimal/cleanup.sh +0 -8
  43. data/templates/CentOS-6.5-x86_64-minimal/definition.rb +0 -38
  44. data/templates/CentOS-6.5-x86_64-minimal/ks.cfg +0 -37
  45. data/templates/CentOS-6.5-x86_64-minimal/puppet.sh +0 -18
  46. data/templates/CentOS-6.5-x86_64-minimal/vagrant.sh +0 -18
  47. data/templates/CentOS-6.5-x86_64-minimal/virtualbox.sh +0 -8
  48. data/templates/CentOS-6.5-x86_64-minimal/vmfusion.sh +0 -10
  49. data/templates/CentOS-6.5-x86_64-minimal/zerodisk.sh +0 -3
  50. data/templates/CentOS-6.5-x86_64-netboot/base.sh +0 -16
  51. data/templates/CentOS-6.5-x86_64-netboot/chef.sh +0 -4
  52. data/templates/CentOS-6.5-x86_64-netboot/cleanup.sh +0 -8
  53. data/templates/CentOS-6.5-x86_64-netboot/definition.rb +0 -38
  54. data/templates/CentOS-6.5-x86_64-netboot/puppet.sh +0 -18
  55. data/templates/CentOS-6.5-x86_64-netboot/vagrant.sh +0 -18
  56. data/templates/CentOS-6.5-x86_64-netboot/virtualbox.sh +0 -8
  57. data/templates/CentOS-6.5-x86_64-netboot/vmfusion.sh +0 -10
  58. data/templates/CentOS-6.5-x86_64-netboot/zerodisk.sh +0 -3
@@ -1,16 +0,0 @@
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 wget dkms nfs-utils
14
-
15
- # Make ssh faster by not waiting on DNS
16
- echo "UseDNS no" >> /etc/ssh/sshd_config
@@ -1,38 +0,0 @@
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',
8
- :iso_file => "CentOS-6.5-i386-minimal.iso",
9
- :iso_src => "http://yum.singlehop.com/CentOS/6.5/isos/i386/CentOS-6.5-i386-minimal.iso",
10
- :iso_md5 => "a4f27ab51d0d2c9d36b68c56b39f752b",
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 => 300,
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
- "chef.sh",
30
- "puppet.sh",
31
- "vagrant.sh",
32
- #"vmfusion.sh",
33
- "virtualbox.sh",
34
- "cleanup.sh",
35
- "zerodisk.sh"
36
- ],
37
- :postinstall_timeout => 10000
38
- })
@@ -1,37 +0,0 @@
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 --nobase
25
- @core
26
- openssh-clients
27
- %end
28
-
29
- %post
30
- /usr/bin/yum -y install sudo
31
- /usr/sbin/groupadd veewee
32
- /usr/sbin/useradd veewee -g veewee -G wheel
33
- echo "veewee"|passwd --stdin veewee
34
- echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
35
- chmod 0440 /etc/sudoers.d/veewee
36
- %end
37
-
@@ -1,16 +0,0 @@
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=https://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 wget dkms
14
-
15
- # Make ssh faster by not waiting on DNS
16
- echo "UseDNS no" >> /etc/ssh/sshd_config
@@ -1,69 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Lets not install untrusted packages to manage our infrastructure
4
- Trusted_GPG_Fingerprint="EF49F970C3D4AEF5E557FB6D8D5A7684F97E94BE"
5
- GPGURL="http://cfengine.com/pub/gpg.key"
6
- GPGKEY="/tmp/cfengine_gpg.key"
7
- YUMREPO="http://cfengine.com/pub/yum"
8
-
9
-
10
-
11
- function main
12
- {
13
- configure_repo
14
- retrieve_GPGKEY
15
- validate_GPGKEY
16
- install_GPGKEY
17
- install_cfengine
18
- }
19
-
20
- function configure_repo
21
- {
22
- # Install Yum Client Repository Definition
23
- cat > /etc/yum.repos.d/cfengine.repo << EOM && return 0 || return 1
24
- [cfengine]
25
- name=cfengine
26
- baseurl=$YUMREPO
27
- enabled=1
28
- gpgcheck=1
29
- EOM
30
- }
31
-
32
- function retrieve_GPGKEY
33
- {
34
- # Retrieve, validate, and install GPGKEY
35
- curl --silent --output $GPGKEY $GPGURL
36
- Found_GPG_Fingerprint=$(gpg --quiet --with-fingerprint $GPGKEY | grep fingerprint | cut -d "=" -f2 | sed 's/ //g')
37
- }
38
-
39
- function validate_GPGKEY
40
- {
41
- if [ "$Found_GPG_Fingerprint" = "$Trusted_GPG_Fingerprint" ]; then
42
- echo "Trusting Retrieved Key: $GPGURL"
43
- return 0
44
- else
45
- return 1
46
- fi
47
- }
48
-
49
- function install_GPGKEY
50
- {
51
- # We want to avoid possibly importing keys unnecissarily if they are already installed
52
- keyid=$(echo $(gpg --throw-keyids < $GPGKEY) | cut --characters=11-18 | tr [A-Z] [a-z])
53
- if ! rpm -q gpg-pubkey-$keyid > /dev/null 2>&1 ; then
54
- echo "Installing GPG public key with ID $keyid from $GPGKEY..."
55
- rpm --import $GPGKEY && return 0 || return 1
56
- else
57
- # Found key already installed
58
- return 0
59
- fi
60
- }
61
-
62
- function install_cfengine
63
- {
64
- yum -y install cfengine-community && return 0 || return 1
65
- }
66
-
67
- main
68
-
69
-
@@ -1,4 +0,0 @@
1
- # Install Chef
2
- gem install --no-ri --no-rdoc mime-types -v '1.16'
3
- gem install --no-ri --no-rdoc chef
4
-
@@ -1,8 +0,0 @@
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
-
6
- # Remove traces of mac address from network configuration
7
- sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0
8
- rm /etc/udev/rules.d/70-persistent-net.rules
@@ -1,40 +0,0 @@
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',
8
- :iso_file => "CentOS-6.5-i386-netinstall.iso",
9
- :iso_src => "http://yum.singlehop.com/CentOS/6.5/isos/i386/CentOS-6.5-i386-netinstall.iso",
10
- :iso_md5 => "427309de36d518db9f72fc14d5d257df",
11
- :iso_download_timeout => 1000,
12
- :boot_wait => "15",
13
- :boot_cmd_sequence => [
14
- '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'
15
- ],
16
- :kickstart_port => "7122",
17
- :kickstart_timeout => 300,
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
- })
@@ -1,41 +0,0 @@
1
- install
2
- url --url=http://mirror.symnds.com/distributions/CentOS-vault/6.5/os/i386/
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
@@ -1,18 +0,0 @@
1
- # Install Puppet
2
-
3
- cat > /etc/yum.repos.d/puppetlabs.repo << EOM
4
- [puppetlabs-dependencies]
5
- name=puppetlabdsdependencies
6
- baseurl=http://yum.puppetlabs.com/el/6/dependencies/\$basearch
7
- enabled=1
8
- gpgcheck=0
9
-
10
- [puppetlabs]
11
- name=puppetlabs
12
- baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
13
- enabled=1
14
- gpgcheck=0
15
- EOM
16
-
17
- yum -y install puppet facter ruby-shadow
18
-
@@ -1,18 +0,0 @@
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
@@ -1,8 +0,0 @@
1
- # Installing the virtualbox guest additions
2
- VBOX_VERSION=$(cat /home/veewee/.vbox_version)
3
- cd /tmp
4
- mount -o loop /home/veewee/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
5
- sh /mnt/VBoxLinuxAdditions.run
6
- umount /mnt
7
- rm -rf /home/veewee/VBoxGuestAdditions_*.iso
8
-
@@ -1,10 +0,0 @@
1
- # vmware-vmblock-fuse requires libfuse.so
2
- yum -y install fuse-libs
3
-
4
- cd /tmp
5
- mkdir -p /mnt/cdrom
6
- mount -o loop /home/veewee/linux.iso /mnt/cdrom
7
- tar zxf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/
8
- /tmp/vmware-tools-distrib/vmware-install.pl -d
9
- umount /mnt/cdrom
10
- rm /home/veewee/linux.iso
@@ -1,3 +0,0 @@
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
@@ -1,4 +0,0 @@
1
- # Install Chef
2
- gem install --no-ri --no-rdoc mime-types -v '1.16'
3
- gem install --no-ri --no-rdoc chef
4
-
@@ -1,8 +0,0 @@
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
-
6
- # Remove traces of mac address from network configuration
7
- sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0
8
- rm /etc/udev/rules.d/70-persistent-net.rules
@@ -1,38 +0,0 @@
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 => 'RedHat6_64',
8
- :iso_file => "CentOS-6.5-x86_64-minimal.iso",
9
- :iso_src => "http://yum.singlehop.com/CentOS/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso",
10
- :iso_md5 => "0d9dc37b5dd4befa1c440d2174e88a87",
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 => 300,
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
- "chef.sh",
30
- "puppet.sh",
31
- "vagrant.sh",
32
- "virtualbox.sh",
33
- #"vmfusion.sh",
34
- "cleanup.sh",
35
- "zerodisk.sh"
36
- ],
37
- :postinstall_timeout => 10000
38
- })
@@ -1,37 +0,0 @@
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 --nobase
25
- @core
26
- openssh-clients
27
- %end
28
-
29
- %post
30
- /usr/bin/yum -y install sudo
31
- /usr/sbin/groupadd veewee
32
- /usr/sbin/useradd veewee -g veewee -G wheel
33
- echo "veewee"|passwd --stdin veewee
34
- echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
35
- chmod 0440 /etc/sudoers.d/veewee
36
- %end
37
-
@@ -1,18 +0,0 @@
1
- # Install Puppet
2
-
3
- cat > /etc/yum.repos.d/puppetlabs.repo << EOM
4
- [puppetlabs-dependencies]
5
- name=puppetlabdsdependencies
6
- baseurl=http://yum.puppetlabs.com/el/6/dependencies/\$basearch
7
- enabled=1
8
- gpgcheck=0
9
-
10
- [puppetlabs]
11
- name=puppetlabs
12
- baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
13
- enabled=1
14
- gpgcheck=0
15
- EOM
16
-
17
- yum -y install puppet facter ruby-shadow
18
-