Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V03 templ debian508 #219

Merged
merged 2 commits into from
Feb 6, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions templates/Debian-5.0.8-amd64-netboot/base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Updating the box
apt-get -y update
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/vagrant ALL=(ALL) ALL/vagrant ALL=NOPASSWD:ALL/g' /etc/sudoers
2 changes: 2 additions & 0 deletions templates/Debian-5.0.8-amd64-netboot/chef.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Installing Chef
/usr/bin/gem install chef --no-ri --no-rdoc
10 changes: 10 additions & 0 deletions templates/Debian-5.0.8-amd64-netboot/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Remove items used for building, since they aren't needed anymore
apt-get -y remove linux-headers-$(uname -r) build-essential
apt-get -y autoremove

# Removing leftover leases and persistent rules
echo "cleaning up dhcp leases"
rm /var/lib/dhcp3/*

echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
echo "pre-up sleep 2" >> /etc/network/interfaces
2 changes: 2 additions & 0 deletions templates/Debian-5.0.8-amd64-netboot/puppet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Installing Puppet
/usr/bin/gem install puppet --no-ri --no-rdoc
11 changes: 11 additions & 0 deletions templates/Debian-5.0.8-amd64-netboot/ruby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Installing ruby
apt-get -y install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb make g++ libshadow-ruby1.8

# Install RubyGems 1.7.2
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
tar xzf rubygems-1.7.2.tgz
cd rubygems-1.7.2
/usr/bin/ruby setup.rb
cd ..
rm -rf rubygems-1.7.2*
ln -sfv /usr/bin/gem1.8 /usr/bin/gem
14 changes: 14 additions & 0 deletions templates/Debian-5.0.8-amd64-netboot/vagrant.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Setting up sudo
cp /etc/sudoers /etc/sudoers.orig
sed -i -e 's/vagrant ALL=(ALL) ALL/vagrant 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 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
chmod 600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant /home/vagrant/.ssh

# Install NFS client
apt-get -y install nfs-common
15 changes: 15 additions & 0 deletions templates/Debian-5.0.8-amd64-netboot/virtualbox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#Installing the virtualbox guest additions
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)

if test -f $VBOX_VERSION
cd /tmp
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
yes|sh /mnt/VBoxLinuxAdditions.run
umount /mnt

apt-get -y remove linux-headers-$(uname -r) build-essential
apt-get -y autoremove

rm VBoxGuestAdditions_$VBOX_VERSION.iso
fi
9 changes: 9 additions & 0 deletions templates/Debian-5.0.8-i386-netboot/base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Updating the box
apt-get -y update
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/vagrant ALL=(ALL) ALL/vagrant ALL=NOPASSWD:ALL/g' /etc/sudoers
2 changes: 2 additions & 0 deletions templates/Debian-5.0.8-i386-netboot/chef.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Installing Chef
/usr/bin/gem install chef --no-ri --no-rdoc
10 changes: 10 additions & 0 deletions templates/Debian-5.0.8-i386-netboot/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Remove items used for building, since they aren't needed anymore
apt-get -y remove linux-headers-$(uname -r) build-essential
apt-get -y autoremove

# Removing leftover leases and persistent rules
echo "cleaning up dhcp leases"
rm /var/lib/dhcp3/*

echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
echo "pre-up sleep 2" >> /etc/network/interfaces
2 changes: 2 additions & 0 deletions templates/Debian-5.0.8-i386-netboot/puppet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Installing Puppet
/usr/bin/gem install puppet --no-ri --no-rdoc
11 changes: 11 additions & 0 deletions templates/Debian-5.0.8-i386-netboot/ruby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Installing ruby
apt-get -y install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb make g++ libshadow-ruby1.8

# Install RubyGems 1.7.2
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
tar xzf rubygems-1.7.2.tgz
cd rubygems-1.7.2
/usr/bin/ruby setup.rb
cd ..
rm -rf rubygems-1.7.2*
ln -sfv /usr/bin/gem1.8 /usr/bin/gem
14 changes: 14 additions & 0 deletions templates/Debian-5.0.8-i386-netboot/vagrant.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Setting up sudo
cp /etc/sudoers /etc/sudoers.orig
sed -i -e 's/vagrant ALL=(ALL) ALL/vagrant 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 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
chmod 600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant /home/vagrant/.ssh

# Install NFS client
apt-get -y install nfs-common
15 changes: 15 additions & 0 deletions templates/Debian-5.0.8-i386-netboot/virtualbox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#Installing the virtualbox guest additions
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)

if test -f $VBOX_VERSION
cd /tmp
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
yes|sh /mnt/VBoxLinuxAdditions.run
umount /mnt

apt-get -y remove linux-headers-$(uname -r) build-essential
apt-get -y autoremove

rm VBoxGuestAdditions_$VBOX_VERSION.iso
fi
13 changes: 13 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Update the box
apt-get -y update
apt-get -y install linux-headers-$(uname -r) build-essential
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
apt-get -y install curl unzip
apt-get clean

# Set up sudo
cp /etc/sudoers /etc/sudoers.orig
sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers

# Tweak sshd to prevent DNS resolution (speed up logins)
echo 'UseDNS no' >> /etc/ssh/sshd_config
2 changes: 2 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/chef.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Install Chef
gem install chef --no-ri --no-rdoc
2 changes: 2 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/cleanup-virtualbox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Cleanup Virtualbox
rm /tmp/VBoxGuestAdditions_$VBOX_VERSION.iso
18 changes: 18 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Clean up
apt-get -y remove linux-headers-$(uname -r) build-essential
apt-get -y autoremove

# Removing leftover leases and persistent rules
echo "cleaning up dhcp leases"
rm /var/lib/dhcp3/*

# Make sure Udev doesn't block our network
echo "cleaning up udev rules"
rm /etc/udev/rules.d/70-persistent-net.rules
mkdir /etc/udev/rules.d/70-persistent-net.rules
rm -rf /dev/.udev/
rm /lib/udev/rules.d/75-persistent-net-generator.rules

echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
echo "pre-up sleep 2" >> /etc/network/interfaces
exit
2 changes: 2 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/puppet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Install Puppet
gem install puppet --no-ri --no-rdoc
10 changes: 10 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/ruby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Install Ruby from packages
apt-get -y install ruby ruby-dev libopenssl-ruby1.8 irb ri rdoc

# Install Rubygems from source
rg_ver=1.6.2
curl -o /tmp/rubygems-${rg_ver}.zip \
"http://production.cf.rubygems.org/rubygems/rubygems-${rg_ver}.zip"
(cd /tmp && unzip rubygems-${rg_ver}.zip && \
cd rubygems-${rg_ver} && ruby setup.rb --no-format-executable)
rm -rf /tmp/rubygems-${rg_ver} /tmp/rubygems-${rg_ver}.zip
25 changes: 25 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/vagrant.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Installing the virtualbox guest additions
if test -f /home/veewee/.vbox_version
then
date > /etc/vagrant_box_build_time

# Create the user vagrant with password vagrant
useradd -G admin -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant

# Install vagrant keys
mkdir -p /home/vagrant/.ssh
chmod 700 /home/vagrant/.ssh
cd /home/vagrant/.ssh
curl -Lo /home/vagrant/.ssh/authorized_keys \
'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub'
chmod 0600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant:vagrant /home/vagrant/.ssh

# Customize the message of the day
echo 'Welcome to your Vagrant-built virtual machine.' > /var/run/motd

# Install NFS client
apt-get -y install nfs-common

fi

15 changes: 15 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/virtualbox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if test -f /home/veewee/.vbox_version
then
# The netboot installs the VirtualBox support (old) so we have to remove it
/etc/init.d/virtualbox-ose-guest-utils stop
rmmod vboxguest
aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils

# Install the VirtualBox guest additions
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
curl -Lo /tmp/VBoxGuestAdditions_$VBOX_VERSION.iso \
"http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso"
mount -o loop /tmp/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
yes|sh /mnt/VBoxLinuxAdditions.run
umount /mnt
fi
3 changes: 3 additions & 0 deletions templates/Debian-6.0.3-i386-netboot/zerodisk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Zero out the free space to save space in the final image:
dd if=/dev/zero of=/EMPTY bs=1M
rm -f /EMPTY