├── .gitignore ├── Gemfile ├── README.md ├── definitions ├── centos-58-x64 │ ├── definition.rb │ ├── ks.cfg │ └── postinstall.sh ├── centos-59-x64-vbox4210-nocm │ ├── definition.rb │ ├── ks.cfg │ └── postinstall.sh ├── centos-59-x64-vbox4210 │ ├── definition.rb │ ├── ks.cfg │ └── postinstall.sh ├── centos-63-x64 │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── ks.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh ├── centos-64-x64-fusion503-nocm │ ├── base.sh │ ├── cfengine.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── ks.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── centos-64-x64-fusion503 │ ├── base.sh │ ├── cfengine.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── ks.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── centos-64-x64-vbox4210-nocm │ ├── base.sh │ ├── cfengine.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── ks.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh ├── centos-64-x64-vbox4210 │ ├── base.sh │ ├── cfengine.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── ks.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh ├── debian-606-x64 │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh ├── debian-607-x64-vbox4210-nocm │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh ├── debian-607-x64-vbox4210 │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh ├── debian-607-x64-vf503-nocm │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── debian-607-x64-vf503 │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── debian-70rc1-x64-vbox4210-nocm │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh ├── debian-70rc1-x64-vbox4210 │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ └── zerodisk.sh ├── debian-70rc1-x64-vf503-nocm │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── debian-70rc1-x64-vf503 │ ├── base.sh │ ├── chef.sh │ ├── cleanup-virtualbox.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── fedora-18-x64-vbox4210-nocm │ ├── definition.rb │ ├── ks.cfg │ └── postinstall.sh ├── fedora-18-x64-vbox4210 │ ├── definition.rb │ ├── ks.cfg │ └── postinstall.sh ├── fedora-18-x64-vf503-nocm │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── ks.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── fedora-18-x64-vf503 │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── ks.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── sles-11sp1-x64-vbox4210-nocm │ ├── autoinst_de.xml │ ├── autoinst_en.xml │ ├── definition.rb │ └── postinstall.sh ├── sles-11sp1-x64-vbox4210 │ ├── autoinst_de.xml │ ├── autoinst_en.xml │ ├── definition.rb │ └── postinstall.sh ├── sles-11sp1-x64 │ ├── autoinst_de.xml │ ├── autoinst_en.xml │ ├── definition.rb │ └── postinstall.sh ├── ubuntu-server-1004-x64 │ ├── definition.rb │ ├── postinstall.sh │ └── preseed.cfg ├── ubuntu-server-10044-x64-fusion503-nocm │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── ubuntu-server-10044-x64-fusion503 │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ └── zerodisk.sh ├── ubuntu-server-10044-x64-vbox4210-nocm │ ├── definition.rb │ ├── postinstall.sh │ └── preseed.cfg ├── ubuntu-server-10044-x64-vbox4210 │ ├── definition.rb │ ├── postinstall.sh │ └── preseed.cfg ├── ubuntu-server-1204-x64 │ ├── definition.rb │ ├── postinstall.sh │ └── preseed.cfg ├── ubuntu-server-12042-x64-fusion503 │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ ├── vmtools.sh │ └── zerodisk.sh ├── ubuntu-server-12042-x64-vbox4210-nocm │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ ├── vmtools.sh │ └── zerodisk.sh ├── ubuntu-server-12042-x64-vbox4210 │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ ├── vmtools.sh │ └── zerodisk.sh └── ubuntu-svr-12042-x64-vf503-nocm │ ├── base.sh │ ├── chef.sh │ ├── cleanup.sh │ ├── definition.rb │ ├── preseed.cfg │ ├── puppet.sh │ ├── ruby.sh │ ├── vagrant.sh │ ├── virtualbox.sh │ ├── vmfusion.sh │ ├── vmtools.sh │ └── zerodisk.sh ├── examples ├── .gitignore ├── README.md └── Vagrantfile ├── html ├── favicon.ico └── index.html └── iso └── .gitignore /.gitignore: -------------------------------------------------------------------------------- 1 | *.box 2 | .*.swp 3 | .ruby-version 4 | .rbenv-gemsets 5 | .bundle 6 | vendor 7 | Gemfile.lock 8 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | 3 | gem 'veewee', :git => 'git://github.com/jedi4ever/veewee' 4 | -------------------------------------------------------------------------------- /definitions/centos-58-x64/definition.rb: -------------------------------------------------------------------------------- 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.8-x86_64-netinstall.iso", 6 | :iso_src => "http://mirrors.arsc.edu/centos/5.8/isos/x86_64/CentOS-5.8-x86_64-netinstall.iso", 7 | :iso_md5 => "6425035e9adee4b8653a85f59877ac5b", 8 | :iso_download_timeout => 1000, 9 | :boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg' ], 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 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 14 | :shutdown_cmd => "/sbin/halt -h -p", 15 | :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000 16 | }) 17 | -------------------------------------------------------------------------------- /definitions/centos-58-x64/ks.cfg: -------------------------------------------------------------------------------- 1 | # Kickstart file automatically generated by anaconda. 2 | 3 | install 4 | url --url=http://mirrors.arsc.edu/centos/5.8/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 | kernel-devel 41 | kernel-headers 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 -------------------------------------------------------------------------------- /definitions/centos-58-x64/postinstall.sh: -------------------------------------------------------------------------------- 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 54 | -------------------------------------------------------------------------------- /definitions/centos-59-x64-vbox4210-nocm/definition.rb: -------------------------------------------------------------------------------- 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.9-x86_64-netinstall.iso", 6 | :iso_src => "http://mirrors.kernel.org/centos/5.9/isos/x86_64/CentOS-5.9-x86_64-netinstall.iso", 7 | :iso_md5 => "445cfe6236327450bcbda17319b73559", 8 | :iso_download_timeout => 1000, 9 | :boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg' ], 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 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 14 | :shutdown_cmd => "/sbin/halt -h -p", 15 | :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000 16 | }) 17 | -------------------------------------------------------------------------------- /definitions/centos-59-x64-vbox4210-nocm/ks.cfg: -------------------------------------------------------------------------------- 1 | # Kickstart file automatically generated by anaconda. 2 | 3 | install 4 | url --url=http://mirrors.kernel.org/centos/5.9/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 | kernel-devel 41 | kernel-headers 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 48 | -------------------------------------------------------------------------------- /definitions/centos-59-x64-vbox4210-nocm/postinstall.sh: -------------------------------------------------------------------------------- 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 vagrant keys 15 | mkdir /home/vagrant/.ssh 16 | chmod 700 /home/vagrant/.ssh 17 | cd /home/vagrant/.ssh 18 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 19 | chown -R vagrant /home/vagrant/.ssh 20 | 21 | #Installing the virtualbox guest additions 22 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 23 | cd /tmp 24 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 25 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 26 | sh /mnt/VBoxLinuxAdditions.run 27 | umount /mnt 28 | 29 | rm VBoxGuestAdditions_$VBOX_VERSION.iso 30 | 31 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 32 | sed -i "s/^\(.*env_keep = \"\)/\1PATH /" /etc/sudoers 33 | 34 | #poweroff -h 35 | 36 | exit 37 | -------------------------------------------------------------------------------- /definitions/centos-59-x64-vbox4210/definition.rb: -------------------------------------------------------------------------------- 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.9-x86_64-netinstall.iso", 6 | :iso_src => "http://mirrors.kernel.org/centos/5.9/isos/x86_64/CentOS-5.9-x86_64-netinstall.iso", 7 | :iso_md5 => "445cfe6236327450bcbda17319b73559", 8 | :iso_download_timeout => 1000, 9 | :boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg' ], 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 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 14 | :shutdown_cmd => "/sbin/halt -h -p", 15 | :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => 10000 16 | }) 17 | -------------------------------------------------------------------------------- /definitions/centos-59-x64-vbox4210/ks.cfg: -------------------------------------------------------------------------------- 1 | # Kickstart file automatically generated by anaconda. 2 | 3 | install 4 | url --url=http://mirrors.kernel.org/centos/5.9/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 | kernel-devel 41 | kernel-headers 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 48 | -------------------------------------------------------------------------------- /definitions/centos-59-x64-vbox4210/postinstall.sh: -------------------------------------------------------------------------------- 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 | # Add the puppet group. 52 | /usr/sbin/groupadd puppet 53 | 54 | #poweroff -h 55 | 56 | exit 57 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/base.sh: -------------------------------------------------------------------------------- 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 14 | 15 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install --no-ri --no-rdoc chef 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/cleanup.sh: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/definition.rb: -------------------------------------------------------------------------------- 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 => "CentOS-6.3-x86_64-netinstall.iso", 9 | :iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.3/isos/x86_64/CentOS-6.3-x86_64-netinstall.iso", 10 | :iso_md5 => "690138908de516b6e5d7d180d085c3f3", 11 | :iso_download_timeout => 1000, 12 | :boot_wait => "15", 13 | :boot_cmd_sequence => [ 14 | ' text ks=http://%IP%:%PORT%/ks.cfg' 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 | }) 41 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | url --url=http://www.mirrorservice.org/sites/mirror.centos.org/6.3/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 --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 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/puppet.sh: -------------------------------------------------------------------------------- 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 | 13 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby 2 | yum -y install ruby ruby-devel rubygems 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/vagrant.sh: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/virtualbox.sh: -------------------------------------------------------------------------------- 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 | 9 | -------------------------------------------------------------------------------- /definitions/centos-63-x64/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/base.sh: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/cfengine.sh: -------------------------------------------------------------------------------- 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 | 70 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install --no-ri --no-rdoc chef 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/cleanup.sh: -------------------------------------------------------------------------------- 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 | sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0 6 | rm /etc/udev/rules.d/70-persistent-net.rules 7 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/definition.rb: -------------------------------------------------------------------------------- 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.4-x86_64-netinstall.iso", 9 | :iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.4/isos/x86_64/CentOS-6.4-x86_64-netinstall.iso", 10 | :iso_md5 => "bb9af2aea1344597e11070abe6b1fcd3", 11 | :iso_download_timeout => 1000, 12 | :boot_wait => "15", 13 | :boot_cmd_sequence => [ 14 | ' text ks=http://%IP%:%PORT%/ks.cfg' 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 | }) 41 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | url --url=http://www.mirrorservice.org/sites/mirror.centos.org/6.4/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 --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 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/puppet.sh: -------------------------------------------------------------------------------- 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 | 13 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby 2 | yum -y install ruby ruby-devel rubygems 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/vagrant.sh: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 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 | 9 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/veewee/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/veewee/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/base.sh: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/cfengine.sh: -------------------------------------------------------------------------------- 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 | 70 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install --no-ri --no-rdoc chef 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/cleanup.sh: -------------------------------------------------------------------------------- 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 | sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0 6 | rm /etc/udev/rules.d/70-persistent-net.rules 7 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/definition.rb: -------------------------------------------------------------------------------- 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.4-x86_64-netinstall.iso", 9 | :iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.4/isos/x86_64/CentOS-6.4-x86_64-netinstall.iso", 10 | :iso_md5 => "bb9af2aea1344597e11070abe6b1fcd3", 11 | :iso_download_timeout => 1000, 12 | :boot_wait => "15", 13 | :boot_cmd_sequence => [ 14 | ' text ks=http://%IP%:%PORT%/ks.cfg' 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 | }) 41 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | url --url=http://www.mirrorservice.org/sites/mirror.centos.org/6.4/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 --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 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/puppet.sh: -------------------------------------------------------------------------------- 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 | 13 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby 2 | yum -y install ruby ruby-devel rubygems 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/vagrant.sh: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/virtualbox.sh: -------------------------------------------------------------------------------- 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 | 9 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/veewee/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/veewee/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-fusion503/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/base.sh: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/cfengine.sh: -------------------------------------------------------------------------------- 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 | 70 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install --no-ri --no-rdoc chef 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/cleanup.sh: -------------------------------------------------------------------------------- 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 | sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0 6 | rm /etc/udev/rules.d/70-persistent-net.rules 7 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/definition.rb: -------------------------------------------------------------------------------- 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 => "CentOS-6.4-x86_64-netinstall.iso", 9 | :iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.4/isos/x86_64/CentOS-6.4-x86_64-netinstall.iso", 10 | :iso_md5 => "bb9af2aea1344597e11070abe6b1fcd3", 11 | :iso_download_timeout => 1000, 12 | :boot_wait => "15", 13 | :boot_cmd_sequence => [ 14 | ' text ks=http://%IP%:%PORT%/ks.cfg' 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 | "vagrant.sh", 30 | "virtualbox.sh", 31 | #"kvm.sh", 32 | #"vmfusion.sh", 33 | "cleanup.sh", 34 | "zerodisk.sh" 35 | ], 36 | :postinstall_timeout => 10000 37 | }) 38 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | url --url=http://www.mirrorservice.org/sites/mirror.centos.org/6.4/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 --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 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/puppet.sh: -------------------------------------------------------------------------------- 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 | 13 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby 2 | yum -y install ruby ruby-devel rubygems 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/vagrant.sh: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 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 | 9 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/base.sh: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/cfengine.sh: -------------------------------------------------------------------------------- 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 | 70 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install --no-ri --no-rdoc chef 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/cleanup.sh: -------------------------------------------------------------------------------- 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 | sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0 6 | rm /etc/udev/rules.d/70-persistent-net.rules 7 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/definition.rb: -------------------------------------------------------------------------------- 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 => "CentOS-6.4-x86_64-netinstall.iso", 9 | :iso_src => "http://www.mirrorservice.org/sites/mirror.centos.org/6.4/isos/x86_64/CentOS-6.4-x86_64-netinstall.iso", 10 | :iso_md5 => "bb9af2aea1344597e11070abe6b1fcd3", 11 | :iso_download_timeout => 1000, 12 | :boot_wait => "15", 13 | :boot_cmd_sequence => [ 14 | ' text ks=http://%IP%:%PORT%/ks.cfg' 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 | }) 41 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | url --url=http://www.mirrorservice.org/sites/mirror.centos.org/6.4/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 --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 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/puppet.sh: -------------------------------------------------------------------------------- 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 | 13 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby 2 | yum -y install ruby ruby-devel rubygems 3 | 4 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/vagrant.sh: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/virtualbox.sh: -------------------------------------------------------------------------------- 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 | 9 | -------------------------------------------------------------------------------- /definitions/centos-64-x64-vbox4210/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline5-dev 5 | apt-get -y install curl unzip 6 | apt-get clean 7 | 8 | # Set up sudo 9 | cp /etc/sudoers /etc/sudoers.orig 10 | sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers 11 | 12 | # Tweak sshd to prevent DNS resolution (speed up logins) 13 | echo 'UseDNS no' >> /etc/ssh/sshd_config 14 | 15 | # Remove 5s grub timeout to speed up booting 16 | echo < /etc/default/grub 17 | # If you change this file, run 'update-grub' afterwards to update 18 | # /boot/grub/grub.cfg. 19 | 20 | GRUB_DEFAULT=0 21 | GRUB_TIMEOUT=0 22 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 23 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 24 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 25 | EOF 26 | 27 | update-grub 28 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install chef --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | 5 | # Removing leftover leases and persistent rules 6 | echo "cleaning up dhcp leases" 7 | rm /var/lib/dhcp/* 8 | 9 | # Make sure Udev doesn't block our network 10 | echo "cleaning up udev rules" 11 | rm /etc/udev/rules.d/70-persistent-net.rules 12 | mkdir /etc/udev/rules.d/70-persistent-net.rules 13 | rm -rf /dev/.udev/ 14 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 15 | 16 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 17 | echo "pre-up sleep 2" >> /etc/network/interfaces 18 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Definition.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '256', 4 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 5 | :os_type_id => 'Debian_64', 6 | :iso_file => "debian-6.0.6-amd64-netinst.iso", 7 | :iso_src => "http://cdimage.debian.org/debian-cd/6.0.6/amd64/iso-cd/debian-6.0.6-amd64-netinst.iso", 8 | :iso_md5 => "00585d63f8a560a73540bd718263319a", 9 | :iso_download_timeout => "1000", 10 | :boot_wait => "10", :boot_cmd_sequence => [ 11 | '', 12 | 'install ', 13 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 14 | 'debian-installer=en_US ', 15 | 'auto ', 16 | 'locale=en_US ', 17 | 'kbd-chooser/method=us ', 18 | 'netcfg/get_hostname=%NAME% ', 19 | 'netcfg/get_domain=vagrantup.com ', 20 | 'fb=false ', 21 | 'debconf/frontend=noninteractive ', 22 | 'console-setup/ask_detect=false ', 23 | 'console-keymaps-at/keymap=us ', 24 | '' 25 | ], 26 | :kickstart_port => "7122", 27 | :kickstart_timeout => "10000", 28 | :kickstart_file => "preseed.cfg", 29 | :ssh_login_timeout => "10000", 30 | :ssh_user => "vagrant", 31 | :ssh_password => "vagrant", 32 | :ssh_key => "", 33 | :ssh_host_port => "7222", 34 | :ssh_guest_port => "22", 35 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 36 | :shutdown_cmd => "halt -p", 37 | :postinstall_files => [ 38 | "base.sh", 39 | "vagrant.sh", 40 | "virtualbox.sh", 41 | "ruby.sh", 42 | "puppet.sh", 43 | "chef.sh", 44 | "cleanup-virtualbox.sh", 45 | "cleanup.sh", 46 | "zerodisk.sh" 47 | ], 48 | :postinstall_timeout => "10000" 49 | }) 50 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libruby1.8 ri 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.6.2 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Add groups puppet and chef 6 | groupadd puppet 7 | groupadd chef 8 | 9 | # Create the user vagrant with password vagrant 10 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 11 | 12 | # Install vagrant keys 13 | mkdir -pm 700 /home/vagrant/.ssh 14 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 15 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 16 | chmod 0600 /home/vagrant/.ssh/authorized_keys 17 | chown -R vagrant:vagrant /home/vagrant/.ssh 18 | 19 | # Customize the message of the day 20 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 21 | 22 | # Install NFS client 23 | apt-get -y install nfs-common 24 | 25 | 26 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/virtualbox.sh: -------------------------------------------------------------------------------- 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 /home/vagrant/.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 14 | -------------------------------------------------------------------------------- /definitions/debian-606-x64/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline5-dev 5 | apt-get -y install curl unzip 6 | apt-get clean 7 | 8 | # Set up sudo 9 | cp /etc/sudoers /etc/sudoers.orig 10 | sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers 11 | 12 | # Tweak sshd to prevent DNS resolution (speed up logins) 13 | echo 'UseDNS no' >> /etc/ssh/sshd_config 14 | 15 | # Remove 5s grub timeout to speed up booting 16 | echo < /etc/default/grub 17 | # If you change this file, run 'update-grub' afterwards to update 18 | # /boot/grub/grub.cfg. 19 | 20 | GRUB_DEFAULT=0 21 | GRUB_TIMEOUT=0 22 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 23 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 24 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 25 | EOF 26 | 27 | update-grub 28 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install chef --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | 5 | # Removing leftover leases and persistent rules 6 | echo "cleaning up dhcp leases" 7 | rm /var/lib/dhcp/* 8 | 9 | # Make sure Udev doesn't block our network 10 | echo "cleaning up udev rules" 11 | rm /etc/udev/rules.d/70-persistent-net.rules 12 | mkdir /etc/udev/rules.d/70-persistent-net.rules 13 | rm -rf /dev/.udev/ 14 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 15 | 16 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 17 | echo "pre-up sleep 2" >> /etc/network/interfaces 18 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Definition.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '256', 4 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 5 | :os_type_id => 'Debian_64', 6 | :iso_file => "debian-6.0.7-amd64-netinst.iso", 7 | :iso_src => "http://cdimage.debian.org/debian-cd/6.0.7/amd64/iso-cd/debian-6.0.7-amd64-netinst.iso", 8 | :iso_md5 => "cc509122349a27bf1958e1ea0ce4065d", 9 | :iso_download_timeout => "1000", 10 | :boot_wait => "10", :boot_cmd_sequence => [ 11 | '', 12 | 'install ', 13 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 14 | 'debian-installer=en_US ', 15 | 'auto ', 16 | 'locale=en_US ', 17 | 'kbd-chooser/method=us ', 18 | 'netcfg/get_hostname=%NAME% ', 19 | 'netcfg/get_domain=vagrantup.com ', 20 | 'fb=false ', 21 | 'debconf/frontend=noninteractive ', 22 | 'console-setup/ask_detect=false ', 23 | 'console-keymaps-at/keymap=us ', 24 | '' 25 | ], 26 | :kickstart_port => "7122", 27 | :kickstart_timeout => "10000", 28 | :kickstart_file => "preseed.cfg", 29 | :ssh_login_timeout => "10000", 30 | :ssh_user => "vagrant", 31 | :ssh_password => "vagrant", 32 | :ssh_key => "", 33 | :ssh_host_port => "7222", 34 | :ssh_guest_port => "22", 35 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 36 | :shutdown_cmd => "halt -p", 37 | :postinstall_files => [ 38 | "base.sh", 39 | "vagrant.sh", 40 | "virtualbox.sh", 41 | "cleanup-virtualbox.sh", 42 | "cleanup.sh", 43 | "zerodisk.sh" 44 | ], 45 | :postinstall_timeout => "10000" 46 | }) 47 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libruby1.8 ri 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.6.2 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Add groups puppet and chef 6 | groupadd puppet 7 | groupadd chef 8 | 9 | # Create the user vagrant with password vagrant 10 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 11 | 12 | # Install vagrant keys 13 | mkdir -pm 700 /home/vagrant/.ssh 14 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 15 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 16 | chmod 0600 /home/vagrant/.ssh/authorized_keys 17 | chown -R vagrant:vagrant /home/vagrant/.ssh 18 | 19 | # Customize the message of the day 20 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 21 | 22 | # Install NFS client 23 | apt-get -y install nfs-common 24 | 25 | 26 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 1 | if test -f .vbox_version ; then 2 | 3 | # Without libdbus virtualbox would not start automatically after compile 4 | apt-get -y install --no-install-recommends libdbus-1-3 5 | 6 | # The netboot installs the VirtualBox support (old) so we have to remove it 7 | /etc/init.d/virtualbox-ose-guest-utils stop 8 | rmmod vboxguest 9 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 10 | aptitude -y install dkms 11 | 12 | # Install the VirtualBox guest additions 13 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 14 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 15 | mount -o loop $VBOX_ISO /mnt 16 | yes|sh /mnt/VBoxLinuxAdditions.run 17 | umount /mnt 18 | fi 19 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline5-dev 5 | apt-get -y install curl unzip 6 | apt-get clean 7 | 8 | # Set up sudo 9 | cp /etc/sudoers /etc/sudoers.orig 10 | sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers 11 | 12 | # Tweak sshd to prevent DNS resolution (speed up logins) 13 | echo 'UseDNS no' >> /etc/ssh/sshd_config 14 | 15 | # Remove 5s grub timeout to speed up booting 16 | echo < /etc/default/grub 17 | # If you change this file, run 'update-grub' afterwards to update 18 | # /boot/grub/grub.cfg. 19 | 20 | GRUB_DEFAULT=0 21 | GRUB_TIMEOUT=0 22 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 23 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 24 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 25 | EOF 26 | 27 | update-grub 28 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install chef --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | 5 | # Removing leftover leases and persistent rules 6 | echo "cleaning up dhcp leases" 7 | rm /var/lib/dhcp/* 8 | 9 | # Make sure Udev doesn't block our network 10 | echo "cleaning up udev rules" 11 | rm /etc/udev/rules.d/70-persistent-net.rules 12 | mkdir /etc/udev/rules.d/70-persistent-net.rules 13 | rm -rf /dev/.udev/ 14 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 15 | 16 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 17 | echo "pre-up sleep 2" >> /etc/network/interfaces 18 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Definition.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '256', 4 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 5 | :os_type_id => 'Debian_64', 6 | :iso_file => "debian-6.0.7-amd64-netinst.iso", 7 | :iso_src => "http://cdimage.debian.org/debian-cd/6.0.7/amd64/iso-cd/debian-6.0.7-amd64-netinst.iso", 8 | :iso_md5 => "cc509122349a27bf1958e1ea0ce4065d", 9 | :iso_download_timeout => "1000", 10 | :boot_wait => "10", :boot_cmd_sequence => [ 11 | '', 12 | 'install ', 13 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 14 | 'debian-installer=en_US ', 15 | 'auto ', 16 | 'locale=en_US ', 17 | 'kbd-chooser/method=us ', 18 | 'netcfg/get_hostname=%NAME% ', 19 | 'netcfg/get_domain=vagrantup.com ', 20 | 'fb=false ', 21 | 'debconf/frontend=noninteractive ', 22 | 'console-setup/ask_detect=false ', 23 | 'console-keymaps-at/keymap=us ', 24 | '' 25 | ], 26 | :kickstart_port => "7122", 27 | :kickstart_timeout => "10000", 28 | :kickstart_file => "preseed.cfg", 29 | :ssh_login_timeout => "10000", 30 | :ssh_user => "vagrant", 31 | :ssh_password => "vagrant", 32 | :ssh_key => "", 33 | :ssh_host_port => "7222", 34 | :ssh_guest_port => "22", 35 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 36 | :shutdown_cmd => "halt -p", 37 | :postinstall_files => [ 38 | "base.sh", 39 | "vagrant.sh", 40 | "virtualbox.sh", 41 | "ruby.sh", 42 | "puppet.sh", 43 | "chef.sh", 44 | "cleanup-virtualbox.sh", 45 | "cleanup.sh", 46 | "zerodisk.sh" 47 | ], 48 | :postinstall_timeout => "10000" 49 | }) 50 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libruby1.8 ri 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.6.2 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Add groups puppet and chef 6 | groupadd puppet 7 | groupadd chef 8 | 9 | # Create the user vagrant with password vagrant 10 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 11 | 12 | # Install vagrant keys 13 | mkdir -pm 700 /home/vagrant/.ssh 14 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 15 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 16 | chmod 0600 /home/vagrant/.ssh/authorized_keys 17 | chown -R vagrant:vagrant /home/vagrant/.ssh 18 | 19 | # Customize the message of the day 20 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 21 | 22 | # Install NFS client 23 | apt-get -y install nfs-common 24 | 25 | 26 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/virtualbox.sh: -------------------------------------------------------------------------------- 1 | if test -f .vbox_version ; then 2 | 3 | # Without libdbus virtualbox would not start automatically after compile 4 | apt-get -y install --no-install-recommends libdbus-1-3 5 | 6 | # The netboot installs the VirtualBox support (old) so we have to remove it 7 | /etc/init.d/virtualbox-ose-guest-utils stop 8 | rmmod vboxguest 9 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 10 | aptitude -y install dkms 11 | 12 | # Install the VirtualBox guest additions 13 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 14 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 15 | mount -o loop $VBOX_ISO /mnt 16 | yes|sh /mnt/VBoxLinuxAdditions.run 17 | umount /mnt 18 | fi 19 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vbox4210/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline5-dev 5 | apt-get -y install curl unzip 6 | apt-get clean 7 | 8 | # Set up sudo 9 | cp /etc/sudoers /etc/sudoers.orig 10 | sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers 11 | 12 | # Tweak sshd to prevent DNS resolution (speed up logins) 13 | echo 'UseDNS no' >> /etc/ssh/sshd_config 14 | 15 | # Remove 5s grub timeout to speed up booting 16 | echo < /etc/default/grub 17 | # If you change this file, run 'update-grub' afterwards to update 18 | # /boot/grub/grub.cfg. 19 | 20 | GRUB_DEFAULT=0 21 | GRUB_TIMEOUT=0 22 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 23 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 24 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 25 | EOF 26 | 27 | update-grub 28 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install chef --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | 5 | # Removing leftover leases and persistent rules 6 | echo "cleaning up dhcp leases" 7 | rm /var/lib/dhcp/* 8 | 9 | # Make sure Udev doesn't block our network 10 | echo "cleaning up udev rules" 11 | rm /etc/udev/rules.d/70-persistent-net.rules 12 | mkdir /etc/udev/rules.d/70-persistent-net.rules 13 | rm -rf /dev/.udev/ 14 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 15 | 16 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 17 | echo "pre-up sleep 2" >> /etc/network/interfaces 18 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Definition.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '256', 4 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 5 | :os_type_id => 'Debian_64', 6 | :iso_file => "debian-6.0.7-amd64-netinst.iso", 7 | :iso_src => "http://cdimage.debian.org/debian-cd/6.0.7/amd64/iso-cd/debian-6.0.7-amd64-netinst.iso", 8 | :iso_md5 => "cc509122349a27bf1958e1ea0ce4065d", 9 | :iso_download_timeout => "1000", 10 | :boot_wait => "10", :boot_cmd_sequence => [ 11 | '', 12 | 'install ', 13 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 14 | 'debian-installer=en_US ', 15 | 'auto ', 16 | 'locale=en_US ', 17 | 'kbd-chooser/method=us ', 18 | 'netcfg/get_hostname=%NAME% ', 19 | 'netcfg/get_domain=vagrantup.com ', 20 | 'fb=false ', 21 | 'debconf/frontend=noninteractive ', 22 | 'console-setup/ask_detect=false ', 23 | 'console-keymaps-at/keymap=us ', 24 | '' 25 | ], 26 | :kickstart_port => "7122", 27 | :kickstart_timeout => "10000", 28 | :kickstart_file => "preseed.cfg", 29 | :ssh_login_timeout => "10000", 30 | :ssh_user => "vagrant", 31 | :ssh_password => "vagrant", 32 | :ssh_key => "", 33 | :ssh_host_port => "7222", 34 | :ssh_guest_port => "22", 35 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 36 | :shutdown_cmd => "halt -p", 37 | :postinstall_files => [ 38 | "base.sh", 39 | "vagrant.sh", 40 | #"virtualbox.sh", 41 | "vmfusion.sh", 42 | #"ruby.sh", 43 | #"puppet.sh", 44 | #"chef.sh", 45 | #"cleanup-virtualbox.sh", 46 | "cleanup.sh", 47 | "zerodisk.sh" 48 | ], 49 | :postinstall_timeout => "10000" 50 | }) 51 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libruby1.8 ri 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.6.2 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Add groups puppet and chef 6 | groupadd puppet 7 | groupadd chef 8 | 9 | # Create the user vagrant with password vagrant 10 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 11 | 12 | # Install vagrant keys 13 | mkdir -pm 700 /home/vagrant/.ssh 14 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 15 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 16 | chmod 0600 /home/vagrant/.ssh/authorized_keys 17 | chown -R vagrant:vagrant /home/vagrant/.ssh 18 | 19 | # Customize the message of the day 20 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 21 | 22 | # Install NFS client 23 | apt-get -y install nfs-common 24 | 25 | 26 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 1 | if test -f .vbox_version ; then 2 | 3 | # Without libdbus virtualbox would not start automatically after compile 4 | apt-get -y install --no-install-recommends libdbus-1-3 5 | 6 | # The netboot installs the VirtualBox support (old) so we have to remove it 7 | /etc/init.d/virtualbox-ose-guest-utils stop 8 | rmmod vboxguest 9 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 10 | aptitude -y install dkms 11 | 12 | # Install the VirtualBox guest additions 13 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 14 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 15 | mount -o loop $VBOX_ISO /mnt 16 | yes|sh /mnt/VBoxLinuxAdditions.run 17 | umount /mnt 18 | fi 19 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/vagrant/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline5-dev 5 | apt-get -y install curl unzip 6 | apt-get clean 7 | 8 | # Set up sudo 9 | cp /etc/sudoers /etc/sudoers.orig 10 | sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers 11 | 12 | # Tweak sshd to prevent DNS resolution (speed up logins) 13 | echo 'UseDNS no' >> /etc/ssh/sshd_config 14 | 15 | # Remove 5s grub timeout to speed up booting 16 | echo < /etc/default/grub 17 | # If you change this file, run 'update-grub' afterwards to update 18 | # /boot/grub/grub.cfg. 19 | 20 | GRUB_DEFAULT=0 21 | GRUB_TIMEOUT=0 22 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 23 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 24 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 25 | EOF 26 | 27 | update-grub 28 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | gem install chef --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | 5 | # Removing leftover leases and persistent rules 6 | echo "cleaning up dhcp leases" 7 | rm /var/lib/dhcp/* 8 | 9 | # Make sure Udev doesn't block our network 10 | echo "cleaning up udev rules" 11 | rm /etc/udev/rules.d/70-persistent-net.rules 12 | mkdir /etc/udev/rules.d/70-persistent-net.rules 13 | rm -rf /dev/.udev/ 14 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 15 | 16 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 17 | echo "pre-up sleep 2" >> /etc/network/interfaces 18 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Definition.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '256', 4 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 5 | :os_type_id => 'Debian_64', 6 | :iso_file => "debian-6.0.7-amd64-netinst.iso", 7 | :iso_src => "http://cdimage.debian.org/debian-cd/6.0.7/amd64/iso-cd/debian-6.0.7-amd64-netinst.iso", 8 | :iso_md5 => "cc509122349a27bf1958e1ea0ce4065d", 9 | :iso_download_timeout => "1000", 10 | :boot_wait => "10", :boot_cmd_sequence => [ 11 | '', 12 | 'install ', 13 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 14 | 'debian-installer=en_US ', 15 | 'auto ', 16 | 'locale=en_US ', 17 | 'kbd-chooser/method=us ', 18 | 'netcfg/get_hostname=%NAME% ', 19 | 'netcfg/get_domain=vagrantup.com ', 20 | 'fb=false ', 21 | 'debconf/frontend=noninteractive ', 22 | 'console-setup/ask_detect=false ', 23 | 'console-keymaps-at/keymap=us ', 24 | '' 25 | ], 26 | :kickstart_port => "7122", 27 | :kickstart_timeout => "10000", 28 | :kickstart_file => "preseed.cfg", 29 | :ssh_login_timeout => "10000", 30 | :ssh_user => "vagrant", 31 | :ssh_password => "vagrant", 32 | :ssh_key => "", 33 | :ssh_host_port => "7222", 34 | :ssh_guest_port => "22", 35 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 36 | :shutdown_cmd => "halt -p", 37 | :postinstall_files => [ 38 | "base.sh", 39 | "vagrant.sh", 40 | #"virtualbox.sh", 41 | "vmfusion.sh", 42 | "ruby.sh", 43 | "puppet.sh", 44 | "chef.sh", 45 | #"cleanup-virtualbox.sh", 46 | "cleanup.sh", 47 | "zerodisk.sh" 48 | ], 49 | :postinstall_timeout => "10000" 50 | }) 51 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libruby1.8 ri 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.6.2 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Add groups puppet and chef 6 | groupadd puppet 7 | groupadd chef 8 | 9 | # Create the user vagrant with password vagrant 10 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 11 | 12 | # Install vagrant keys 13 | mkdir -pm 700 /home/vagrant/.ssh 14 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 15 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 16 | chmod 0600 /home/vagrant/.ssh/authorized_keys 17 | chown -R vagrant:vagrant /home/vagrant/.ssh 18 | 19 | # Customize the message of the day 20 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 21 | 22 | # Install NFS client 23 | apt-get -y install nfs-common 24 | 25 | 26 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/virtualbox.sh: -------------------------------------------------------------------------------- 1 | if test -f .vbox_version ; then 2 | 3 | # Without libdbus virtualbox would not start automatically after compile 4 | apt-get -y install --no-install-recommends libdbus-1-3 5 | 6 | # The netboot installs the VirtualBox support (old) so we have to remove it 7 | /etc/init.d/virtualbox-ose-guest-utils stop 8 | rmmod vboxguest 9 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 10 | aptitude -y install dkms 11 | 12 | # Install the VirtualBox guest additions 13 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 14 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 15 | mount -o loop $VBOX_ISO /mnt 16 | yes|sh /mnt/VBoxLinuxAdditions.run 17 | umount /mnt 18 | fi 19 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/vagrant/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/debian-607-x64-vf503/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev 5 | apt-get -y install curl unzip 6 | 7 | # Set up sudo 8 | echo 'vagrant ALL=NOPASSWD:ALL' > /etc/sudoers.d/vagrant 9 | 10 | # Tweak sshd to prevent DNS resolution (speed up logins) 11 | echo 'UseDNS no' >> /etc/ssh/sshd_config 12 | 13 | # Remove 5s grub timeout to speed up booting 14 | cat < /etc/default/grub 15 | # If you change this file, run 'update-grub' afterwards to update 16 | # /boot/grub/grub.cfg. 17 | 18 | GRUB_DEFAULT=0 19 | GRUB_TIMEOUT=0 20 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 21 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 22 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 23 | EOF 24 | 25 | update-grub 26 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | if [ -f .veewee_params ] 2 | then 3 | . .veewee_params 4 | fi 5 | 6 | # Default to Gem install 7 | if [ -z "$CHEF_INSTALLMETHOD" ]; then 8 | export CHEF_INSTALLMETHOD="gems" 9 | fi 10 | 11 | # Installing chef 12 | case $CHEF_INSTALLMETHOD in 13 | "gems") 14 | # Using gems 15 | if [ -z "$CHEF_VERSION" ]; then 16 | # Default to latest 17 | gem install chef --no-ri --no-rdoc 18 | else 19 | gem install chef --no-ri --no-rdoc --version $CHEF_VERSION 20 | fi 21 | ;; 22 | 23 | "omnibus") 24 | # Using omnibus 25 | if [ -z "$CHEF_VERSION" ]; then 26 | # Default to latest 27 | wget -O - http://opscode.com/chef/install.sh | sudo bash -s 28 | else 29 | wget -O - http://opscode.com/chef/install.sh | sudo bash -s -- -v $CHEF_VERSION 30 | fi 31 | ;; 32 | 33 | "package") 34 | # Using packages 35 | apt-get install -y debconf-utils 36 | echo "chef chef/chef_server_url string $CHEF_SERVER_URL" | debconf-set-selections 37 | if [ -z "$CHEF_VERSION" ]; then 38 | # Default to latest 39 | apt-get install -y chef 40 | else 41 | apt-get install -y chef=$CHEF_VERSION 42 | fi 43 | ;; 44 | 45 | *) 46 | echo "Unsupported method for installing chef" 47 | exit -1 48 | ;; 49 | esac 50 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | apt-get -y clean 5 | 6 | # Removing leftover leases and persistent rules 7 | echo "cleaning up dhcp leases" 8 | rm /var/lib/dhcp/* 9 | 10 | # Make sure Udev doesn't block our network 11 | echo "cleaning up udev rules" 12 | rm /etc/udev/rules.d/70-persistent-net.rules 13 | mkdir /etc/udev/rules.d/70-persistent-net.rules 14 | rm -rf /dev/.udev/ 15 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 16 | 17 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 18 | echo "pre-up sleep 2" >> /etc/network/interfaces 19 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | #Thanks to Fletcher Nichol - https://github.com/fnichol 2 | 3 | Veewee::Definition.declare({ 4 | :cpu_count => '1', 5 | :memory_size=> '256', 6 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 7 | :os_type_id => 'Debian_64', 8 | :iso_file => "debian-wheezy-DI-rc1-amd64-netinst.iso", 9 | :iso_src => "http://cdimage.debian.org/cdimage/wheezy_di_rc1/amd64/iso-cd/debian-wheezy-DI-rc1-amd64-netinst.iso", 10 | :iso_md5 => "412f77d4b98adf2a7d575745fd282d78", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", :boot_cmd_sequence => [ 13 | '', 14 | 'install ', 15 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US ', 17 | 'auto ', 18 | 'locale=en_US ', 19 | 'kbd-chooser/method=us ', 20 | 'netcfg/get_hostname=%NAME% ', 21 | 'netcfg/get_domain=vagrantup.com ', 22 | 'fb=false ', 23 | 'debconf/frontend=noninteractive ', 24 | 'console-setup/ask_detect=false ', 25 | 'console-keymaps-at/keymap=us ', 26 | 'keyboard-configuration/xkb-keymap=us ', 27 | '' 28 | ], 29 | :kickstart_port => "7122", 30 | :kickstart_timeout => "10000", 31 | :kickstart_file => "preseed.cfg", 32 | :ssh_login_timeout => "10000", 33 | :ssh_user => "vagrant", 34 | :ssh_password => "vagrant", 35 | :ssh_key => "", 36 | :ssh_host_port => "7222", 37 | :ssh_guest_port => "22", 38 | :sudo_cmd => "echo '%p'|sudo -S bash '%f'", 39 | :shutdown_cmd => "halt -p", 40 | :postinstall_files => [ 41 | "base.sh", 42 | "vagrant.sh", 43 | "virtualbox.sh", 44 | "cleanup-virtualbox.sh", 45 | "cleanup.sh", 46 | "zerodisk.sh" 47 | ], 48 | :postinstall_timeout => "10000" 49 | }) 50 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/puppet.sh: -------------------------------------------------------------------------------- 1 | if [ -f .veewee_params ] 2 | then 3 | . .veewee_params 4 | fi 5 | 6 | # Add puppet user and group 7 | adduser --system --group --home /var/lib/puppet puppet 8 | 9 | # Installing Puppet 10 | gem install puppet --no-ri --no-rdoc 11 | 12 | if [ -z "$PUPPET_VERSION" ]; then 13 | # Default to latest 14 | gem install puppet --no-ri --no-rdoc 15 | else 16 | gem install puppet --no-ri --no-rdoc --version $PUPPET_VERSION 17 | fi 18 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libopenssl-ruby1.8 irb ri rdoc 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.8.22 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Create the user vagrant with password vagrant 6 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 7 | 8 | # Install vagrant keys 9 | mkdir -pm 700 /home/vagrant/.ssh 10 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 11 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 12 | chmod 0600 /home/vagrant/.ssh/authorized_keys 13 | chown -R vagrant:vagrant /home/vagrant/.ssh 14 | 15 | # Customize the message of the day 16 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 17 | 18 | # Install NFS client 19 | apt-get -y install nfs-common 20 | 21 | 22 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 1 | if test -f .vbox_version ; then 2 | # The netboot installs the VirtualBox support (old) so we have to remove it 3 | if test -f /etc/init.d/virtualbox-ose-guest-utils ; then 4 | /etc/init.d/virtualbox-ose-guest-utils stop 5 | fi 6 | 7 | rmmod vboxguest 8 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 9 | 10 | # Install dkms for dynamic compiles 11 | 12 | apt-get install -y dkms 13 | 14 | # If libdbus is not installed, virtualbox will not autostart 15 | apt-get -y install --no-install-recommends libdbus-1-3 16 | 17 | # Install the VirtualBox guest additions 18 | VBOX_VERSION=$(cat .vbox_version) 19 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 20 | mount -o loop $VBOX_ISO /mnt 21 | yes|sh /mnt/VBoxLinuxAdditions.run 22 | umount /mnt 23 | 24 | 25 | # Start the newly build driver 26 | /etc/init.d/vboxadd start 27 | 28 | # Make a temporary mount point 29 | mkdir /tmp/veewee-validation 30 | 31 | # Test mount the veewee-validation 32 | mount -t vboxsf veewee-validation /tmp/veewee-validation 33 | 34 | fi 35 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev 5 | apt-get -y install curl unzip 6 | 7 | # Set up sudo 8 | echo 'vagrant ALL=NOPASSWD:ALL' > /etc/sudoers.d/vagrant 9 | 10 | # Tweak sshd to prevent DNS resolution (speed up logins) 11 | echo 'UseDNS no' >> /etc/ssh/sshd_config 12 | 13 | # Remove 5s grub timeout to speed up booting 14 | cat < /etc/default/grub 15 | # If you change this file, run 'update-grub' afterwards to update 16 | # /boot/grub/grub.cfg. 17 | 18 | GRUB_DEFAULT=0 19 | GRUB_TIMEOUT=0 20 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 21 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 22 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 23 | EOF 24 | 25 | update-grub 26 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/chef.sh: -------------------------------------------------------------------------------- 1 | if [ -f .veewee_params ] 2 | then 3 | . .veewee_params 4 | fi 5 | 6 | # Default to Gem install 7 | if [ -z "$CHEF_INSTALLMETHOD" ]; then 8 | export CHEF_INSTALLMETHOD="gems" 9 | fi 10 | 11 | # Installing chef 12 | case $CHEF_INSTALLMETHOD in 13 | "gems") 14 | # Using gems 15 | if [ -z "$CHEF_VERSION" ]; then 16 | # Default to latest 17 | gem install chef --no-ri --no-rdoc 18 | else 19 | gem install chef --no-ri --no-rdoc --version $CHEF_VERSION 20 | fi 21 | ;; 22 | 23 | "omnibus") 24 | # Using omnibus 25 | if [ -z "$CHEF_VERSION" ]; then 26 | # Default to latest 27 | wget -O - http://opscode.com/chef/install.sh | sudo bash -s 28 | else 29 | wget -O - http://opscode.com/chef/install.sh | sudo bash -s -- -v $CHEF_VERSION 30 | fi 31 | ;; 32 | 33 | "package") 34 | # Using packages 35 | apt-get install -y debconf-utils 36 | echo "chef chef/chef_server_url string $CHEF_SERVER_URL" | debconf-set-selections 37 | if [ -z "$CHEF_VERSION" ]; then 38 | # Default to latest 39 | apt-get install -y chef 40 | else 41 | apt-get install -y chef=$CHEF_VERSION 42 | fi 43 | ;; 44 | 45 | *) 46 | echo "Unsupported method for installing chef" 47 | exit -1 48 | ;; 49 | esac 50 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | apt-get -y clean 5 | 6 | # Removing leftover leases and persistent rules 7 | echo "cleaning up dhcp leases" 8 | rm /var/lib/dhcp/* 9 | 10 | # Make sure Udev doesn't block our network 11 | echo "cleaning up udev rules" 12 | rm /etc/udev/rules.d/70-persistent-net.rules 13 | mkdir /etc/udev/rules.d/70-persistent-net.rules 14 | rm -rf /dev/.udev/ 15 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 16 | 17 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 18 | echo "pre-up sleep 2" >> /etc/network/interfaces 19 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/definition.rb: -------------------------------------------------------------------------------- 1 | #Thanks to Fletcher Nichol - https://github.com/fnichol 2 | 3 | Veewee::Definition.declare({ 4 | :cpu_count => '1', 5 | :memory_size=> '256', 6 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 7 | :os_type_id => 'Debian_64', 8 | :iso_file => "debian-wheezy-DI-rc1-amd64-netinst.iso", 9 | :iso_src => "http://cdimage.debian.org/cdimage/wheezy_di_rc1/amd64/iso-cd/debian-wheezy-DI-rc1-amd64-netinst.iso", 10 | :iso_md5 => "412f77d4b98adf2a7d575745fd282d78", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", :boot_cmd_sequence => [ 13 | '', 14 | 'install ', 15 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US ', 17 | 'auto ', 18 | 'locale=en_US ', 19 | 'kbd-chooser/method=us ', 20 | 'netcfg/get_hostname=%NAME% ', 21 | 'netcfg/get_domain=vagrantup.com ', 22 | 'fb=false ', 23 | 'debconf/frontend=noninteractive ', 24 | 'console-setup/ask_detect=false ', 25 | 'console-keymaps-at/keymap=us ', 26 | 'keyboard-configuration/xkb-keymap=us ', 27 | '' 28 | ], 29 | :kickstart_port => "7122", 30 | :kickstart_timeout => "10000", 31 | :kickstart_file => "preseed.cfg", 32 | :ssh_login_timeout => "10000", 33 | :ssh_user => "vagrant", 34 | :ssh_password => "vagrant", 35 | :ssh_key => "", 36 | :ssh_host_port => "7222", 37 | :ssh_guest_port => "22", 38 | :sudo_cmd => "echo '%p'|sudo -S bash '%f'", 39 | :shutdown_cmd => "halt -p", 40 | :postinstall_files => [ 41 | "base.sh", 42 | "vagrant.sh", 43 | "virtualbox.sh", 44 | "ruby.sh", 45 | "puppet.sh", 46 | "chef.sh", 47 | "cleanup-virtualbox.sh", 48 | "cleanup.sh", 49 | "zerodisk.sh" 50 | ], 51 | :postinstall_timeout => "10000" 52 | }) 53 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/puppet.sh: -------------------------------------------------------------------------------- 1 | if [ -f .veewee_params ] 2 | then 3 | . .veewee_params 4 | fi 5 | 6 | # Add puppet user and group 7 | adduser --system --group --home /var/lib/puppet puppet 8 | 9 | # Installing Puppet 10 | gem install puppet --no-ri --no-rdoc 11 | 12 | if [ -z "$PUPPET_VERSION" ]; then 13 | # Default to latest 14 | gem install puppet --no-ri --no-rdoc 15 | else 16 | gem install puppet --no-ri --no-rdoc --version $PUPPET_VERSION 17 | fi 18 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libopenssl-ruby1.8 irb ri rdoc 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.8.22 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Create the user vagrant with password vagrant 6 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 7 | 8 | # Install vagrant keys 9 | mkdir -pm 700 /home/vagrant/.ssh 10 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 11 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 12 | chmod 0600 /home/vagrant/.ssh/authorized_keys 13 | chown -R vagrant:vagrant /home/vagrant/.ssh 14 | 15 | # Customize the message of the day 16 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 17 | 18 | # Install NFS client 19 | apt-get -y install nfs-common 20 | 21 | 22 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/virtualbox.sh: -------------------------------------------------------------------------------- 1 | if test -f .vbox_version ; then 2 | # The netboot installs the VirtualBox support (old) so we have to remove it 3 | if test -f /etc/init.d/virtualbox-ose-guest-utils ; then 4 | /etc/init.d/virtualbox-ose-guest-utils stop 5 | fi 6 | 7 | rmmod vboxguest 8 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 9 | 10 | # Install dkms for dynamic compiles 11 | 12 | apt-get install -y dkms 13 | 14 | # If libdbus is not installed, virtualbox will not autostart 15 | apt-get -y install --no-install-recommends libdbus-1-3 16 | 17 | # Install the VirtualBox guest additions 18 | VBOX_VERSION=$(cat .vbox_version) 19 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 20 | mount -o loop $VBOX_ISO /mnt 21 | yes|sh /mnt/VBoxLinuxAdditions.run 22 | umount /mnt 23 | 24 | 25 | # Start the newly build driver 26 | /etc/init.d/vboxadd start 27 | 28 | # Make a temporary mount point 29 | mkdir /tmp/veewee-validation 30 | 31 | # Test mount the veewee-validation 32 | mount -t vboxsf veewee-validation /tmp/veewee-validation 33 | 34 | fi 35 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vbox4210/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev 5 | apt-get -y install curl unzip 6 | 7 | # Set up sudo 8 | echo 'vagrant ALL=NOPASSWD:ALL' > /etc/sudoers.d/vagrant 9 | 10 | # Tweak sshd to prevent DNS resolution (speed up logins) 11 | echo 'UseDNS no' >> /etc/ssh/sshd_config 12 | 13 | # Remove 5s grub timeout to speed up booting 14 | cat < /etc/default/grub 15 | # If you change this file, run 'update-grub' afterwards to update 16 | # /boot/grub/grub.cfg. 17 | 18 | GRUB_DEFAULT=0 19 | GRUB_TIMEOUT=0 20 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 21 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 22 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 23 | EOF 24 | 25 | update-grub 26 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | if [ -f .veewee_params ] 2 | then 3 | . .veewee_params 4 | fi 5 | 6 | # Default to Gem install 7 | if [ -z "$CHEF_INSTALLMETHOD" ]; then 8 | export CHEF_INSTALLMETHOD="gems" 9 | fi 10 | 11 | # Installing chef 12 | case $CHEF_INSTALLMETHOD in 13 | "gems") 14 | # Using gems 15 | if [ -z "$CHEF_VERSION" ]; then 16 | # Default to latest 17 | gem install chef --no-ri --no-rdoc 18 | else 19 | gem install chef --no-ri --no-rdoc --version $CHEF_VERSION 20 | fi 21 | ;; 22 | 23 | "omnibus") 24 | # Using omnibus 25 | if [ -z "$CHEF_VERSION" ]; then 26 | # Default to latest 27 | wget -O - http://opscode.com/chef/install.sh | sudo bash -s 28 | else 29 | wget -O - http://opscode.com/chef/install.sh | sudo bash -s -- -v $CHEF_VERSION 30 | fi 31 | ;; 32 | 33 | "package") 34 | # Using packages 35 | apt-get install -y debconf-utils 36 | echo "chef chef/chef_server_url string $CHEF_SERVER_URL" | debconf-set-selections 37 | if [ -z "$CHEF_VERSION" ]; then 38 | # Default to latest 39 | apt-get install -y chef 40 | else 41 | apt-get install -y chef=$CHEF_VERSION 42 | fi 43 | ;; 44 | 45 | *) 46 | echo "Unsupported method for installing chef" 47 | exit -1 48 | ;; 49 | esac 50 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | apt-get -y clean 5 | 6 | # Removing leftover leases and persistent rules 7 | echo "cleaning up dhcp leases" 8 | rm /var/lib/dhcp/* 9 | 10 | # Make sure Udev doesn't block our network 11 | echo "cleaning up udev rules" 12 | rm /etc/udev/rules.d/70-persistent-net.rules 13 | mkdir /etc/udev/rules.d/70-persistent-net.rules 14 | rm -rf /dev/.udev/ 15 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 16 | 17 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 18 | echo "pre-up sleep 2" >> /etc/network/interfaces 19 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | #Thanks to Fletcher Nichol - https://github.com/fnichol 2 | 3 | Veewee::Definition.declare({ 4 | :cpu_count => '1', 5 | :memory_size=> '256', 6 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 7 | :os_type_id => 'Debian_64', 8 | :iso_file => "debian-wheezy-DI-rc1-amd64-netinst.iso", 9 | :iso_src => "http://cdimage.debian.org/cdimage/wheezy_di_rc1/amd64/iso-cd/debian-wheezy-DI-rc1-amd64-netinst.iso", 10 | :iso_md5 => "412f77d4b98adf2a7d575745fd282d78", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", :boot_cmd_sequence => [ 13 | '', 14 | 'install ', 15 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US ', 17 | 'auto ', 18 | 'locale=en_US ', 19 | 'kbd-chooser/method=us ', 20 | 'netcfg/get_hostname=%NAME% ', 21 | 'netcfg/get_domain=vagrantup.com ', 22 | 'fb=false ', 23 | 'debconf/frontend=noninteractive ', 24 | 'console-setup/ask_detect=false ', 25 | 'console-keymaps-at/keymap=us ', 26 | 'keyboard-configuration/xkb-keymap=us ', 27 | '' 28 | ], 29 | :kickstart_port => "7122", 30 | :kickstart_timeout => "10000", 31 | :kickstart_file => "preseed.cfg", 32 | :ssh_login_timeout => "10000", 33 | :ssh_user => "vagrant", 34 | :ssh_password => "vagrant", 35 | :ssh_key => "", 36 | :ssh_host_port => "7222", 37 | :ssh_guest_port => "22", 38 | :sudo_cmd => "echo '%p'|sudo -S bash '%f'", 39 | :shutdown_cmd => "halt -p", 40 | :postinstall_files => [ 41 | "base.sh", 42 | "vagrant.sh", 43 | #"virtualbox.sh", 44 | "vmfusion.sh", 45 | #"ruby.sh", 46 | #"puppet.sh", 47 | #"chef.sh", 48 | #"cleanup-virtualbox.sh", 49 | "cleanup.sh", 50 | "zerodisk.sh" 51 | ], 52 | :postinstall_timeout => "10000" 53 | }) 54 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/puppet.sh: -------------------------------------------------------------------------------- 1 | if [ -f .veewee_params ] 2 | then 3 | . .veewee_params 4 | fi 5 | 6 | # Add puppet user and group 7 | adduser --system --group --home /var/lib/puppet puppet 8 | 9 | # Installing Puppet 10 | if [ -z "$PUPPET_VERSION" ]; then 11 | # Default to latest 12 | gem install puppet --no-ri --no-rdoc 13 | else 14 | gem install puppet --no-ri --no-rdoc --version $PUPPET_VERSION 15 | fi 16 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libopenssl-ruby1.8 irb ri rdoc 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.8.22 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Create the user vagrant with password vagrant 6 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 7 | 8 | # Install vagrant keys 9 | mkdir -pm 700 /home/vagrant/.ssh 10 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 11 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 12 | chmod 0600 /home/vagrant/.ssh/authorized_keys 13 | chown -R vagrant:vagrant /home/vagrant/.ssh 14 | 15 | # Customize the message of the day 16 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 17 | 18 | # Install NFS client 19 | apt-get -y install nfs-common 20 | 21 | 22 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 1 | if test -f .vbox_version ; then 2 | # The netboot installs the VirtualBox support (old) so we have to remove it 3 | if test -f /etc/init.d/virtualbox-ose-guest-utils ; then 4 | /etc/init.d/virtualbox-ose-guest-utils stop 5 | fi 6 | 7 | rmmod vboxguest 8 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 9 | 10 | # Install dkms for dynamic compiles 11 | 12 | apt-get install -y dkms 13 | 14 | # If libdbus is not installed, virtualbox will not autostart 15 | apt-get -y install --no-install-recommends libdbus-1-3 16 | 17 | # Install the VirtualBox guest additions 18 | VBOX_VERSION=$(cat .vbox_version) 19 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 20 | mount -o loop $VBOX_ISO /mnt 21 | yes|sh /mnt/VBoxLinuxAdditions.run 22 | umount /mnt 23 | 24 | 25 | # Start the newly build driver 26 | /etc/init.d/vboxadd start 27 | 28 | # Make a temporary mount point 29 | mkdir /tmp/veewee-validation 30 | 31 | # Test mount the veewee-validation 32 | mount -t vboxsf veewee-validation /tmp/veewee-validation 33 | 34 | fi 35 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/vagrant/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/base.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | apt-get -y update 3 | apt-get -y install linux-headers-$(uname -r) build-essential 4 | apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev 5 | apt-get -y install curl unzip 6 | 7 | # Set up sudo 8 | echo 'vagrant ALL=NOPASSWD:ALL' > /etc/sudoers.d/vagrant 9 | 10 | # Tweak sshd to prevent DNS resolution (speed up logins) 11 | echo 'UseDNS no' >> /etc/ssh/sshd_config 12 | 13 | # Remove 5s grub timeout to speed up booting 14 | cat < /etc/default/grub 15 | # If you change this file, run 'update-grub' afterwards to update 16 | # /boot/grub/grub.cfg. 17 | 18 | GRUB_DEFAULT=0 19 | GRUB_TIMEOUT=0 20 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 21 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 22 | GRUB_CMDLINE_LINUX="debian-installer=en_US" 23 | EOF 24 | 25 | update-grub 26 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/chef.sh: -------------------------------------------------------------------------------- 1 | if [ -f .veewee_params ] 2 | then 3 | . .veewee_params 4 | fi 5 | 6 | # Default to Gem install 7 | if [ -z "$CHEF_INSTALLMETHOD" ]; then 8 | export CHEF_INSTALLMETHOD="gems" 9 | fi 10 | 11 | # Installing chef 12 | case $CHEF_INSTALLMETHOD in 13 | "gems") 14 | # Using gems 15 | if [ -z "$CHEF_VERSION" ]; then 16 | # Default to latest 17 | gem install chef --no-ri --no-rdoc 18 | else 19 | gem install chef --no-ri --no-rdoc --version $CHEF_VERSION 20 | fi 21 | ;; 22 | 23 | "omnibus") 24 | # Using omnibus 25 | if [ -z "$CHEF_VERSION" ]; then 26 | # Default to latest 27 | wget -O - http://opscode.com/chef/install.sh | sudo bash -s 28 | else 29 | wget -O - http://opscode.com/chef/install.sh | sudo bash -s -- -v $CHEF_VERSION 30 | fi 31 | ;; 32 | 33 | "package") 34 | # Using packages 35 | apt-get install -y debconf-utils 36 | echo "chef chef/chef_server_url string $CHEF_SERVER_URL" | debconf-set-selections 37 | if [ -z "$CHEF_VERSION" ]; then 38 | # Default to latest 39 | apt-get install -y chef 40 | else 41 | apt-get install -y chef=$CHEF_VERSION 42 | fi 43 | ;; 44 | 45 | *) 46 | echo "Unsupported method for installing chef" 47 | exit -1 48 | ;; 49 | esac 50 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/cleanup-virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Cleanup Virtualbox 2 | VBOX_VERSION=$(cat .vbox_version) 3 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 4 | rm $VBOX_ISO 5 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Clean up 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | apt-get -y clean 5 | 6 | # Removing leftover leases and persistent rules 7 | echo "cleaning up dhcp leases" 8 | rm /var/lib/dhcp/* 9 | 10 | # Make sure Udev doesn't block our network 11 | echo "cleaning up udev rules" 12 | rm /etc/udev/rules.d/70-persistent-net.rules 13 | mkdir /etc/udev/rules.d/70-persistent-net.rules 14 | rm -rf /dev/.udev/ 15 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 16 | 17 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 18 | echo "pre-up sleep 2" >> /etc/network/interfaces 19 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/definition.rb: -------------------------------------------------------------------------------- 1 | #Thanks to Fletcher Nichol - https://github.com/fnichol 2 | 3 | Veewee::Definition.declare({ 4 | :cpu_count => '1', 5 | :memory_size=> '256', 6 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 7 | :os_type_id => 'Debian_64', 8 | :iso_file => "debian-wheezy-DI-rc1-amd64-netinst.iso", 9 | :iso_src => "http://cdimage.debian.org/cdimage/wheezy_di_rc1/amd64/iso-cd/debian-wheezy-DI-rc1-amd64-netinst.iso", 10 | :iso_md5 => "412f77d4b98adf2a7d575745fd282d78", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", :boot_cmd_sequence => [ 13 | '', 14 | 'install ', 15 | 'preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US ', 17 | 'auto ', 18 | 'locale=en_US ', 19 | 'kbd-chooser/method=us ', 20 | 'netcfg/get_hostname=%NAME% ', 21 | 'netcfg/get_domain=vagrantup.com ', 22 | 'fb=false ', 23 | 'debconf/frontend=noninteractive ', 24 | 'console-setup/ask_detect=false ', 25 | 'console-keymaps-at/keymap=us ', 26 | 'keyboard-configuration/xkb-keymap=us ', 27 | '' 28 | ], 29 | :kickstart_port => "7122", 30 | :kickstart_timeout => "10000", 31 | :kickstart_file => "preseed.cfg", 32 | :ssh_login_timeout => "10000", 33 | :ssh_user => "vagrant", 34 | :ssh_password => "vagrant", 35 | :ssh_key => "", 36 | :ssh_host_port => "7222", 37 | :ssh_guest_port => "22", 38 | :sudo_cmd => "echo '%p'|sudo -S bash '%f'", 39 | :shutdown_cmd => "halt -p", 40 | :postinstall_files => [ 41 | "base.sh", 42 | "vagrant.sh", 43 | #"virtualbox.sh", 44 | "vmfusion.sh", 45 | "ruby.sh", 46 | "puppet.sh", 47 | "chef.sh", 48 | #"cleanup-virtualbox.sh", 49 | "cleanup.sh", 50 | "zerodisk.sh" 51 | ], 52 | :postinstall_timeout => "10000" 53 | }) 54 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/puppet.sh: -------------------------------------------------------------------------------- 1 | if [ -f .veewee_params ] 2 | then 3 | . .veewee_params 4 | fi 5 | 6 | # Add puppet user and group 7 | adduser --system --group --home /var/lib/puppet puppet 8 | 9 | # Installing Puppet 10 | if [ -z "$PUPPET_VERSION" ]; then 11 | # Default to latest 12 | gem install puppet --no-ri --no-rdoc 13 | else 14 | gem install puppet --no-ri --no-rdoc --version $PUPPET_VERSION 15 | fi 16 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from packages 2 | apt-get -y install ruby ruby-dev libopenssl-ruby1.8 irb ri rdoc 3 | 4 | # Install Rubygems from source 5 | rg_ver=1.8.22 6 | curl -o /tmp/rubygems-${rg_ver}.zip \ 7 | "http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip" 8 | (cd /tmp && unzip rubygems-${rg_ver}.zip && \ 9 | cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable) 10 | rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip 11 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/vagrant.sh: -------------------------------------------------------------------------------- 1 | # Set up Vagrant. 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Create the user vagrant with password vagrant 6 | useradd -G sudo -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant 7 | 8 | # Install vagrant keys 9 | mkdir -pm 700 /home/vagrant/.ssh 10 | curl -Lo /home/vagrant/.ssh/authorized_keys \ 11 | 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' 12 | chmod 0600 /home/vagrant/.ssh/authorized_keys 13 | chown -R vagrant:vagrant /home/vagrant/.ssh 14 | 15 | # Customize the message of the day 16 | echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd 17 | 18 | # Install NFS client 19 | apt-get -y install nfs-common 20 | 21 | 22 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/virtualbox.sh: -------------------------------------------------------------------------------- 1 | if test -f .vbox_version ; then 2 | # The netboot installs the VirtualBox support (old) so we have to remove it 3 | if test -f /etc/init.d/virtualbox-ose-guest-utils ; then 4 | /etc/init.d/virtualbox-ose-guest-utils stop 5 | fi 6 | 7 | rmmod vboxguest 8 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 9 | 10 | # Install dkms for dynamic compiles 11 | 12 | apt-get install -y dkms 13 | 14 | # If libdbus is not installed, virtualbox will not autostart 15 | apt-get -y install --no-install-recommends libdbus-1-3 16 | 17 | # Install the VirtualBox guest additions 18 | VBOX_VERSION=$(cat .vbox_version) 19 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 20 | mount -o loop $VBOX_ISO /mnt 21 | yes|sh /mnt/VBoxLinuxAdditions.run 22 | umount /mnt 23 | 24 | 25 | # Start the newly build driver 26 | /etc/init.d/vboxadd start 27 | 28 | # Make a temporary mount point 29 | mkdir /tmp/veewee-validation 30 | 31 | # Test mount the veewee-validation 32 | mount -t vboxsf veewee-validation /tmp/veewee-validation 33 | 34 | fi 35 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/vagrant/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/debian-70rc1-x64-vf503/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vbox4210-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | # Minimum RAM requirement for installation is 512MB. 3 | :cpu_count => '1', :memory_size=> '512', 4 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :hwvirtext => 'on', 5 | :os_type_id => 'Fedora_64', 6 | :iso_file => "Fedora-18-x86_64-DVD.iso", 7 | :iso_src => "http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/Fedora-18-x86_64-DVD.iso", 8 | :iso_md5 => "17d5c860bf9dc83e035882a7b33ffc77", 9 | :iso_download_timeout => 1000, 10 | :boot_wait => "10", :boot_cmd_sequence => [ ' linux text biosdevname=0 ks=http://%IP%:%PORT%/ks.cfg' ], 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 | }) 18 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vbox4210-nocm/ks.cfg: -------------------------------------------------------------------------------- 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 76 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vbox4210-nocm/postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 6 | 7 | # Must exclude kernel for now. Otherwise, kernel gets upgraded before reboot, 8 | # but VirtualBox tools get compiled against the old kernel, so the fresh 9 | # image will refuse to start under Vagrant. 10 | yum -y update --exclude kernel* 11 | 12 | yum -y install \ 13 | wget \ 14 | tar \ 15 | bzip2 16 | 17 | cd /tmp 18 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 19 | mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 20 | sh /mnt/VBoxLinuxAdditions.run 21 | umount /mnt 22 | rm VBoxGuestAdditions_$VBOX_VERSION.iso 23 | 24 | exit 25 | 26 | # EOF 27 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vbox4210/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | # Minimum RAM requirement for installation is 512MB. 3 | :cpu_count => '1', :memory_size=> '512', 4 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :hwvirtext => 'on', 5 | :os_type_id => 'Fedora_64', 6 | :iso_file => "Fedora-18-x86_64-DVD.iso", 7 | :iso_src => "http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/Fedora-18-x86_64-DVD.iso", 8 | :iso_md5 => "17d5c860bf9dc83e035882a7b33ffc77", 9 | :iso_download_timeout => 1000, 10 | :boot_wait => "10", :boot_cmd_sequence => [ ' linux text biosdevname=0 ks=http://%IP%:%PORT%/ks.cfg' ], 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 | }) 18 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vbox4210/ks.cfg: -------------------------------------------------------------------------------- 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 76 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vbox4210/postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 6 | 7 | # Must exclude kernel for now. Otherwise, kernel gets upgraded before reboot, 8 | # but VirtualBox tools get compiled against the old kernel, so the fresh 9 | # image will refuse to start under Vagrant. 10 | yum -y update --exclude kernel* 11 | 12 | yum -y install \ 13 | ruby \ 14 | ruby-devel \ 15 | puppet \ 16 | rubygems \ 17 | rubygem-bunny \ 18 | rubygem-erubis \ 19 | rubygem-highline \ 20 | rubygem-json \ 21 | rubygem-mime-types \ 22 | rubygem-net-ssh \ 23 | rubygem-polyglot \ 24 | rubygem-rest-client \ 25 | rubygem-systemu \ 26 | rubygem-treetop \ 27 | rubygem-uuidtools \ 28 | wget \ 29 | tar \ 30 | bzip2 31 | 32 | cd /tmp 33 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 34 | mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 35 | sh /mnt/VBoxLinuxAdditions.run 36 | umount /mnt 37 | rm VBoxGuestAdditions_$VBOX_VERSION.iso 38 | 39 | gem install chef --no-rdoc --no-ri 40 | 41 | exit 42 | 43 | # EOF 44 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/base.sh: -------------------------------------------------------------------------------- 1 | # Base install 2 | 3 | # Enable updates-testing repo 4 | sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/fedora-updates-testing.repo 5 | 6 | # Must exclude kernel for now. Otherwise, kernel gets upgraded before reboot, 7 | # but VirtualBox tools get compiled against the old kernel, so the fresh 8 | # image will refuse to start under Vagrant. 9 | yum -y update --exclude kernel* 10 | 11 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget dkms tar bzip2 net-tools 12 | 13 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | # Install pre-requisites 2 | yum -y install \ 3 | rubygem-bunny \ 4 | rubygem-erubis \ 5 | rubygem-highline \ 6 | rubygem-json \ 7 | rubygem-mime-types \ 8 | rubygem-net-ssh \ 9 | rubygem-polyglot \ 10 | rubygem-rest-client \ 11 | rubygem-systemu \ 12 | rubygem-treetop \ 13 | rubygem-uuidtools 14 | 15 | # Install Chef 16 | gem install --no-ri --no-rdoc chef 17 | 18 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | 5 | # Remove traces of mac address from network configuration 6 | sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0 7 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | # Minimum RAM requirement for installation is 512MB. 3 | :cpu_count => '1', 4 | :memory_size=> '512', 5 | :disk_size => '10140', 6 | :disk_format => 'VDI', 7 | :hostiocache => 'off', 8 | :hwvirtext => 'on', 9 | :os_type_id => 'Fedora_64', 10 | :iso_file => "Fedora-18-x86_64-DVD.iso", 11 | :iso_src => "http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/Fedora-18-x86_64-DVD.iso", 12 | :iso_md5 => "17d5c860bf9dc83e035882a7b33ffc77", 13 | :iso_download_timeout => 1000, 14 | :boot_wait => "10", 15 | :boot_cmd_sequence => [ ' linux text biosdevname=0 ks=http://%IP%:%PORT%/ks.cfg' ], 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", 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 | "vmfusion.sh", 35 | "cleanup.sh", 36 | "zerodisk.sh" 37 | ], 38 | :postinstall_timeout => 10000 39 | }) 40 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/ks.cfg: -------------------------------------------------------------------------------- 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 76 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | yum -y install puppet facter 3 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby 2 | yum -y install ruby ruby-devel rubygems 3 | 4 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/vagrant.sh: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 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 | 9 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | umount /mnt/cdrom 7 | rm /home/vagrant/linux.iso 8 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/base.sh: -------------------------------------------------------------------------------- 1 | # Base install 2 | 3 | # Enable updates-testing repo 4 | sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/fedora-updates-testing.repo 5 | 6 | # Must exclude kernel for now. Otherwise, kernel gets upgraded before reboot, 7 | # but VirtualBox tools get compiled against the old kernel, so the fresh 8 | # image will refuse to start under Vagrant. 9 | yum -y update --exclude kernel* 10 | 11 | yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget dkms tar bzip2 12 | 13 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/chef.sh: -------------------------------------------------------------------------------- 1 | # Install pre-requisites 2 | yum -y install \ 3 | rubygem-bunny \ 4 | rubygem-erubis \ 5 | rubygem-highline \ 6 | rubygem-json \ 7 | rubygem-mime-types \ 8 | rubygem-net-ssh \ 9 | rubygem-polyglot \ 10 | rubygem-rest-client \ 11 | rubygem-systemu \ 12 | rubygem-treetop \ 13 | rubygem-uuidtools 14 | 15 | # Install Chef 16 | gem install --no-ri --no-rdoc chef 17 | 18 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/cleanup.sh: -------------------------------------------------------------------------------- 1 | yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts 2 | yum -y clean all 3 | rm -rf VBoxGuestAdditions_*.iso 4 | 5 | # Remove traces of mac address from network configuration 6 | sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0 7 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | # Minimum RAM requirement for installation is 512MB. 3 | :cpu_count => '1', 4 | :memory_size=> '512', 5 | :disk_size => '10140', 6 | :disk_format => 'VDI', 7 | :hostiocache => 'off', 8 | :hwvirtext => 'on', 9 | :os_type_id => 'Fedora_64', 10 | :iso_file => "Fedora-18-x86_64-DVD.iso", 11 | :iso_src => "http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/Fedora-18-x86_64-DVD.iso", 12 | :iso_md5 => "17d5c860bf9dc83e035882a7b33ffc77", 13 | :iso_download_timeout => 1000, 14 | :boot_wait => "10", 15 | :boot_cmd_sequence => [ ' linux text biosdevname=0 ks=http://%IP%:%PORT%/ks.cfg' ], 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", 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 | "vmfusion.sh", 35 | "cleanup.sh", 36 | "zerodisk.sh" 37 | ], 38 | :postinstall_timeout => 10000 39 | }) 40 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/ks.cfg: -------------------------------------------------------------------------------- 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 76 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | yum -y install puppet facter 3 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby 2 | yum -y install ruby ruby-devel rubygems 3 | 4 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/vagrant.sh: -------------------------------------------------------------------------------- 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 19 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/virtualbox.sh: -------------------------------------------------------------------------------- 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 | 9 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | umount /mnt/cdrom 7 | rm /home/vagrant/linux.iso 8 | -------------------------------------------------------------------------------- /definitions/fedora-18-x64-vf503/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/sles-11sp1-x64-vbox4210-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :os_type_id => 'OpenSUSE_64', 3 | :cpu_count => '1', 4 | :memory_size => '1024', 5 | :disk_size => '20480', 6 | :disk_format => 'VDI', 7 | :hostiocache => 'off', 8 | :iso_file => "SLES-11-SP1-DVD-x86_64-GM-DVD1.iso", 9 | :iso_src => "", 10 | :iso_md5 => "d2e10420f3689faa49a004b60fb396b7", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", 13 | :boot_cmd_sequence => [ 14 | '', 15 | 'linux netdevice=eth0 netsetup=dhcp install=cd:/', 16 | ' lang=en_US autoyast=http://%IP%:%PORT%/autoinst_en.xml', 17 | ### disable prev line and enable next line to install with german settings 18 | #' lang=de_DE autoyast=http://%IP%:%PORT%/autoinst_de.xml', 19 | ' textmode=1', 20 | '' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => ["autoinst_en.xml", "autoinst_en.xml"], 25 | ### disable prev line and enable next line to install with german settings 26 | #:kickstart_file => ["autoinst_de.xml", "autoinst_de.xml"], 27 | :ssh_login_timeout => "10000", 28 | :ssh_user => "vagrant", 29 | :ssh_password => "vagrant", 30 | :ssh_key => "", 31 | :ssh_host_port => "7222", 32 | :ssh_guest_port => "22", 33 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 34 | :shutdown_cmd => "shutdown -P now", 35 | :postinstall_files => ["postinstall.sh"], 36 | :postinstall_timeout => "10000" 37 | }) 38 | -------------------------------------------------------------------------------- /definitions/sles-11sp1-x64-vbox4210-nocm/postinstall.sh: -------------------------------------------------------------------------------- 1 | # 2 | # postinstall.sh 3 | # 4 | 5 | date > /etc/vagrant_box_build_time 6 | 7 | # remove zypper locks on removed packages to avoid later dependency problems 8 | zypper --non-interactive rl \* 9 | 10 | # install vagrant key 11 | echo -e "\ninstall vagrant key ..." 12 | mkdir -m 0700 /home/vagrant/.ssh 13 | cd /home/vagrant/.ssh 14 | wget --no-check-certificate -O authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub 15 | chmod 0600 /home/vagrant/.ssh/authorized_keys 16 | chown -R vagrant.users /home/vagrant/.ssh 17 | 18 | # update sudoers 19 | echo -e "\nupdate sudoers ..." 20 | echo -e "\n# added by veewee/postinstall.sh" >> /etc/sudoers 21 | echo -e "vagrant ALL=(ALL) NOPASSWD: ALL\n" >> /etc/sudoers 22 | 23 | # speed-up remote logins 24 | echo -e "\nspeed-up remote logins ..." 25 | echo -e "\n# added by veewee/postinstall.sh" >> /etc/ssh/sshd_config 26 | echo -e "UseDNS no\n" >> /etc/ssh/sshd_config 27 | 28 | # install the virtualbox guest additions 29 | echo -e "\ninstall the virtualbox guest additions ..." 30 | zypper --non-interactive remove `rpm -qa virtualbox-guest-*` >/dev/null 2>&1 31 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 32 | cd /tmp 33 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 34 | #wget http://192.168.178.10/VBoxGuestAdditions_$VBOX_VERSION.iso 35 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 36 | sh /mnt/VBoxLinuxAdditions.run 37 | umount /mnt 38 | rm -f VBoxGuestAdditions_$VBOX_VERSION.iso 39 | 40 | echo -e "\nall done.\n" 41 | exit 42 | -------------------------------------------------------------------------------- /definitions/sles-11sp1-x64-vbox4210/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :os_type_id => 'OpenSUSE_64', 3 | :cpu_count => '1', 4 | :memory_size => '1024', 5 | :disk_size => '20480', 6 | :disk_format => 'VDI', 7 | :hostiocache => 'off', 8 | :iso_file => "SLES-11-SP1-DVD-x86_64-GM-DVD1.iso", 9 | :iso_src => "", 10 | :iso_md5 => "d2e10420f3689faa49a004b60fb396b7", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", 13 | :boot_cmd_sequence => [ 14 | '', 15 | 'linux netdevice=eth0 netsetup=dhcp install=cd:/', 16 | ' lang=en_US autoyast=http://%IP%:%PORT%/autoinst_en.xml', 17 | ### disable prev line and enable next line to install with german settings 18 | #' lang=de_DE autoyast=http://%IP%:%PORT%/autoinst_de.xml', 19 | ' textmode=1', 20 | '' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => ["autoinst_en.xml", "autoinst_en.xml"], 25 | ### disable prev line and enable next line to install with german settings 26 | #:kickstart_file => ["autoinst_de.xml", "autoinst_de.xml"], 27 | :ssh_login_timeout => "10000", 28 | :ssh_user => "vagrant", 29 | :ssh_password => "vagrant", 30 | :ssh_key => "", 31 | :ssh_host_port => "7222", 32 | :ssh_guest_port => "22", 33 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 34 | :shutdown_cmd => "shutdown -P now", 35 | :postinstall_files => ["postinstall.sh"], 36 | :postinstall_timeout => "10000" 37 | }) 38 | -------------------------------------------------------------------------------- /definitions/sles-11sp1-x64-vbox4210/postinstall.sh: -------------------------------------------------------------------------------- 1 | # 2 | # postinstall.sh 3 | # 4 | 5 | date > /etc/vagrant_box_build_time 6 | 7 | # remove zypper locks on removed packages to avoid later dependency problems 8 | zypper --non-interactive rl \* 9 | 10 | # install vagrant key 11 | echo -e "\ninstall vagrant key ..." 12 | mkdir -m 0700 /home/vagrant/.ssh 13 | cd /home/vagrant/.ssh 14 | wget --no-check-certificate -O authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub 15 | chmod 0600 /home/vagrant/.ssh/authorized_keys 16 | chown -R vagrant.users /home/vagrant/.ssh 17 | 18 | # update sudoers 19 | echo -e "\nupdate sudoers ..." 20 | echo -e "\n# added by veewee/postinstall.sh" >> /etc/sudoers 21 | echo -e "vagrant ALL=(ALL) NOPASSWD: ALL\n" >> /etc/sudoers 22 | 23 | # speed-up remote logins 24 | echo -e "\nspeed-up remote logins ..." 25 | echo -e "\n# added by veewee/postinstall.sh" >> /etc/ssh/sshd_config 26 | echo -e "UseDNS no\n" >> /etc/ssh/sshd_config 27 | 28 | # install chef and puppet 29 | echo -e "\ninstall chef and puppet ..." 30 | gem install chef --no-ri --no-rdoc 31 | gem install puppet --no-ri --no-rdoc 32 | 33 | # install the virtualbox guest additions 34 | echo -e "\ninstall the virtualbox guest additions ..." 35 | zypper --non-interactive remove `rpm -qa virtualbox-guest-*` >/dev/null 2>&1 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 | #wget http://192.168.178.10/VBoxGuestAdditions_$VBOX_VERSION.iso 40 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 41 | sh /mnt/VBoxLinuxAdditions.run 42 | umount /mnt 43 | rm -f VBoxGuestAdditions_$VBOX_VERSION.iso 44 | 45 | echo -e "\nall done.\n" 46 | exit 47 | -------------------------------------------------------------------------------- /definitions/sles-11sp1-x64/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :os_type_id => 'OpenSUSE_64', 3 | :cpu_count => '1', 4 | :memory_size => '1024', 5 | :disk_size => '20480', 6 | :disk_format => 'VDI', 7 | :hostiocache => 'off', 8 | :iso_file => "SLES-11-SP1-DVD-x86_64-GM-DVD1.iso", 9 | :iso_src => "", 10 | :iso_md5 => "d2e10420f3689faa49a004b60fb396b7", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", 13 | :boot_cmd_sequence => [ 14 | '', 15 | 'linux netdevice=eth0 netsetup=dhcp install=cd:/', 16 | ' lang=en_US autoyast=http://%IP%:%PORT%/autoinst_en.xml', 17 | ### disable prev line and enable next line to install with german settings 18 | #' lang=de_DE autoyast=http://%IP%:%PORT%/autoinst_de.xml', 19 | ' textmode=1', 20 | '' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => ["autoinst_en.xml", "autoinst_en.xml"], 25 | ### disable prev line and enable next line to install with german settings 26 | #:kickstart_file => ["autoinst_de.xml", "autoinst_de.xml"], 27 | :ssh_login_timeout => "10000", 28 | :ssh_user => "vagrant", 29 | :ssh_password => "vagrant", 30 | :ssh_key => "", 31 | :ssh_host_port => "7222", 32 | :ssh_guest_port => "22", 33 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 34 | :shutdown_cmd => "shutdown -P now", 35 | :postinstall_files => ["postinstall.sh"], 36 | :postinstall_timeout => "10000" 37 | }) 38 | -------------------------------------------------------------------------------- /definitions/sles-11sp1-x64/postinstall.sh: -------------------------------------------------------------------------------- 1 | # 2 | # postinstall.sh 3 | # 4 | 5 | date > /etc/vagrant_box_build_time 6 | 7 | # remove zypper locks on removed packages to avoid later dependency problems 8 | zypper --non-interactive rl \* 9 | 10 | # install vagrant key 11 | echo -e "\ninstall vagrant key ..." 12 | mkdir -m 0700 /home/vagrant/.ssh 13 | cd /home/vagrant/.ssh 14 | wget --no-check-certificate -O authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub 15 | chmod 0600 /home/vagrant/.ssh/authorized_keys 16 | chown -R vagrant.users /home/vagrant/.ssh 17 | 18 | # update sudoers 19 | echo -e "\nupdate sudoers ..." 20 | echo -e "\n# added by veewee/postinstall.sh" >> /etc/sudoers 21 | echo -e "vagrant ALL=(ALL) NOPASSWD: ALL\n" >> /etc/sudoers 22 | 23 | # speed-up remote logins 24 | echo -e "\nspeed-up remote logins ..." 25 | echo -e "\n# added by veewee/postinstall.sh" >> /etc/ssh/sshd_config 26 | echo -e "UseDNS no\n" >> /etc/ssh/sshd_config 27 | 28 | # install chef and puppet 29 | echo -e "\ninstall chef and puppet ..." 30 | gem install chef --no-ri --no-rdoc 31 | gem install puppet --no-ri --no-rdoc 32 | 33 | # install the virtualbox guest additions 34 | echo -e "\ninstall the virtualbox guest additions ..." 35 | zypper --non-interactive remove `rpm -qa virtualbox-guest-*` >/dev/null 2>&1 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 | #wget http://192.168.178.10/VBoxGuestAdditions_$VBOX_VERSION.iso 40 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 41 | sh /mnt/VBoxLinuxAdditions.run 42 | umount /mnt 43 | rm -f VBoxGuestAdditions_$VBOX_VERSION.iso 44 | 45 | echo -e "\nall done.\n" 46 | exit 47 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-1004-x64/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :cpu_count => '1', :memory_size=> '384', 3 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 4 | :os_type_id => 'Ubuntu', 5 | :iso_file => "ubuntu-10.04.4-server-amd64.iso", 6 | :iso_src => "http://releases.ubuntu.com/10.04.4/ubuntu-10.04.4-server-amd64.iso", 7 | :iso_md5 => "9b218654cdcdf9722171648c52f8a088", 8 | :iso_download_timeout => "1000", 9 | :boot_wait => "10", :boot_cmd_sequence => [ 10 | '', 11 | '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 12 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 13 | 'hostname=%NAME% ', 14 | 'fb=false debconf/frontend=noninteractive ', 15 | 'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ', 16 | 'initrd=/install/initrd.gz -- ' 17 | ], 18 | :kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "preseed.cfg", 19 | :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "", 20 | :ssh_host_port => "7222", :ssh_guest_port => "22", 21 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 22 | :shutdown_cmd => "shutdown -P now", 23 | :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000" 24 | }) 25 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/base.sh: -------------------------------------------------------------------------------- 1 | # Apt-install various things necessary for Ruby, guest additions, 2 | # etc., and remove optional things to trim down the machine. 3 | apt-get -y update 4 | apt-get -y upgrade 5 | apt-get -y install linux-headers-$(uname -r) build-essential 6 | apt-get -y install zlib1g-dev libssl-dev libreadline5-dev 7 | apt-get clean 8 | 9 | # Setup sudo to allow no-password sudo for "admin" 10 | cp /etc/sudoers /etc/sudoers.orig 11 | sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers 12 | sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers 13 | 14 | # Install NFS client 15 | apt-get -y install nfs-common 16 | 17 | # Need conditionals around `mesg n` so that Chef doesn't throw 18 | # `stdin: not a tty` 19 | sed -i '$d' /root/.profile 20 | cat << 'EOH' >> /root/.profile 21 | if `tty -s`; then 22 | mesg n 23 | fi 24 | EOH 25 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | # Installing chef 2 | /opt/ruby/bin/gem install chef --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Remove items used for building, since they aren't needed anymore 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | 5 | # Clean up tmp 6 | rm -rf /tmp/* 7 | 8 | # Removing leftover leases and persistent rules 9 | echo "cleaning up dhcp leases" 10 | rm /var/lib/dhcp3/* 11 | 12 | # Make sure Udev doesn't block our network 13 | # http://6.ptmc.org/?p=164 14 | echo "cleaning up udev rules" 15 | rm /etc/udev/rules.d/70-persistent-net.rules 16 | mkdir /etc/udev/rules.d/70-persistent-net.rules 17 | rm -rf /dev/.udev/ 18 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 19 | 20 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 21 | echo "pre-up sleep 2" >> /etc/network/interfaces 22 | 23 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '384', 4 | :disk_size => '10140', 5 | :disk_format => 'VDI', 6 | :hostiocache => 'off', 7 | :os_type_id => 'Ubuntu_64', 8 | :iso_file => "ubuntu-10.04.4-server-amd64.iso", 9 | :iso_src => "http://releases.ubuntu.com/10.04.4/ubuntu-10.04.4-server-amd64.iso", 10 | :iso_md5 => "9b218654cdcdf9722171648c52f8a088", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", 13 | :boot_cmd_sequence => [ 14 | '', 15 | '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 17 | 'hostname=%NAME% ', 18 | 'fb=false debconf/frontend=noninteractive ', 19 | 'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ', 20 | 'initrd=/install/initrd.gz -- ' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => "preseed.cfg", 25 | :ssh_login_timeout => "10000", 26 | :ssh_user => "vagrant", 27 | :ssh_password => "vagrant", 28 | :ssh_key => "", 29 | :ssh_host_port => "7222", 30 | :ssh_guest_port => "22", 31 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 32 | :shutdown_cmd => "shutdown -P now", 33 | :postinstall_files => [ 34 | # "postinstall.sh", 35 | "base.sh", 36 | "vagrant.sh", 37 | # "virtualbox.sh", 38 | "vmfusion.sh", 39 | # "ruby.sh", 40 | # "puppet.sh", 41 | # "chef.sh", 42 | "cleanup.sh", 43 | "zerodisk.sh", 44 | ], 45 | :postinstall_timeout => "10000" 46 | }) 47 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install puppet from gem 2 | /opt/ruby/bin/gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | i# Install Ruby from source in /opt so that users of Vagrant 2 | # can install their own Rubies using packages or however. 3 | # We must install the 1.8.x series since Puppet doesn't support 4 | # Ruby 1.9 yet. 5 | wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz 6 | tar xvzf ruby-1.8.7-p334.tar.gz 7 | cd ruby-1.8.7-p334 8 | ./configure --prefix=/opt/ruby 9 | make 10 | make install 11 | cd .. 12 | rm -rf ruby-1.8.7-p334* 13 | 14 | # Install RubyGems 1.8.17 15 | wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.17.tgz 16 | tar xzf rubygems-1.8.17.tgz 17 | cd rubygems-1.8.17 18 | /opt/ruby/bin/ruby setup.rb 19 | cd .. 20 | rm -rf rubygems-1.8.17* 21 | 22 | # Add /opt/ruby/bin to the global path as the last resort so 23 | # Ruby, RubyGems, and Chef/Puppet are visible 24 | echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh 25 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | # Setup sudo to allow no-password sudo for "sudo" 4 | usermod -a -G sudo vagrant 5 | 6 | # Installing vagrant keys 7 | mkdir /home/vagrant/.ssh 8 | chmod 700 /home/vagrant/.ssh 9 | cd /home/vagrant/.ssh 10 | groupadd -r admin 11 | usermod -a -G admin vagrant 12 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 13 | chmod 600 /home/vagrant/.ssh/authorized_keys 14 | chown -R vagrant /home/vagrant/.ssh 15 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Installing the virtualbox guest additions 2 | apt-get -y install dkms 3 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 4 | cd /tmp 5 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 6 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 7 | sh /mnt/VBoxLinuxAdditions.run 8 | umount /mnt 9 | 10 | rm VBoxGuestAdditions_$VBOX_VERSION.iso 11 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | umount /mnt/cdrom 7 | rm /home/vagrant/linux.iso 8 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/base.sh: -------------------------------------------------------------------------------- 1 | # Apt-install various things necessary for Ruby, guest additions, 2 | # etc., and remove optional things to trim down the machine. 3 | apt-get -y update 4 | apt-get -y upgrade 5 | apt-get -y install linux-headers-$(uname -r) build-essential 6 | apt-get -y install zlib1g-dev libssl-dev libreadline5-dev 7 | apt-get clean 8 | 9 | # Setup sudo to allow no-password sudo for "admin" 10 | cp /etc/sudoers /etc/sudoers.orig 11 | sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers 12 | sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers 13 | 14 | # Install NFS client 15 | apt-get -y install nfs-common 16 | 17 | # Need conditionals around `mesg n` so that Chef doesn't throw 18 | # `stdin: not a tty` 19 | sed -i '$d' /root/.profile 20 | cat << 'EOH' >> /root/.profile 21 | if `tty -s`; then 22 | mesg n 23 | fi 24 | EOH 25 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/chef.sh: -------------------------------------------------------------------------------- 1 | # Installing chef 2 | /opt/ruby/bin/gem install chef --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Remove items used for building, since they aren't needed anymore 2 | apt-get -y remove linux-headers-$(uname -r) build-essential 3 | apt-get -y autoremove 4 | 5 | # Clean up tmp 6 | rm -rf /tmp/* 7 | 8 | # Removing leftover leases and persistent rules 9 | echo "cleaning up dhcp leases" 10 | rm /var/lib/dhcp3/* 11 | 12 | # Make sure Udev doesn't block our network 13 | # http://6.ptmc.org/?p=164 14 | echo "cleaning up udev rules" 15 | rm /etc/udev/rules.d/70-persistent-net.rules 16 | mkdir /etc/udev/rules.d/70-persistent-net.rules 17 | rm -rf /dev/.udev/ 18 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 19 | 20 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 21 | echo "pre-up sleep 2" >> /etc/network/interfaces 22 | 23 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '384', 4 | :disk_size => '10140', 5 | :disk_format => 'VDI', 6 | :hostiocache => 'off', 7 | :os_type_id => 'Ubuntu_64', 8 | :iso_file => "ubuntu-10.04.4-server-amd64.iso", 9 | :iso_src => "http://releases.ubuntu.com/10.04.4/ubuntu-10.04.4-server-amd64.iso", 10 | :iso_md5 => "9b218654cdcdf9722171648c52f8a088", 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "10", 13 | :boot_cmd_sequence => [ 14 | '', 15 | '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 17 | 'hostname=%NAME% ', 18 | 'fb=false debconf/frontend=noninteractive ', 19 | 'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ', 20 | 'initrd=/install/initrd.gz -- ' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => "preseed.cfg", 25 | :ssh_login_timeout => "10000", 26 | :ssh_user => "vagrant", 27 | :ssh_password => "vagrant", 28 | :ssh_key => "", 29 | :ssh_host_port => "7222", 30 | :ssh_guest_port => "22", 31 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 32 | :shutdown_cmd => "shutdown -P now", 33 | :postinstall_files => [ 34 | # "postinstall.sh", 35 | "base.sh", 36 | "vagrant.sh", 37 | # "virtualbox.sh", 38 | "vmfusion.sh", 39 | "ruby.sh", 40 | "puppet.sh", 41 | "chef.sh", 42 | "cleanup.sh", 43 | "zerodisk.sh", 44 | ], 45 | :postinstall_timeout => "10000" 46 | }) 47 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install puppet from gem 2 | /opt/ruby/bin/gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/ruby.sh: -------------------------------------------------------------------------------- 1 | i# Install Ruby from source in /opt so that users of Vagrant 2 | # can install their own Rubies using packages or however. 3 | # We must install the 1.8.x series since Puppet doesn't support 4 | # Ruby 1.9 yet. 5 | wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz 6 | tar xvzf ruby-1.8.7-p334.tar.gz 7 | cd ruby-1.8.7-p334 8 | ./configure --prefix=/opt/ruby 9 | make 10 | make install 11 | cd .. 12 | rm -rf ruby-1.8.7-p334* 13 | 14 | # Install RubyGems 1.8.17 15 | wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.17.tgz 16 | tar xzf rubygems-1.8.17.tgz 17 | cd rubygems-1.8.17 18 | /opt/ruby/bin/ruby setup.rb 19 | cd .. 20 | rm -rf rubygems-1.8.17* 21 | 22 | # Add /opt/ruby/bin to the global path as the last resort so 23 | # Ruby, RubyGems, and Chef/Puppet are visible 24 | echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh 25 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | # Setup sudo to allow no-password sudo for "sudo" 4 | usermod -a -G sudo vagrant 5 | 6 | # Installing vagrant keys 7 | mkdir /home/vagrant/.ssh 8 | chmod 700 /home/vagrant/.ssh 9 | cd /home/vagrant/.ssh 10 | groupadd -r admin 11 | usermod -a -G admin vagrant 12 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 13 | chmod 600 /home/vagrant/.ssh/authorized_keys 14 | chown -R vagrant /home/vagrant/.ssh 15 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Installing the virtualbox guest additions 2 | apt-get -y install dkms 3 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 4 | cd /tmp 5 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 6 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 7 | sh /mnt/VBoxLinuxAdditions.run 8 | umount /mnt 9 | 10 | rm VBoxGuestAdditions_$VBOX_VERSION.iso 11 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | umount /mnt/cdrom 7 | rm /home/vagrant/linux.iso 8 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-fusion503/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-vbox4210-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Definition.declare({ 2 | :cpu_count => '1', :memory_size=> '384', 3 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 4 | :os_type_id => 'Ubuntu_64', 5 | :iso_file => "ubuntu-10.04.x-server-amd64-netboot.iso", 6 | :iso_src => "http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/mini.iso", 7 | :iso_md5 => "d260ca4ad6d0c81bf5cf38a63fa63b5b", 8 | :iso_download_timeout => "1000", 9 | :boot_wait => "10", :boot_cmd_sequence => [ 10 | 'linux noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 11 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 12 | 'hostname=%NAME% ', 13 | 'fb=false debconf/frontend=noninteractive ', 14 | 'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ', 15 | 'initrd=initrd.gz -- ' 16 | ], 17 | :kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "preseed.cfg", 18 | :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "", 19 | :ssh_host_port => "7222", :ssh_guest_port => "22", 20 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 21 | :shutdown_cmd => "shutdown -P now", 22 | :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000" 23 | }) 24 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-vbox4210-nocm/postinstall.sh: -------------------------------------------------------------------------------- 1 | # postinstall.sh created from Mitchell's official lucid32/64 baseboxes 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | # Installing the virtualbox guest additions 6 | apt-get -y install dkms 7 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 8 | cd /tmp 9 | wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso 10 | mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt 11 | sh /mnt/VBoxLinuxAdditions.run 12 | umount /mnt 13 | 14 | rm VBoxGuestAdditions_$VBOX_VERSION.iso 15 | 16 | # Apt-install various things necessary for Ruby, guest additions, 17 | # etc., and remove optional things to trim down the machine. 18 | apt-get -y update 19 | apt-get -y upgrade 20 | apt-get -y install linux-headers-$(uname -r) build-essential 21 | apt-get -y install zlib1g-dev libssl-dev libreadline5-dev 22 | apt-get clean 23 | 24 | # Setup sudo to allow no-password sudo for "admin" 25 | cp /etc/sudoers /etc/sudoers.orig 26 | sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers 27 | sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers 28 | 29 | # Install NFS client 30 | apt-get -y install nfs-common 31 | 32 | # Installing vagrant keys 33 | mkdir /home/vagrant/.ssh 34 | chmod 700 /home/vagrant/.ssh 35 | cd /home/vagrant/.ssh 36 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 37 | chmod 600 /home/vagrant/.ssh/authorized_keys 38 | chown -R vagrant /home/vagrant/.ssh 39 | 40 | # Remove items used for building, since they aren't needed anymore 41 | apt-get -y remove linux-headers-$(uname -r) build-essential 42 | apt-get -y autoremove 43 | 44 | # Zero out the free space to save space in the final image: 45 | dd if=/dev/zero of=/EMPTY bs=1M 46 | rm -f /EMPTY 47 | 48 | # Removing leftover leases and persistent rules 49 | echo "cleaning up dhcp leases" 50 | rm /var/lib/dhcp3/* 51 | 52 | # Make sure Udev doesn't block our network 53 | # http://6.ptmc.org/?p=164 54 | echo "cleaning up udev rules" 55 | rm /etc/udev/rules.d/70-persistent-net.rules 56 | mkdir /etc/udev/rules.d/70-persistent-net.rules 57 | rm -rf /dev/.udev/ 58 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 59 | 60 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 61 | echo "pre-up sleep 2" >> /etc/network/interfaces 62 | exit 63 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-10044-x64-vbox4210/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Definition.declare({ 2 | :cpu_count => '1', :memory_size=> '384', 3 | :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', 4 | :os_type_id => 'Ubuntu_64', 5 | :iso_file => "ubuntu-10.04.x-server-amd64-netboot.iso", 6 | :iso_src => "http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/mini.iso", 7 | :iso_md5 => "d260ca4ad6d0c81bf5cf38a63fa63b5b", 8 | :iso_download_timeout => "1000", 9 | :boot_wait => "10", :boot_cmd_sequence => [ 10 | 'linux noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 11 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 12 | 'hostname=%NAME% ', 13 | 'fb=false debconf/frontend=noninteractive ', 14 | 'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ', 15 | 'initrd=initrd.gz -- ' 16 | ], 17 | :kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "preseed.cfg", 18 | :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "", 19 | :ssh_host_port => "7222", :ssh_guest_port => "22", 20 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 21 | :shutdown_cmd => "shutdown -P now", 22 | :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000" 23 | }) 24 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-1204-x64/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '2048', 4 | :disk_size => '10140', 5 | :disk_format => 'VDI', 6 | :hostiocache => 'off', 7 | :os_type_id => 'Ubuntu_64', 8 | :iso_file => "ubuntu-12.04.1-server-amd64.iso", 9 | :iso_src => "http://releases.ubuntu.com/12.04/ubuntu-12.04.1-server-amd64.iso", 10 | :iso_md5 => 'a8c667e871f48f3a662f3fbf1c3ddb17', 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "4", 13 | :boot_cmd_sequence => [ 14 | '', 15 | '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 17 | 'hostname=%NAME% ', 18 | 'fb=false debconf/frontend=noninteractive ', 19 | 'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ', 20 | 'initrd=/install/initrd.gz -- ' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => "preseed.cfg", 25 | :ssh_login_timeout => "10000", 26 | :ssh_user => "vagrant", 27 | :ssh_password => "vagrant", 28 | :ssh_key => "", 29 | :ssh_host_port => "7222", 30 | :ssh_guest_port => "22", 31 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 32 | :shutdown_cmd => "shutdown -P now", 33 | :postinstall_files => [ "postinstall.sh"], 34 | :postinstall_timeout => "10000" 35 | }) 36 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/base.sh: -------------------------------------------------------------------------------- 1 | 2 | # Apt-install various things necessary for Ruby, guest additions, 3 | # etc., and remove optional things to trim down the machine. 4 | apt-get -y update 5 | apt-get -y upgrade 6 | apt-get -y install gcc build-essential linux-headers-$(uname -r) 7 | apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev 8 | apt-get -y install vim curl 9 | apt-get clean 10 | 11 | # Set up sudo 12 | ( cat <<'EOP' 13 | %vagrant ALL=NOPASSWD:ALL 14 | EOP 15 | ) > /tmp/vagrant 16 | chmod 0440 /tmp/vagrant 17 | mv /tmp/vagrant /etc/sudoers.d/ 18 | 19 | # Install NFS client 20 | apt-get -y install nfs-common 21 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | curl -L https://www.opscode.com/chef/install.sh | sudo bash 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Remove items used for building, since they aren't needed anymore 2 | 3 | apt-get -y remove linux-headers-$(uname -r) build-essential 4 | apt-get -y autoremove 5 | 6 | #Clean up tmp 7 | rm -rf /tmp/* 8 | 9 | # Removing leftover leases and persistent rules 10 | echo "cleaning up dhcp leases" 11 | rm /var/lib/dhcp/* 12 | 13 | # Make sure Udev doesn't block our network 14 | # http://6.ptmc.org/?p=164 15 | echo "cleaning up udev rules" 16 | rm /etc/udev/rules.d/70-persistent-net.rules 17 | mkdir /etc/udev/rules.d/70-persistent-net.rules 18 | rm -rf /dev/.udev/ 19 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 20 | 21 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 22 | echo "pre-up sleep 2" >> /etc/network/interfaces 23 | exit 24 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '512', 4 | :disk_size => '10140', 5 | :disk_format => 'VDI', 6 | :hostiocache => 'off', 7 | :os_type_id => 'Ubuntu_64', 8 | :iso_file => "ubuntu-12.04.2-server-amd64.iso", 9 | :iso_src => "http://releases.ubuntu.com/12.04/ubuntu-12.04.2-server-amd64.iso", 10 | :iso_md5 => 'a8c667e871f48f3a662f3fbf1c3ddb17', 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "4", 13 | :boot_cmd_sequence => [ 14 | '', 15 | '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 17 | 'hostname=%NAME% ', 18 | 'fb=false debconf/frontend=noninteractive ', 19 | 'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ', 20 | 'initrd=/install/initrd.gz -- ' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => "preseed.cfg", 25 | :ssh_login_timeout => "10000", 26 | :ssh_user => "vagrant", 27 | :ssh_password => "vagrant", 28 | :ssh_key => "", 29 | :ssh_host_port => "7222", 30 | :ssh_guest_port => "22", 31 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 32 | :shutdown_cmd => "shutdown -P now", 33 | :postinstall_files => [ 34 | "base.sh", 35 | "vagrant.sh", 36 | #"virtualbox.sh", 37 | "vmfusion.sh", 38 | "ruby.sh", 39 | "puppet.sh", 40 | "chef.sh", 41 | "cleanup.sh", 42 | "zerodisk.sh" 43 | ], 44 | :postinstall_timeout => "10000" 45 | }) 46 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | /opt/ruby/bin/gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from source in /opt so that users of Vagrant 2 | # can install their own Rubies using packages or however. 3 | 4 | apt-get -y install libyaml-0-2 5 | RUBY_VERSION=1.9.3-p392 6 | wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$RUBY_VERSION.tar.gz 7 | tar xvzf ruby-$RUBY_VERSION.tar.gz 8 | cd ruby-$RUBY_VERSION 9 | ./configure --prefix=/opt/ruby 10 | make 11 | make install 12 | cd .. 13 | rm -rf ruby-$RUBY_VERSION 14 | 15 | # Install RubyGems 1.8.25 16 | RUBYGEMS_VERSION=1.8.25 17 | wget http://production.cf.rubygems.org/rubygems/rubygems-$RUBYGEMS_VERSION.tgz 18 | tar xzf rubygems-$RUBYGEMS_VERSION.tgz 19 | cd rubygems-$RUBYGEMS_VERSION 20 | /opt/ruby/bin/ruby setup.rb 21 | cd .. 22 | rm -rf rubygems-$RUBYGEMS_VERSION 23 | 24 | # Add /opt/ruby/bin to the global path as the last resort so 25 | # Ruby, RubyGems, and Chef/Puppet are visible 26 | echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh 27 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | # Setup sudo to allow no-password sudo for "sudo" 4 | usermod -a -G sudo vagrant 5 | 6 | # Installing vagrant keys 7 | mkdir /home/vagrant/.ssh 8 | chmod 700 /home/vagrant/.ssh 9 | cd /home/vagrant/.ssh 10 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 11 | chmod 600 /home/vagrant/.ssh/authorized_keys 12 | chown -R vagrant /home/vagrant/.ssh 13 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Without libdbus virtualbox would not start automatically after compile 2 | apt-get -y install --no-install-recommends libdbus-1-3 3 | 4 | # The netboot installs the VirtualBox support (old) so we have to remove it 5 | /etc/init.d/virtualbox-ose-guest-utils stop 6 | rmmod vboxguest 7 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 8 | aptitude -y install dkms 9 | 10 | # Install the VirtualBox guest additions 11 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 12 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 13 | mount -o loop $VBOX_ISO /mnt 14 | yes|sh /mnt/VBoxLinuxAdditions.run 15 | umount /mnt 16 | 17 | #Cleanup VirtualBox 18 | rm $VBOX_ISO 19 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/vagrant/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/vmtools.sh: -------------------------------------------------------------------------------- 1 | if test -f .vmfusion_version ; then [15/436] 2 | 3 | cd /tmp 4 | mkdir -p /mnt/cdrom 5 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 6 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 7 | /tmp/vmware-tools-distrib/vmware-install.pl -d 8 | rm /home/vagrant/linux.iso 9 | umount /mnt/cdrom 10 | 11 | fi 12 | 13 | if test -f .vbox_version ; then [3/436] 14 | 15 | # Without libdbus virtualbox would not start automatically after compile 16 | apt-get -y install --no-install-recommends libdbus-1-3 17 | 18 | # The netboot installs the VirtualBox support (old) so we have to remove it 19 | /etc/init.d/virtualbox-ose-guest-utils stop 20 | rmmod vboxguest 21 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 22 | aptitude -y install dkms 23 | 24 | # Install the VirtualBox guest additions 25 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 26 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 27 | mount -o loop $VBOX_ISO /mnt 28 | yes|sh /mnt/VBoxLinuxAdditions.run 29 | umount /mnt 30 | 31 | #Cleanup VirtualBox 32 | rm $VBOX_ISO 33 | fi 34 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-fusion503/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/base.sh: -------------------------------------------------------------------------------- 1 | 2 | # Apt-install various things necessary for Ruby, guest additions, 3 | # etc., and remove optional things to trim down the machine. 4 | apt-get -y update 5 | apt-get -y upgrade 6 | apt-get -y install gcc build-essential linux-headers-$(uname -r) 7 | apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev 8 | apt-get -y install vim curl 9 | apt-get clean 10 | 11 | # Set up sudo 12 | ( cat <<'EOP' 13 | %vagrant ALL=NOPASSWD:ALL 14 | EOP 15 | ) > /tmp/vagrant 16 | chmod 0440 /tmp/vagrant 17 | mv /tmp/vagrant /etc/sudoers.d/ 18 | 19 | # Install NFS client 20 | apt-get -y install nfs-common 21 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | curl -L https://www.opscode.com/chef/install.sh | sudo bash 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Remove items used for building, since they aren't needed anymore 2 | 3 | apt-get -y remove linux-headers-$(uname -r) build-essential 4 | apt-get -y autoremove 5 | 6 | #Clean up tmp 7 | rm -rf /tmp/* 8 | 9 | # Removing leftover leases and persistent rules 10 | echo "cleaning up dhcp leases" 11 | rm /var/lib/dhcp/* 12 | 13 | # Make sure Udev doesn't block our network 14 | # http://6.ptmc.org/?p=164 15 | echo "cleaning up udev rules" 16 | rm /etc/udev/rules.d/70-persistent-net.rules 17 | mkdir /etc/udev/rules.d/70-persistent-net.rules 18 | rm -rf /dev/.udev/ 19 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 20 | 21 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 22 | echo "pre-up sleep 2" >> /etc/network/interfaces 23 | exit 24 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '512', 4 | :disk_size => '10140', 5 | :disk_format => 'VDI', 6 | :hostiocache => 'off', 7 | :os_type_id => 'Ubuntu_64', 8 | :iso_file => "ubuntu-12.04.2-server-amd64.iso", 9 | :iso_src => "http://releases.ubuntu.com/12.04/ubuntu-12.04.2-server-amd64.iso", 10 | :iso_md5 => 'a8c667e871f48f3a662f3fbf1c3ddb17', 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "4", 13 | :boot_cmd_sequence => [ 14 | '', 15 | '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 17 | 'hostname=%NAME% ', 18 | 'fb=false debconf/frontend=noninteractive ', 19 | 'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ', 20 | 'initrd=/install/initrd.gz -- ' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => "preseed.cfg", 25 | :ssh_login_timeout => "10000", 26 | :ssh_user => "vagrant", 27 | :ssh_password => "vagrant", 28 | :ssh_key => "", 29 | :ssh_host_port => "7222", 30 | :ssh_guest_port => "22", 31 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 32 | :shutdown_cmd => "shutdown -P now", 33 | :postinstall_files => [ 34 | "base.sh", 35 | "vagrant.sh", 36 | "virtualbox.sh", 37 | "cleanup.sh", 38 | "zerodisk.sh" 39 | ], 40 | :postinstall_timeout => "10000" 41 | }) 42 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | /opt/ruby/bin/gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from source in /opt so that users of Vagrant 2 | # can install their own Rubies using packages or however. 3 | 4 | apt-get -y install libyaml-0-2 5 | RUBY_VERSION=1.9.3-p392 6 | wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$RUBY_VERSION.tar.gz 7 | tar xvzf ruby-$RUBY_VERSION.tar.gz 8 | cd ruby-$RUBY_VERSION 9 | ./configure --prefix=/opt/ruby 10 | make 11 | make install 12 | cd .. 13 | rm -rf ruby-$RUBY_VERSION 14 | 15 | # Install RubyGems 1.8.25 16 | RUBYGEMS_VERSION=1.8.25 17 | wget http://production.cf.rubygems.org/rubygems/rubygems-$RUBYGEMS_VERSION.tgz 18 | tar xzf rubygems-$RUBYGEMS_VERSION.tgz 19 | cd rubygems-$RUBYGEMS_VERSION 20 | /opt/ruby/bin/ruby setup.rb 21 | cd .. 22 | rm -rf rubygems-$RUBYGEMS_VERSION 23 | 24 | # Add /opt/ruby/bin to the global path as the last resort so 25 | # Ruby, RubyGems, and Chef/Puppet are visible 26 | echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh 27 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | # Setup sudo to allow no-password sudo for "sudo" 4 | usermod -a -G sudo vagrant 5 | 6 | # Installing vagrant keys 7 | mkdir /home/vagrant/.ssh 8 | chmod 700 /home/vagrant/.ssh 9 | cd /home/vagrant/.ssh 10 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 11 | chmod 600 /home/vagrant/.ssh/authorized_keys 12 | chown -R vagrant /home/vagrant/.ssh 13 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Without libdbus virtualbox would not start automatically after compile 2 | apt-get -y install --no-install-recommends libdbus-1-3 3 | 4 | # The netboot installs the VirtualBox support (old) so we have to remove it 5 | /etc/init.d/virtualbox-ose-guest-utils stop 6 | rmmod vboxguest 7 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 8 | aptitude -y install dkms 9 | 10 | # Install the VirtualBox guest additions 11 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 12 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 13 | mount -o loop $VBOX_ISO /mnt 14 | yes|sh /mnt/VBoxLinuxAdditions.run 15 | umount /mnt 16 | 17 | #Cleanup VirtualBox 18 | rm $VBOX_ISO 19 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/vagrant/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/vmtools.sh: -------------------------------------------------------------------------------- 1 | if test -f .vmfusion_version ; then [15/436] 2 | 3 | cd /tmp 4 | mkdir -p /mnt/cdrom 5 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 6 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 7 | /tmp/vmware-tools-distrib/vmware-install.pl -d 8 | rm /home/vagrant/linux.iso 9 | umount /mnt/cdrom 10 | 11 | fi 12 | 13 | if test -f .vbox_version ; then [3/436] 14 | 15 | # Without libdbus virtualbox would not start automatically after compile 16 | apt-get -y install --no-install-recommends libdbus-1-3 17 | 18 | # The netboot installs the VirtualBox support (old) so we have to remove it 19 | /etc/init.d/virtualbox-ose-guest-utils stop 20 | rmmod vboxguest 21 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 22 | aptitude -y install dkms 23 | 24 | # Install the VirtualBox guest additions 25 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 26 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 27 | mount -o loop $VBOX_ISO /mnt 28 | yes|sh /mnt/VBoxLinuxAdditions.run 29 | umount /mnt 30 | 31 | #Cleanup VirtualBox 32 | rm $VBOX_ISO 33 | fi 34 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/base.sh: -------------------------------------------------------------------------------- 1 | 2 | # Apt-install various things necessary for Ruby, guest additions, 3 | # etc., and remove optional things to trim down the machine. 4 | apt-get -y update 5 | apt-get -y upgrade 6 | apt-get -y install gcc build-essential linux-headers-$(uname -r) 7 | apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev 8 | apt-get -y install vim curl 9 | apt-get clean 10 | 11 | # Set up sudo 12 | ( cat <<'EOP' 13 | %vagrant ALL=NOPASSWD:ALL 14 | EOP 15 | ) > /tmp/vagrant 16 | chmod 0440 /tmp/vagrant 17 | mv /tmp/vagrant /etc/sudoers.d/ 18 | 19 | # Install NFS client 20 | apt-get -y install nfs-common 21 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | curl -L https://www.opscode.com/chef/install.sh | sudo bash 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Remove items used for building, since they aren't needed anymore 2 | 3 | apt-get -y remove linux-headers-$(uname -r) build-essential 4 | apt-get -y autoremove 5 | 6 | #Clean up tmp 7 | rm -rf /tmp/* 8 | 9 | # Removing leftover leases and persistent rules 10 | echo "cleaning up dhcp leases" 11 | rm /var/lib/dhcp/* 12 | 13 | # Make sure Udev doesn't block our network 14 | # http://6.ptmc.org/?p=164 15 | echo "cleaning up udev rules" 16 | rm /etc/udev/rules.d/70-persistent-net.rules 17 | mkdir /etc/udev/rules.d/70-persistent-net.rules 18 | rm -rf /dev/.udev/ 19 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 20 | 21 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 22 | echo "pre-up sleep 2" >> /etc/network/interfaces 23 | exit 24 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '512', 4 | :disk_size => '10140', 5 | :disk_format => 'VDI', 6 | :hostiocache => 'off', 7 | :os_type_id => 'Ubuntu_64', 8 | :iso_file => "ubuntu-12.04.2-server-amd64.iso", 9 | :iso_src => "http://releases.ubuntu.com/12.04/ubuntu-12.04.2-server-amd64.iso", 10 | :iso_md5 => 'a8c667e871f48f3a662f3fbf1c3ddb17', 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "4", 13 | :boot_cmd_sequence => [ 14 | '', 15 | '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 17 | 'hostname=%NAME% ', 18 | 'fb=false debconf/frontend=noninteractive ', 19 | 'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ', 20 | 'initrd=/install/initrd.gz -- ' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => "preseed.cfg", 25 | :ssh_login_timeout => "10000", 26 | :ssh_user => "vagrant", 27 | :ssh_password => "vagrant", 28 | :ssh_key => "", 29 | :ssh_host_port => "7222", 30 | :ssh_guest_port => "22", 31 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 32 | :shutdown_cmd => "shutdown -P now", 33 | :postinstall_files => [ 34 | "base.sh", 35 | "vagrant.sh", 36 | "virtualbox.sh", 37 | "ruby.sh", 38 | "puppet.sh", 39 | "chef.sh", 40 | "cleanup.sh", 41 | "zerodisk.sh" 42 | ], 43 | :postinstall_timeout => "10000" 44 | }) 45 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | /opt/ruby/bin/gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from source in /opt so that users of Vagrant 2 | # can install their own Rubies using packages or however. 3 | 4 | apt-get -y install libyaml-0-2 5 | RUBY_VERSION=1.9.3-p392 6 | wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$RUBY_VERSION.tar.gz 7 | tar xvzf ruby-$RUBY_VERSION.tar.gz 8 | cd ruby-$RUBY_VERSION 9 | ./configure --prefix=/opt/ruby 10 | make 11 | make install 12 | cd .. 13 | rm -rf ruby-$RUBY_VERSION 14 | 15 | # Install RubyGems 1.8.25 16 | RUBYGEMS_VERSION=1.8.25 17 | wget http://production.cf.rubygems.org/rubygems/rubygems-$RUBYGEMS_VERSION.tgz 18 | tar xzf rubygems-$RUBYGEMS_VERSION.tgz 19 | cd rubygems-$RUBYGEMS_VERSION 20 | /opt/ruby/bin/ruby setup.rb 21 | cd .. 22 | rm -rf rubygems-$RUBYGEMS_VERSION 23 | 24 | # Add /opt/ruby/bin to the global path as the last resort so 25 | # Ruby, RubyGems, and Chef/Puppet are visible 26 | echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh 27 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | # Setup sudo to allow no-password sudo for "sudo" 4 | usermod -a -G sudo vagrant 5 | 6 | # Installing vagrant keys 7 | mkdir /home/vagrant/.ssh 8 | chmod 700 /home/vagrant/.ssh 9 | cd /home/vagrant/.ssh 10 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 11 | chmod 600 /home/vagrant/.ssh/authorized_keys 12 | chown -R vagrant /home/vagrant/.ssh 13 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Without libdbus virtualbox would not start automatically after compile 2 | apt-get -y install --no-install-recommends libdbus-1-3 3 | 4 | # The netboot installs the VirtualBox support (old) so we have to remove it 5 | /etc/init.d/virtualbox-ose-guest-utils stop 6 | rmmod vboxguest 7 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 8 | aptitude -y install dkms 9 | 10 | # Install the VirtualBox guest additions 11 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 12 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 13 | mount -o loop $VBOX_ISO /mnt 14 | yes|sh /mnt/VBoxLinuxAdditions.run 15 | umount /mnt 16 | 17 | #Cleanup VirtualBox 18 | rm $VBOX_ISO 19 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | rm /home/vagrant/linux.iso 7 | umount /mnt/cdrom 8 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/vmtools.sh: -------------------------------------------------------------------------------- 1 | if test -f .vmfusion_version ; then [15/436] 2 | 3 | cd /tmp 4 | mkdir -p /mnt/cdrom 5 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 6 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 7 | /tmp/vmware-tools-distrib/vmware-install.pl -d 8 | rm /home/vagrant/linux.iso 9 | umount /mnt/cdrom 10 | 11 | fi 12 | 13 | if test -f .vbox_version ; then [3/436] 14 | 15 | # Without libdbus virtualbox would not start automatically after compile 16 | apt-get -y install --no-install-recommends libdbus-1-3 17 | 18 | # The netboot installs the VirtualBox support (old) so we have to remove it 19 | /etc/init.d/virtualbox-ose-guest-utils stop 20 | rmmod vboxguest 21 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 22 | aptitude -y install dkms 23 | 24 | # Install the VirtualBox guest additions 25 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 26 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 27 | mount -o loop $VBOX_ISO /mnt 28 | yes|sh /mnt/VBoxLinuxAdditions.run 29 | umount /mnt 30 | 31 | #Cleanup VirtualBox 32 | rm $VBOX_ISO 33 | fi 34 | -------------------------------------------------------------------------------- /definitions/ubuntu-server-12042-x64-vbox4210/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/base.sh: -------------------------------------------------------------------------------- 1 | 2 | # Apt-install various things necessary for Ruby, guest additions, 3 | # etc., and remove optional things to trim down the machine. 4 | apt-get -y update 5 | apt-get -y upgrade 6 | apt-get -y install gcc build-essential linux-headers-$(uname -r) 7 | apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev 8 | apt-get -y install vim curl 9 | apt-get clean 10 | 11 | # Set up sudo 12 | ( cat <<'EOP' 13 | %vagrant ALL=NOPASSWD:ALL 14 | EOP 15 | ) > /tmp/vagrant 16 | chmod 0440 /tmp/vagrant 17 | mv /tmp/vagrant /etc/sudoers.d/ 18 | 19 | # Install NFS client 20 | apt-get -y install nfs-common 21 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/chef.sh: -------------------------------------------------------------------------------- 1 | # Install Chef 2 | curl -L https://www.opscode.com/chef/install.sh | sudo bash 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/cleanup.sh: -------------------------------------------------------------------------------- 1 | # Remove items used for building, since they aren't needed anymore 2 | 3 | apt-get -y remove linux-headers-$(uname -r) build-essential 4 | apt-get -y autoremove 5 | 6 | #Clean up tmp 7 | rm -rf /tmp/* 8 | 9 | # Removing leftover leases and persistent rules 10 | echo "cleaning up dhcp leases" 11 | rm /var/lib/dhcp/* 12 | 13 | # Make sure Udev doesn't block our network 14 | # http://6.ptmc.org/?p=164 15 | echo "cleaning up udev rules" 16 | rm /etc/udev/rules.d/70-persistent-net.rules 17 | mkdir /etc/udev/rules.d/70-persistent-net.rules 18 | rm -rf /dev/.udev/ 19 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 20 | 21 | echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" 22 | echo "pre-up sleep 2" >> /etc/network/interfaces 23 | exit 24 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/definition.rb: -------------------------------------------------------------------------------- 1 | Veewee::Session.declare({ 2 | :cpu_count => '1', 3 | :memory_size=> '512', 4 | :disk_size => '10140', 5 | :disk_format => 'VDI', 6 | :hostiocache => 'off', 7 | :os_type_id => 'Ubuntu_64', 8 | :iso_file => "ubuntu-12.04.2-server-amd64.iso", 9 | :iso_src => "http://releases.ubuntu.com/12.04/ubuntu-12.04.2-server-amd64.iso", 10 | :iso_md5 => 'a8c667e871f48f3a662f3fbf1c3ddb17', 11 | :iso_download_timeout => "1000", 12 | :boot_wait => "4", 13 | :boot_cmd_sequence => [ 14 | '', 15 | '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', 16 | 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', 17 | 'hostname=%NAME% ', 18 | 'fb=false debconf/frontend=noninteractive ', 19 | 'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ', 20 | 'initrd=/install/initrd.gz -- ' 21 | ], 22 | :kickstart_port => "7122", 23 | :kickstart_timeout => "10000", 24 | :kickstart_file => "preseed.cfg", 25 | :ssh_login_timeout => "10000", 26 | :ssh_user => "vagrant", 27 | :ssh_password => "vagrant", 28 | :ssh_key => "", 29 | :ssh_host_port => "7222", 30 | :ssh_guest_port => "22", 31 | :sudo_cmd => "echo '%p'|sudo -S sh '%f'", 32 | :shutdown_cmd => "shutdown -P now", 33 | :postinstall_files => [ 34 | "base.sh", 35 | "vagrant.sh", 36 | #"virtualbox.sh", 37 | "vmfusion.sh", 38 | #"ruby.sh", 39 | #"puppet.sh", 40 | #"chef.sh", 41 | "cleanup.sh", 42 | "zerodisk.sh" 43 | ], 44 | :postinstall_timeout => "10000" 45 | }) 46 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/puppet.sh: -------------------------------------------------------------------------------- 1 | # Install Puppet 2 | /opt/ruby/bin/gem install puppet --no-ri --no-rdoc 3 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/ruby.sh: -------------------------------------------------------------------------------- 1 | # Install Ruby from source in /opt so that users of Vagrant 2 | # can install their own Rubies using packages or however. 3 | 4 | apt-get -y install libyaml-0-2 5 | RUBY_VERSION=1.9.3-p392 6 | wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$RUBY_VERSION.tar.gz 7 | tar xvzf ruby-$RUBY_VERSION.tar.gz 8 | cd ruby-$RUBY_VERSION 9 | ./configure --prefix=/opt/ruby 10 | make 11 | make install 12 | cd .. 13 | rm -rf ruby-$RUBY_VERSION 14 | 15 | # Install RubyGems 1.8.25 16 | RUBYGEMS_VERSION=1.8.25 17 | wget http://production.cf.rubygems.org/rubygems/rubygems-$RUBYGEMS_VERSION.tgz 18 | tar xzf rubygems-$RUBYGEMS_VERSION.tgz 19 | cd rubygems-$RUBYGEMS_VERSION 20 | /opt/ruby/bin/ruby setup.rb 21 | cd .. 22 | rm -rf rubygems-$RUBYGEMS_VERSION 23 | 24 | # Add /opt/ruby/bin to the global path as the last resort so 25 | # Ruby, RubyGems, and Chef/Puppet are visible 26 | echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh 27 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/vagrant.sh: -------------------------------------------------------------------------------- 1 | date > /etc/vagrant_box_build_time 2 | 3 | # Setup sudo to allow no-password sudo for "sudo" 4 | usermod -a -G sudo vagrant 5 | 6 | # Installing vagrant keys 7 | mkdir /home/vagrant/.ssh 8 | chmod 700 /home/vagrant/.ssh 9 | cd /home/vagrant/.ssh 10 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 11 | chmod 600 /home/vagrant/.ssh/authorized_keys 12 | chown -R vagrant /home/vagrant/.ssh 13 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/virtualbox.sh: -------------------------------------------------------------------------------- 1 | # Without libdbus virtualbox would not start automatically after compile 2 | apt-get -y install --no-install-recommends libdbus-1-3 3 | 4 | # The netboot installs the VirtualBox support (old) so we have to remove it 5 | /etc/init.d/virtualbox-ose-guest-utils stop 6 | rmmod vboxguest 7 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 8 | aptitude -y install dkms 9 | 10 | # Install the VirtualBox guest additions 11 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 12 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 13 | mount -o loop $VBOX_ISO /mnt 14 | yes|sh /mnt/VBoxLinuxAdditions.run 15 | umount /mnt 16 | 17 | #Cleanup VirtualBox 18 | rm $VBOX_ISO 19 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/vmfusion.sh: -------------------------------------------------------------------------------- 1 | cd /tmp 2 | mkdir -p /mnt/cdrom 3 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 4 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 5 | /tmp/vmware-tools-distrib/vmware-install.pl -d 6 | umount /mnt/cdrom 7 | rm /home/vagrant/linux.iso 8 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/vmtools.sh: -------------------------------------------------------------------------------- 1 | if test -f .vmfusion_version ; then [15/436] 2 | 3 | cd /tmp 4 | mkdir -p /mnt/cdrom 5 | mount -o loop /home/vagrant/linux.iso /mnt/cdrom 6 | tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ 7 | /tmp/vmware-tools-distrib/vmware-install.pl -d 8 | rm /home/vagrant/linux.iso 9 | umount /mnt/cdrom 10 | 11 | fi 12 | 13 | if test -f .vbox_version ; then [3/436] 14 | 15 | # Without libdbus virtualbox would not start automatically after compile 16 | apt-get -y install --no-install-recommends libdbus-1-3 17 | 18 | # The netboot installs the VirtualBox support (old) so we have to remove it 19 | /etc/init.d/virtualbox-ose-guest-utils stop 20 | rmmod vboxguest 21 | aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils 22 | aptitude -y install dkms 23 | 24 | # Install the VirtualBox guest additions 25 | VBOX_VERSION=$(cat /home/vagrant/.vbox_version) 26 | VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso 27 | mount -o loop $VBOX_ISO /mnt 28 | yes|sh /mnt/VBoxLinuxAdditions.run 29 | umount /mnt 30 | 31 | #Cleanup VirtualBox 32 | rm $VBOX_ISO 33 | fi 34 | -------------------------------------------------------------------------------- /definitions/ubuntu-svr-12042-x64-vf503-nocm/zerodisk.sh: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | This is an example project. If you add a new box, add it in here so people can try it out. 2 | -------------------------------------------------------------------------------- /html/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puppetlabs/puppet-vagrant-boxes/63e73ff74354232cee4f9af4e2b34ac210e8d20b/html/favicon.ico -------------------------------------------------------------------------------- /iso/.gitignore: -------------------------------------------------------------------------------- 1 | *.iso 2 | --------------------------------------------------------------------------------