Skip to content
This repository was archived by the owner on Aug 31, 2019. It is now read-only.

Commit 2b0d7a1

Browse files
committed
Add debian fusion boxes
Signed-off-by: Ken Barber <ken@bob.sh>
1 parent 6860b12 commit 2b0d7a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2104
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Update the box
2+
apt-get -y update
3+
apt-get -y install linux-headers-$(uname -r) build-essential
4+
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
5+
apt-get -y install curl unzip
6+
apt-get clean
7+
8+
# Set up sudo
9+
cp /etc/sudoers /etc/sudoers.orig
10+
sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
11+
12+
# Tweak sshd to prevent DNS resolution (speed up logins)
13+
echo 'UseDNS no' >> /etc/ssh/sshd_config
14+
15+
# Remove 5s grub timeout to speed up booting
16+
echo <<EOF > /etc/default/grub
17+
# If you change this file, run 'update-grub' afterwards to update
18+
# /boot/grub/grub.cfg.
19+
20+
GRUB_DEFAULT=0
21+
GRUB_TIMEOUT=0
22+
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
23+
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
24+
GRUB_CMDLINE_LINUX="debian-installer=en_US"
25+
EOF
26+
27+
update-grub
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Install Chef
2+
gem install chef --no-ri --no-rdoc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Cleanup Virtualbox
2+
VBOX_VERSION=$(cat .vbox_version)
3+
VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso
4+
rm $VBOX_ISO
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Clean up
2+
apt-get -y remove linux-headers-$(uname -r) build-essential
3+
apt-get -y autoremove
4+
5+
# Removing leftover leases and persistent rules
6+
echo "cleaning up dhcp leases"
7+
rm /var/lib/dhcp/*
8+
9+
# Make sure Udev doesn't block our network
10+
echo "cleaning up udev rules"
11+
rm /etc/udev/rules.d/70-persistent-net.rules
12+
mkdir /etc/udev/rules.d/70-persistent-net.rules
13+
rm -rf /dev/.udev/
14+
rm /lib/udev/rules.d/75-persistent-net-generator.rules
15+
16+
echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
17+
echo "pre-up sleep 2" >> /etc/network/interfaces
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Veewee::Definition.declare({
2+
:cpu_count => '1',
3+
:memory_size=> '256',
4+
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
5+
:os_type_id => 'Debian_64',
6+
:iso_file => "debian-6.0.7-amd64-netinst.iso",
7+
:iso_src => "http://cdimage.debian.org/debian-cd/6.0.7/amd64/iso-cd/debian-6.0.7-amd64-netinst.iso",
8+
:iso_md5 => "cc509122349a27bf1958e1ea0ce4065d",
9+
:iso_download_timeout => "1000",
10+
:boot_wait => "10", :boot_cmd_sequence => [
11+
'<Esc>',
12+
'install ',
13+
'preseed/url=http://%IP%:%PORT%/preseed.cfg ',
14+
'debian-installer=en_US ',
15+
'auto ',
16+
'locale=en_US ',
17+
'kbd-chooser/method=us ',
18+
'netcfg/get_hostname=%NAME% ',
19+
'netcfg/get_domain=vagrantup.com ',
20+
'fb=false ',
21+
'debconf/frontend=noninteractive ',
22+
'console-setup/ask_detect=false ',
23+
'console-keymaps-at/keymap=us ',
24+
'<Enter>'
25+
],
26+
:kickstart_port => "7122",
27+
:kickstart_timeout => "10000",
28+
:kickstart_file => "preseed.cfg",
29+
:ssh_login_timeout => "10000",
30+
:ssh_user => "vagrant",
31+
:ssh_password => "vagrant",
32+
:ssh_key => "",
33+
:ssh_host_port => "7222",
34+
:ssh_guest_port => "22",
35+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
36+
:shutdown_cmd => "halt -p",
37+
:postinstall_files => [
38+
"base.sh",
39+
"vagrant.sh",
40+
#"virtualbox.sh",
41+
"vmfusion.sh",
42+
#"ruby.sh",
43+
#"puppet.sh",
44+
#"chef.sh",
45+
#"cleanup-virtualbox.sh",
46+
"cleanup.sh",
47+
"zerodisk.sh"
48+
],
49+
:postinstall_timeout => "10000"
50+
})

0 commit comments

Comments
 (0)