Skip to content

Commit

Permalink
Merge branch 'patrick'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Thompson committed Dec 30, 2011
2 parents 594153d + 963a9bd commit cbf1b1a
Show file tree
Hide file tree
Showing 8 changed files with 4,756 additions and 0 deletions.
1,127 changes: 1,127 additions & 0 deletions templates/SLES-11-SP1-DVD-i586-GM/autoinst_de.xml

Large diffs are not rendered by default.

1,127 changes: 1,127 additions & 0 deletions templates/SLES-11-SP1-DVD-i586-GM/autoinst_en.xml

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions templates/SLES-11-SP1-DVD-i586-GM/definition.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Veewee::Session.declare({
:os_type_id => 'OpenSUSE',
:cpu_count => '1',
:memory_size => '1024',
:disk_size => '20480',
:disk_format => 'VDI',
:hostiocache => 'off',
:iso_file => "SLES-11-SP1-DVD-i586-GM-DVD1.iso",
:iso_src => "",
:iso_md5 => "0dd6886858d93501c38854552b9b1b0d",
:iso_download_timeout => "1000",
:boot_wait => "10",
:boot_cmd_sequence => [
'<Esc><Enter>',
'linux netdevice=eth0 netsetup=dhcp install=cd:/',
' lang=en_US autoyast=http://%IP%:%PORT%/autoinst_en.xml',
### disable prev line and enable next line to install with german settings
#' lang=de_DE autoyast=http://%IP%:%PORT%/autoinst_de.xml',
' textmode=1',
'<Enter>'
],
:kickstart_port => "7122",
:kickstart_timeout => "10000",
:kickstart_file => ["autoinst_en.xml", "autoinst_en.xml"],
### disable prev line and enable next line to install with german settings
#:kickstart_file => ["autoinst_de.xml", "autoinst_de.xml"],
:ssh_login_timeout => "10000",
: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 => "shutdown -P now",
:postinstall_files => ["postinstall.sh"],
:postinstall_timeout => "10000"
})
43 changes: 43 additions & 0 deletions templates/SLES-11-SP1-DVD-i586-GM/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# postinstall.sh
#

date > /etc/vagrant_box_build_time

# install vagrant key
echo -e "\ninstall vagrant key ..."
mkdir -m 0700 /home/vagrant/.ssh
cd /home/vagrant/.ssh
wget --no-check-certificate -O authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub
chmod 0600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant.users /home/vagrant/.ssh

# update sudoers
echo -e "\nupdate sudoers ..."
echo -e "\n# added by veewee/postinstall.sh" >> /etc/sudoers
echo -e "vagrant ALL=(ALL) NOPASSWD: ALL\n" >> /etc/sudoers

# speed-up remote logins
echo -e "\nspeed-up remote logins ..."
echo -e "\n# added by veewee/postinstall.sh" >> /etc/ssh/sshd_config
echo -e "UseDNS no\n" >> /etc/ssh/sshd_config

# install chef and puppet
echo -e "\ninstall chef and puppet ..."
gem install chef --no-ri --no-rdoc
gem install puppet --no-ri --no-rdoc

# install the virtualbox guest additions
echo -e "\ninstall the virtualbox guest additions ..."
zypper --non-interactive remove `rpm -qa virtualbox-guest-*` >/dev/null 2>&1
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
cd /tmp
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
#wget http://192.168.178.10/VBoxGuestAdditions_$VBOX_VERSION.iso
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
sh /mnt/VBoxLinuxAdditions.run
umount /mnt
rm -f VBoxGuestAdditions_$VBOX_VERSION.iso

echo -e "\nall done.\n"
exit
Loading

0 comments on commit cbf1b1a

Please sign in to comment.