Skip to content

Commit

Permalink
Updated Debian definitions (new Debian 7.6)
Browse files Browse the repository at this point in the history
  • Loading branch information
leopoiroux authored and ngiger committed Aug 3, 2014
1 parent d687338 commit a922dc5
Show file tree
Hide file tree
Showing 32 changed files with 1,066 additions and 10 deletions.
4 changes: 3 additions & 1 deletion templates/Debian-7.1.0-amd64-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian_64',
:iso_file => "debian-7.1.0-amd64-netinst.iso",
:iso_src => "http://cdimage.debian.org/mirror/cdimage/archive/7.1.0/amd64/iso-cd/debian-7.1.0-amd64-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.1.0/amd64/ and download it via torrent or jigdo",
:iso_md5 => "80f498a1f9daa76bc911ae13692e4495",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.1.0-i386-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian',
:iso_file => "debian-7.1.0-i386-netinst.iso",
:iso_src => "http://cdimage.debian.org/mirror/cdimage/archive/7.1.0/i386/iso-cd/debian-7.1.0-i386-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.1.0/i386/ and download it via torrent or jigdo",
:iso_md5 => "a70efb67ca061175eabe7c5dc04ab323",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.2.0-amd64-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian_64',
:iso_file => "debian-7.2.0-amd64-netinst.iso",
:iso_src => "http://cdimage.debian.org/cdimage/archive/7.2.0/amd64/iso-cd/debian-7.2.0-amd64-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.2.0/amd64/ and download it via torrent or jigdo",
:iso_md5 => "b86774fe4de88be6378ba3d71b8029bd",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.2.0-i386-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian',
:iso_file => "debian-7.2.0-i386-netinst.iso",
:iso_src => "http://cdimage.debian.org/cdimage/archive/7.2.0/i386/iso-cd/debian-7.2.0-i386-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.2.0/i386/ and download it via torrent or jigdo",
:iso_md5 => "564282a81b5aef7015501e497fc63d81",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.3.0-amd64-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian_64',
:iso_file => "debian-7.3.0-amd64-netinst.iso",
:iso_src => "http://cdimage.debian.org/cdimage/archive/7.3.0/amd64/iso-cd/debian-7.3.0-amd64-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.3.0/amd64/ and download it via torrent or jigdo",
:iso_md5 => "72473e8a5e65b61acc7efde90d9f71d1",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.3.0-i386-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian',
:iso_file => "debian-7.3.0-i386-netinst.iso",
:iso_src => "http://cdimage.debian.org/cdimage/archive/7.3.0/i386/iso-cd/debian-7.3.0-i386-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.3.0/i386/ and download it via torrent or jigdo",
:iso_md5 => "04c58f30744e64a0459caf7d7cace479",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.4.0-amd64-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian_64',
:iso_file => "debian-7.4.0-amd64-netinst.iso",
:iso_src => "http://cdimage.debian.org/cdimage/archive/7.4.0/amd64/iso-cd/debian-7.4.0-amd64-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.4.0/amd64/ and download it via torrent or jigdo",
:iso_md5 => "e7e9433973f082a297793c3c5010b2c5",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.4.0-i386-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian',
:iso_file => "debian-7.4.0-i386-netinst.iso",
:iso_src => "http://cdimage.debian.org/cdimage/archive/7.4.0/i386/iso-cd/debian-7.4.0-i386-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.4.0/i386/ and download it via torrent or jigdo",
:iso_md5 => "7339b668a81b417ac023d73739dc6a03",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.5.0-amd64-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian_64',
:iso_file => "debian-7.5.0-amd64-netinst.iso",
:iso_src => "http://cdimage.debian.org/debian-cd/7.5.0/amd64/iso-cd/debian-7.5.0-amd64-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.5.0/amd64/ and download it via torrent or jigdo",
:iso_md5 => "8fdb6715228ea90faba58cb84644d296",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
4 changes: 3 additions & 1 deletion templates/Debian-7.5.0-i386-netboot/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian',
:iso_file => "debian-7.5.0-i386-netinst.iso",
:iso_src => "http://cdimage.debian.org/debian-cd/7.5.0/i386/iso-cd/debian-7.5.0-i386-netinst.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as the ISO is no longer directly downloadable.\n"+
"Visit http://cdimage.debian.org/cdimage/archive/7.5.0/i386/ and download it via torrent or jigdo",
:iso_md5 => "0e6eaacb5a5828473afe90f6df9c8f16",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
25 changes: 25 additions & 0 deletions templates/Debian-7.6.0-amd64-netboot/base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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 libreadline-gplv2-dev
apt-get -y install curl unzip

# Set up sudo
echo 'vagrant ALL=NOPASSWD:ALL' > /etc/sudoers.d/vagrant

# Tweak sshd to prevent DNS resolution (speed up logins)
echo 'UseDNS no' >> /etc/ssh/sshd_config

# Remove 5s grub timeout to speed up booting
cat <<EOF > /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="debian-installer=en_US"
EOF

update-grub
49 changes: 49 additions & 0 deletions templates/Debian-7.6.0-amd64-netboot/chef.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
if [ -f .veewee_params ]
then
. .veewee_params
fi

# Default to Gem install
if [ -z "$CHEF_INSTALLMETHOD" ]; then
export CHEF_INSTALLMETHOD="gems"
fi

# Installing chef
case $CHEF_INSTALLMETHOD in
"gems")
# Using gems
if [ -z "$CHEF_VERSION" ]; then
# Default to latest
gem install chef --no-ri --no-rdoc
else
gem install chef --no-ri --no-rdoc --version $CHEF_VERSION
fi
;;

"omnibus")
# Using omnibus
if [ -z "$CHEF_VERSION" ]; then
# Default to latest
wget -O - http://opscode.com/chef/install.sh | sudo bash -s
else
wget -O - http://opscode.com/chef/install.sh | sudo bash -s -- -v $CHEF_VERSION
fi
;;

"package")
# Using packages
apt-get install -y debconf-utils
echo "chef chef/chef_server_url string $CHEF_SERVER_URL" | debconf-set-selections
if [ -z "$CHEF_VERSION" ]; then
# Default to latest
apt-get install -y chef
else
apt-get install -y chef=$CHEF_VERSION
fi
;;

*)
echo "Unsupported method for installing chef"
exit -1
;;
esac
18 changes: 18 additions & 0 deletions templates/Debian-7.6.0-amd64-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
apt-get -y clean

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

# 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
52 changes: 52 additions & 0 deletions templates/Debian-7.6.0-amd64-netboot/definition.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#Thanks to Fletcher Nichol - https://github.com/fnichol

Veewee::Definition.declare({
:cpu_count => '1',
:memory_size=> '256',
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian_64',
:iso_file => "debian-7.6.0-amd64-netinst.iso",
:iso_src => "http://cdimage.debian.org/debian-cd/7.6.0/amd64/iso-cd/debian-7.6.0-amd64-netinst.iso",
:iso_md5 => "8a3c2ad7fd7a9c4c7e9bcb5cae38c135",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
'<Esc>',
'install ',
'preseed/url=http://%IP%:%PORT%/preseed.cfg ',
'debian-installer=en_US ',
'auto ',
'locale=en_US ',
'kbd-chooser/method=us ',
'netcfg/get_hostname=%NAME% ',
'netcfg/get_domain=vagrantup.com ',
'fb=false ',
'debconf/frontend=noninteractive ',
'console-setup/ask_detect=false ',
'console-keymaps-at/keymap=us ',
'keyboard-configuration/xkb-keymap=us ',
'<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 => "7222",
:ssh_guest_port => "22",
:sudo_cmd => "echo '%p'|sudo -S bash '%f'",
:shutdown_cmd => "halt -p",
:postinstall_files => [
"base.sh",
"vagrant.sh",
"virtualbox.sh",
#"vmfusion.sh",
"ruby.sh",
"puppet.sh",
"chef.sh",
"cleanup.sh",
"zerodisk.sh"
],
:postinstall_timeout => "10000"
})
Loading

0 comments on commit a922dc5

Please sign in to comment.