Created
December 6, 2010 05:02
-
-
Save peregrinator/729895 to your computer and use it in GitHub Desktop.
veewee configuration files (definitions)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# definition.rb | |
Veewee::Session.declare( { | |
:cpu_count => '1', :memory_size=> '256', | |
:disk_size => '10140', :disk_format => 'VDI',:disk_size => '10240' , | |
:os_type_id => 'Ubuntu', | |
:iso_file => "ubuntu-10.10-server-i386.iso", | |
:iso_src => "http://releases.ubuntu.com/maverick/ubuntu-10.10-server-i386.iso", | |
:iso_md5 => "ce1cee108de737d7492e37069eed538e", | |
:iso_download_timeout => "1000", | |
:boot_wait => "10",:boot_cmd_sequence => [ | |
'<Esc><Esc><Enter>', | |
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', | |
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', | |
'hostname=%NAME% ', | |
'fb=false debconf/frontend=noninteractive ', | |
'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ', | |
'initrd=/install/initrd.gz -- <Enter>' | |
], | |
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "preseed.cfg", | |
:ssh_login_timeout => "10000",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "", | |
:ssh_host_port => "2222", :ssh_guest_port => "22", | |
:sudo_cmd => "echo '%p'|sudo -S sh '%f'", | |
:shutdown_cmd => "shutdown -H", | |
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000" | |
} | |
) | |
# postinstall.sh | |
#http://adrianbravo.tumblr.com/post/644860401 | |
#Updating the box | |
apt-get -y update | |
#apt-get -y upgrade | |
apt-get -y install linux-headers-$(uname -r) build-essential | |
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev | |
apt-get clean | |
#Setting up sudo | |
cp /etc/sudoers /etc/sudoers.orig | |
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers | |
#Installing vagrant keys | |
mkdir /home/vagrant/.ssh | |
chmod 700 /home/vagrant/.ssh | |
cd /home/vagrant/.ssh | |
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys | |
chown -R vagrant /home/vagrant/.ssh | |
#INstalling the virtualbox guest additions | |
VBOX_VERSION=$(cat /home/vagrant/.vbox_version) | |
#INstalling the virtualbox guest additions | |
cd /tmp | |
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso | |
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt | |
sh /mnt/VBoxLinuxAdditions-x86.run | |
umount /mnt | |
rm VBoxGuestAdditions_$VBOX_VERSION.iso |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment