Created
July 24, 2011 19:33
-
-
Save charles-dyfis-net/1102993 to your computer and use it in GitHub Desktop.
CentOS-6.0 (i386) + RBEL Chef veewee definition
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
Veewee::Session.declare( { | |
:cpu_count => '1', :memory_size=> '384', | |
:disk_size => '10140', :disk_format => 'VDI', | |
:os_type_id => 'RedHat', | |
:iso_file => "CentOS-6.0-i386-bin-DVD.iso", :iso_src => "", :iso_md5 => "d7e57d6edaca1556d5bad2fa88602309", :iso_download_timeout => 1000, | |
:boot_wait => "10",:boot_cmd_sequence => ['<Esc>', 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>'], | |
:kickstart_port => "7122", :kickstart_timeout => 10000,:kickstart_file => "ks.cfg", | |
:ssh_login_timeout => "100",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "", | |
:ssh_host_port => "7222", :ssh_guest_port => "22", | |
:sudo_cmd => "echo '%p'|sudo -S sh '%f'", | |
:shutdown_cmd => "/sbin/halt -h -p", | |
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => 10000 | |
} | |
) |
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
# Kickstart file automatically generated by anaconda. | |
install | |
cdrom | |
lang en_US.UTF-8 | |
#langsupport --default=en_US.UTF-8 en_US.UTF-8 | |
keyboard us | |
#xconfig --driver="VMWare" --videoram=16384 --resolution=800x600 --depth=16 | |
network --device eth0 --bootproto dhcp | |
rootpw --iscrypted $1$vSG8FjAu$ekQ0grf16hS4G93HTPcco/ | |
#firewall --enabled --trust eth0 --ssh | |
firewall --disabled | |
#selinux --enforcing | |
selinux --disabled | |
authconfig --enableshadow --enablemd5 | |
#timezone Europe/Brussels | |
timezone UTC | |
bootloader --location=mbr | |
# The following is the partition information you requested | |
# Note that any partitions you deleted are not expressed | |
# here so unless you clear all partitions first, this is | |
# not guaranteed to work | |
clearpart --all --drives=sda --initlabel | |
part /boot --fstype ext3 --size=100 --ondisk=sda | |
part pv.2 --size=4096 --grow --ondisk=sda | |
volgroup VolGroup00 --pesize=32768 pv.2 | |
logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=528 --grow --maxsize=1056 | |
logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow | |
reboot | |
%packages | |
#@ admin-tools | |
#@ text-internet | |
#@ dialup | |
#@ smb-server | |
#@ web-server | |
#@ printing | |
#@ server-cfg | |
@ core | |
grub | |
e2fsprogs | |
lvm2 | |
%post | |
/usr/sbin/groupadd vagrant | |
/usr/sbin/useradd vagrant -g vagrant -G wheel | |
echo "vagrant"|passwd --stdin vagrant | |
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers |
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
#http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/ | |
#kernel source is needed for vbox additions | |
yum -y install gcc bzip2 make kernel-devel-`uname -r` | |
yum -y install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel | |
# upgrading kernel means vbox additions are built for wrong version | |
yum -y update --exclude='kernel*' | |
mkdir -p /usr/src | |
# Install RBEL, Chef packages | |
rpm -Uvh http://rbel.frameos.org/rbel6 | |
mv /etc/yum.repos.d/rbel{6,}.repo | |
sed -i '/^enabled/ iexclude = ruby ruby-irb ruby-rdoc' /etc/yum.repos.d/rbel.repo | |
yum -y install rubygem-chef | |
#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 | |
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.run | |
umount /mnt | |
rm VBoxGuestAdditions_$VBOX_VERSION.iso | |
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers | |
#poweroff -h | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment