veewee 0.3.0.beta2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/doc/requirements.md +7 -1
- data/lib/python/parallels_send_string.py +76 -0
- data/lib/veewee/provider/core/helper/scancode.rb +31 -48
- data/lib/veewee/provider/parallels/box/helper/console_type.rb +54 -76
- data/lib/veewee/provider/virtualbox/box/helper/buildinfo.rb +2 -2
- data/lib/veewee/provider/virtualbox/box/helper/create.rb +1 -1
- data/lib/veewee/provider/virtualbox/box/helper/guest_additions.rb +1 -2
- data/lib/veewee/provider/virtualbox/box/helper/version.rb +8 -0
- data/lib/veewee/version.rb +1 -1
- data/templates/Debian-6.0.5-i386-netboot/virtualbox.sh +1 -1
- data/templates/Debian-6.0.6-amd64-netboot/base.sh +27 -0
- data/templates/Debian-6.0.6-amd64-netboot/chef.sh +2 -0
- data/templates/Debian-6.0.6-amd64-netboot/cleanup-virtualbox.sh +4 -0
- data/templates/Debian-6.0.6-amd64-netboot/cleanup.sh +17 -0
- data/templates/Debian-6.0.6-amd64-netboot/definition.rb +49 -0
- data/templates/Debian-6.0.6-amd64-netboot/preseed.cfg +315 -0
- data/templates/Debian-6.0.6-amd64-netboot/puppet.sh +2 -0
- data/templates/Debian-6.0.6-amd64-netboot/ruby.sh +10 -0
- data/templates/Debian-6.0.6-amd64-netboot/vagrant.sh +25 -0
- data/templates/Debian-6.0.6-amd64-netboot/virtualbox.sh +13 -0
- data/templates/Debian-6.0.6-amd64-netboot/zerodisk.sh +3 -0
- data/templates/Debian-6.0.6-i386-netboot/base.sh +27 -0
- data/templates/Debian-6.0.6-i386-netboot/chef.sh +2 -0
- data/templates/Debian-6.0.6-i386-netboot/cleanup-virtualbox.sh +4 -0
- data/templates/Debian-6.0.6-i386-netboot/cleanup.sh +17 -0
- data/templates/Debian-6.0.6-i386-netboot/definition.rb +51 -0
- data/templates/Debian-6.0.6-i386-netboot/preseed.cfg +315 -0
- data/templates/Debian-6.0.6-i386-netboot/puppet.sh +2 -0
- data/templates/Debian-6.0.6-i386-netboot/ruby.sh +10 -0
- data/templates/Debian-6.0.6-i386-netboot/vagrant.sh +25 -0
- data/templates/Debian-6.0.6-i386-netboot/virtualbox.sh +13 -0
- data/templates/Debian-6.0.6-i386-netboot/zerodisk.sh +3 -0
- data/templates/Debian-7.0-b2-i386-netboot/base.sh +27 -0
- data/templates/Debian-7.0-b2-i386-netboot/chef.sh +2 -0
- data/templates/Debian-7.0-b2-i386-netboot/cleanup-virtualbox.sh +4 -0
- data/templates/Debian-7.0-b2-i386-netboot/cleanup.sh +17 -0
- data/templates/Debian-7.0-b2-i386-netboot/definition.rb +51 -0
- data/templates/Debian-7.0-b2-i386-netboot/preseed.cfg +315 -0
- data/templates/Debian-7.0-b2-i386-netboot/puppet.sh +2 -0
- data/templates/Debian-7.0-b2-i386-netboot/ruby.sh +10 -0
- data/templates/Debian-7.0-b2-i386-netboot/vagrant.sh +25 -0
- data/templates/Debian-7.0-b2-i386-netboot/virtualbox.sh +13 -0
- data/templates/Debian-7.0-b2-i386-netboot/zerodisk.sh +3 -0
- data/templates/Fedora-17-i386/ks.cfg +4 -0
- data/templates/Fedora-17-x86_64/ks.cfg +4 -0
- data/templates/freebsd-9.0-RELEASE-amd64/definition.rb +19 -0
- data/templates/freebsd-9.0-RELEASE-amd64/postinstall.sh +93 -0
- data/templates/ubuntu-12.04.1-server-amd64/definition.rb +1 -1
- data/templates/ubuntu-12.10-server-amd64-packages/definition.rb +35 -0
- data/templates/ubuntu-12.10-server-amd64-packages/postinstall.sh +75 -0
- data/templates/ubuntu-12.10-server-amd64-packages/preseed.cfg +87 -0
- data/templates/ubuntu-12.10-server-amd64/definition.rb +35 -0
- data/templates/ubuntu-12.10-server-amd64/postinstall.sh +97 -0
- data/templates/ubuntu-12.10-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-12.10-server-i386-packages/definition.rb +35 -0
- data/templates/ubuntu-12.10-server-i386-packages/postinstall.sh +75 -0
- data/templates/ubuntu-12.10-server-i386-packages/preseed.cfg +87 -0
- data/templates/ubuntu-12.10-server-i386/definition.rb +35 -0
- data/templates/ubuntu-12.10-server-i386/postinstall.sh +98 -0
- data/templates/ubuntu-12.10-server-i386/preseed.cfg +87 -0
- data/test/veewee/provider/virtualbox/box/helper/guest_additions_test.rb +95 -0
- data/test/veewee/provider/virtualbox/box/helper/version.rb +67 -0
- data/validation/features/steps/veewee_steps.rb +1 -1
- metadata +54 -4
@@ -0,0 +1,87 @@
|
|
1
|
+
## Options to set on the command line
|
2
|
+
d-i debian-installer/locale string en_US.utf8
|
3
|
+
d-i console-setup/ask_detect boolean false
|
4
|
+
d-i console-setup/layout string us
|
5
|
+
|
6
|
+
#d-i netcfg/get_hostname string dummy
|
7
|
+
d-i netcfg/get_hostname string unassigned-hostname
|
8
|
+
d-i netcfg/get_domain string unassigned-domain
|
9
|
+
|
10
|
+
# Continue without a default route
|
11
|
+
# Not working , specify a dummy in the DHCP
|
12
|
+
#d-i netcfg/no_default_route boolean
|
13
|
+
|
14
|
+
d-i time/zone string UTC
|
15
|
+
d-i clock-setup/utc-auto boolean true
|
16
|
+
d-i clock-setup/utc boolean true
|
17
|
+
|
18
|
+
d-i kbd-chooser/method select American English
|
19
|
+
|
20
|
+
d-i netcfg/wireless_wep string
|
21
|
+
|
22
|
+
d-i base-installer/kernel/override-image string linux-server
|
23
|
+
#d-i base-installer/kernel/override-image string linux-image-2.6.32-21-generic
|
24
|
+
|
25
|
+
# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive
|
26
|
+
d-i debconf debconf/frontend select Noninteractive
|
27
|
+
|
28
|
+
d-i pkgsel/install-language-support boolean false
|
29
|
+
tasksel tasksel/first multiselect standard, ubuntu-server
|
30
|
+
|
31
|
+
#d-i partman-auto/method string regular
|
32
|
+
d-i partman-auto/method string lvm
|
33
|
+
#d-i partman-auto/purge_lvm_from_device boolean true
|
34
|
+
|
35
|
+
d-i partman-lvm/confirm boolean true
|
36
|
+
d-i partman-lvm/device_remove_lvm boolean true
|
37
|
+
d-i partman-auto/choose_recipe select atomic
|
38
|
+
|
39
|
+
d-i partman/confirm_write_new_label boolean true
|
40
|
+
d-i partman/confirm_nooverwrite boolean true
|
41
|
+
d-i partman/choose_partition select finish
|
42
|
+
d-i partman/confirm boolean true
|
43
|
+
|
44
|
+
#http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9626883
|
45
|
+
#Message: "write the changes to disk and configure lvm preseed"
|
46
|
+
#http://serverfault.com/questions/189328/ubuntu-kickstart-installation-using-lvm-waits-for-input
|
47
|
+
#preseed partman-lvm/confirm_nooverwrite boolean true
|
48
|
+
|
49
|
+
# Write the changes to disks and configure LVM?
|
50
|
+
d-i partman-lvm/confirm boolean true
|
51
|
+
d-i partman-lvm/confirm_nooverwrite boolean true
|
52
|
+
d-i partman-auto-lvm/guided_size string max
|
53
|
+
|
54
|
+
## Default user, we can get away with a recipe to change this
|
55
|
+
d-i passwd/user-fullname string vagrant
|
56
|
+
d-i passwd/username string vagrant
|
57
|
+
d-i passwd/user-password password vagrant
|
58
|
+
d-i passwd/user-password-again password vagrant
|
59
|
+
d-i user-setup/encrypt-home boolean false
|
60
|
+
d-i user-setup/allow-password-weak boolean true
|
61
|
+
|
62
|
+
## minimum is puppet and ssh and ntp
|
63
|
+
# Individual additional packages to install
|
64
|
+
d-i pkgsel/include string openssh-server ntp
|
65
|
+
|
66
|
+
# Whether to upgrade packages after debootstrap.
|
67
|
+
# Allowed values: none, safe-upgrade, full-upgrade
|
68
|
+
d-i pkgsel/upgrade select full-upgrade
|
69
|
+
|
70
|
+
d-i grub-installer/only_debian boolean true
|
71
|
+
d-i grub-installer/with_other_os boolean true
|
72
|
+
d-i finish-install/reboot_in_progress note
|
73
|
+
|
74
|
+
#For the update
|
75
|
+
d-i pkgsel/update-policy select none
|
76
|
+
|
77
|
+
# debconf-get-selections --install
|
78
|
+
#Use mirror
|
79
|
+
#d-i apt-setup/use_mirror boolean true
|
80
|
+
#d-i mirror/country string manual
|
81
|
+
#choose-mirror-bin mirror/protocol string http
|
82
|
+
#choose-mirror-bin mirror/http/hostname string 192.168.4.150
|
83
|
+
#choose-mirror-bin mirror/http/directory string /ubuntu
|
84
|
+
#choose-mirror-bin mirror/suite select maverick
|
85
|
+
#d-i debian-installer/allow_unauthenticated string true
|
86
|
+
|
87
|
+
choose-mirror-bin mirror/http/proxy string
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '2048',
|
4
|
+
:disk_size => '10140',
|
5
|
+
:disk_format => 'VDI',
|
6
|
+
:hostiocache => 'off',
|
7
|
+
:os_type_id => 'Ubuntu',
|
8
|
+
:iso_file => "ubuntu-12.10-server-i386.iso",
|
9
|
+
:iso_src => "http://releases.ubuntu.com/12.10/ubuntu-12.10-server-i386.iso",
|
10
|
+
:iso_md5 => 'b3d4d4edfc8f291af0b83f8a2ba19a2f',
|
11
|
+
:iso_download_timeout => "1000",
|
12
|
+
:boot_wait => "4",
|
13
|
+
:boot_cmd_sequence => [
|
14
|
+
'<Esc><Esc><Enter>',
|
15
|
+
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
16
|
+
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
|
17
|
+
'hostname=%NAME% ',
|
18
|
+
'fb=false debconf/frontend=noninteractive ',
|
19
|
+
'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=us keyboard-configuration/variant=us console-setup/ask_detect=false ',
|
20
|
+
'initrd=/install/initrd.gz -- <Enter>'
|
21
|
+
],
|
22
|
+
:kickstart_port => "7122",
|
23
|
+
:kickstart_timeout => "10000",
|
24
|
+
:kickstart_file => "preseed.cfg",
|
25
|
+
:ssh_login_timeout => "10000",
|
26
|
+
:ssh_user => "vagrant",
|
27
|
+
:ssh_password => "vagrant",
|
28
|
+
:ssh_key => "",
|
29
|
+
:ssh_host_port => "7222",
|
30
|
+
:ssh_guest_port => "22",
|
31
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
32
|
+
:shutdown_cmd => "shutdown -P now",
|
33
|
+
:postinstall_files => [ "postinstall.sh"],
|
34
|
+
:postinstall_timeout => "10000"
|
35
|
+
})
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# postinstall.sh created from Mitchell's official lucid32/64 baseboxes
|
2
|
+
|
3
|
+
date > /etc/vagrant_box_build_time
|
4
|
+
|
5
|
+
# Apt-install various things necessary for Ruby, guest additions,
|
6
|
+
# etc., and remove optional things to trim down the machine.
|
7
|
+
apt-get -y update
|
8
|
+
apt-get -y upgrade
|
9
|
+
apt-get -y install linux-headers-$(uname -r) build-essential
|
10
|
+
apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
|
11
|
+
apt-get -y install vim
|
12
|
+
apt-get clean
|
13
|
+
|
14
|
+
# Installing the virtualbox guest additions
|
15
|
+
apt-get -y install dkms
|
16
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
17
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
18
|
+
sh /mnt/VBoxLinuxAdditions.run
|
19
|
+
umount /mnt
|
20
|
+
|
21
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
22
|
+
|
23
|
+
cd /tmp
|
24
|
+
|
25
|
+
# Setup sudo to allow no-password sudo for "admin"
|
26
|
+
groupadd -r admin
|
27
|
+
usermod -a -G admin vagrant
|
28
|
+
cp /etc/sudoers /etc/sudoers.orig
|
29
|
+
sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
|
30
|
+
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
31
|
+
|
32
|
+
# Add puppet group
|
33
|
+
groupadd -r puppet
|
34
|
+
|
35
|
+
# Install NFS client
|
36
|
+
apt-get -y install nfs-common
|
37
|
+
|
38
|
+
# Install Ruby from packages
|
39
|
+
apt-get -y install ruby rubygems ruby-dev
|
40
|
+
|
41
|
+
# Installing chef & Puppet
|
42
|
+
gem install chef --no-ri --no-rdoc
|
43
|
+
gem install puppet --no-ri --no-rdoc
|
44
|
+
|
45
|
+
# Installing vagrant keys
|
46
|
+
mkdir /home/vagrant/.ssh
|
47
|
+
chmod 700 /home/vagrant/.ssh
|
48
|
+
cd /home/vagrant/.ssh
|
49
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
50
|
+
chmod 600 /home/vagrant/.ssh/authorized_keys
|
51
|
+
chown -R vagrant /home/vagrant/.ssh
|
52
|
+
|
53
|
+
# Remove items used for building, since they aren't needed anymore
|
54
|
+
apt-get -y remove linux-headers-$(uname -r) build-essential
|
55
|
+
apt-get -y autoremove
|
56
|
+
|
57
|
+
# Zero out the free space to save space in the final image:
|
58
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
59
|
+
rm -f /EMPTY
|
60
|
+
|
61
|
+
# Removing leftover leases and persistent rules
|
62
|
+
echo "cleaning up dhcp leases"
|
63
|
+
rm /var/lib/dhcp3/*
|
64
|
+
|
65
|
+
# Make sure Udev doesn't block our network
|
66
|
+
# http://6.ptmc.org/?p=164
|
67
|
+
echo "cleaning up udev rules"
|
68
|
+
rm /etc/udev/rules.d/70-persistent-net.rules
|
69
|
+
mkdir /etc/udev/rules.d/70-persistent-net.rules
|
70
|
+
rm -rf /dev/.udev/
|
71
|
+
rm /lib/udev/rules.d/75-persistent-net-generator.rules
|
72
|
+
|
73
|
+
echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
|
74
|
+
echo "pre-up sleep 2" >> /etc/network/interfaces
|
75
|
+
exit
|
@@ -0,0 +1,87 @@
|
|
1
|
+
## Options to set on the command line
|
2
|
+
d-i debian-installer/locale string en_US.utf8
|
3
|
+
d-i console-setup/ask_detect boolean false
|
4
|
+
d-i console-setup/layout string us
|
5
|
+
|
6
|
+
#d-i netcfg/get_hostname string dummy
|
7
|
+
d-i netcfg/get_hostname string unassigned-hostname
|
8
|
+
d-i netcfg/get_domain string unassigned-domain
|
9
|
+
|
10
|
+
# Continue without a default route
|
11
|
+
# Not working , specify a dummy in the DHCP
|
12
|
+
#d-i netcfg/no_default_route boolean
|
13
|
+
|
14
|
+
d-i time/zone string UTC
|
15
|
+
d-i clock-setup/utc-auto boolean true
|
16
|
+
d-i clock-setup/utc boolean true
|
17
|
+
|
18
|
+
d-i kbd-chooser/method select American English
|
19
|
+
|
20
|
+
d-i netcfg/wireless_wep string
|
21
|
+
|
22
|
+
d-i base-installer/kernel/override-image string linux-server
|
23
|
+
#d-i base-installer/kernel/override-image string linux-image-2.6.32-21-generic
|
24
|
+
|
25
|
+
# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive
|
26
|
+
d-i debconf debconf/frontend select Noninteractive
|
27
|
+
|
28
|
+
d-i pkgsel/install-language-support boolean false
|
29
|
+
tasksel tasksel/first multiselect standard, ubuntu-server
|
30
|
+
|
31
|
+
#d-i partman-auto/method string regular
|
32
|
+
d-i partman-auto/method string lvm
|
33
|
+
#d-i partman-auto/purge_lvm_from_device boolean true
|
34
|
+
|
35
|
+
d-i partman-lvm/confirm boolean true
|
36
|
+
d-i partman-lvm/device_remove_lvm boolean true
|
37
|
+
d-i partman-auto/choose_recipe select atomic
|
38
|
+
|
39
|
+
d-i partman/confirm_write_new_label boolean true
|
40
|
+
d-i partman/confirm_nooverwrite boolean true
|
41
|
+
d-i partman/choose_partition select finish
|
42
|
+
d-i partman/confirm boolean true
|
43
|
+
|
44
|
+
#http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9626883
|
45
|
+
#Message: "write the changes to disk and configure lvm preseed"
|
46
|
+
#http://serverfault.com/questions/189328/ubuntu-kickstart-installation-using-lvm-waits-for-input
|
47
|
+
#preseed partman-lvm/confirm_nooverwrite boolean true
|
48
|
+
|
49
|
+
# Write the changes to disks and configure LVM?
|
50
|
+
d-i partman-lvm/confirm boolean true
|
51
|
+
d-i partman-lvm/confirm_nooverwrite boolean true
|
52
|
+
d-i partman-auto-lvm/guided_size string max
|
53
|
+
|
54
|
+
## Default user, we can get away with a recipe to change this
|
55
|
+
d-i passwd/user-fullname string vagrant
|
56
|
+
d-i passwd/username string vagrant
|
57
|
+
d-i passwd/user-password password vagrant
|
58
|
+
d-i passwd/user-password-again password vagrant
|
59
|
+
d-i user-setup/encrypt-home boolean false
|
60
|
+
d-i user-setup/allow-password-weak boolean true
|
61
|
+
|
62
|
+
## minimum is puppet and ssh and ntp
|
63
|
+
# Individual additional packages to install
|
64
|
+
d-i pkgsel/include string openssh-server ntp
|
65
|
+
|
66
|
+
# Whether to upgrade packages after debootstrap.
|
67
|
+
# Allowed values: none, safe-upgrade, full-upgrade
|
68
|
+
d-i pkgsel/upgrade select full-upgrade
|
69
|
+
|
70
|
+
d-i grub-installer/only_debian boolean true
|
71
|
+
d-i grub-installer/with_other_os boolean true
|
72
|
+
d-i finish-install/reboot_in_progress note
|
73
|
+
|
74
|
+
#For the update
|
75
|
+
d-i pkgsel/update-policy select none
|
76
|
+
|
77
|
+
# debconf-get-selections --install
|
78
|
+
#Use mirror
|
79
|
+
#d-i apt-setup/use_mirror boolean true
|
80
|
+
#d-i mirror/country string manual
|
81
|
+
#choose-mirror-bin mirror/protocol string http
|
82
|
+
#choose-mirror-bin mirror/http/hostname string 192.168.4.150
|
83
|
+
#choose-mirror-bin mirror/http/directory string /ubuntu
|
84
|
+
#choose-mirror-bin mirror/suite select maverick
|
85
|
+
#d-i debian-installer/allow_unauthenticated string true
|
86
|
+
|
87
|
+
choose-mirror-bin mirror/http/proxy string
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1',
|
3
|
+
:memory_size=> '2048',
|
4
|
+
:disk_size => '10140',
|
5
|
+
:disk_format => 'VDI',
|
6
|
+
:hostiocache => 'off',
|
7
|
+
:os_type_id => 'Ubuntu',
|
8
|
+
:iso_file => "ubuntu-12.10-server-i386.iso",
|
9
|
+
:iso_src => "http://releases.ubuntu.com/12.10/ubuntu-12.10-server-i386.iso",
|
10
|
+
:iso_md5 => 'b3d4d4edfc8f291af0b83f8a2ba19a2f',
|
11
|
+
:iso_download_timeout => "1000",
|
12
|
+
:boot_wait => "4",
|
13
|
+
:boot_cmd_sequence => [
|
14
|
+
'<Esc><Esc><Enter>',
|
15
|
+
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
16
|
+
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
|
17
|
+
'hostname=%NAME% ',
|
18
|
+
'fb=false debconf/frontend=noninteractive ',
|
19
|
+
'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=us keyboard-configuration/variant=us console-setup/ask_detect=false ',
|
20
|
+
'initrd=/install/initrd.gz -- <Enter>'
|
21
|
+
],
|
22
|
+
:kickstart_port => "7122",
|
23
|
+
:kickstart_timeout => "10000",
|
24
|
+
:kickstart_file => "preseed.cfg",
|
25
|
+
:ssh_login_timeout => "10000",
|
26
|
+
:ssh_user => "vagrant",
|
27
|
+
:ssh_password => "vagrant",
|
28
|
+
:ssh_key => "",
|
29
|
+
:ssh_host_port => "7222",
|
30
|
+
:ssh_guest_port => "22",
|
31
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
32
|
+
:shutdown_cmd => "shutdown -P now",
|
33
|
+
:postinstall_files => [ "postinstall.sh"],
|
34
|
+
:postinstall_timeout => "10000"
|
35
|
+
})
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# postinstall.sh created from Mitchell's official lucid32/64 baseboxes
|
2
|
+
|
3
|
+
date > /etc/vagrant_box_build_time
|
4
|
+
|
5
|
+
|
6
|
+
# Apt-install various things necessary for Ruby, guest additions,
|
7
|
+
# etc., and remove optional things to trim down the machine.
|
8
|
+
apt-get -y update
|
9
|
+
apt-get -y upgrade
|
10
|
+
apt-get -y install linux-headers-$(uname -r) build-essential
|
11
|
+
apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
|
12
|
+
apt-get -y install vim
|
13
|
+
apt-get clean
|
14
|
+
|
15
|
+
# Installing the virtualbox guest additions
|
16
|
+
apt-get -y install dkms
|
17
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
18
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
19
|
+
sh /mnt/VBoxLinuxAdditions.run
|
20
|
+
umount /mnt
|
21
|
+
|
22
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
23
|
+
|
24
|
+
cd /tmp
|
25
|
+
|
26
|
+
# Setup sudo to allow no-password sudo for "admin"
|
27
|
+
groupadd -r admin
|
28
|
+
usermod -a -G admin vagrant
|
29
|
+
cp /etc/sudoers /etc/sudoers.orig
|
30
|
+
sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
|
31
|
+
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
32
|
+
|
33
|
+
# Add puppet group
|
34
|
+
groupadd -r puppet
|
35
|
+
|
36
|
+
# Install NFS client
|
37
|
+
apt-get -y install nfs-common
|
38
|
+
|
39
|
+
# Install Ruby from source in /opt so that users of Vagrant
|
40
|
+
# can install their own Rubies using packages or however.
|
41
|
+
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
|
42
|
+
tar xvzf ruby-1.9.3-p286.tar.gz
|
43
|
+
cd ruby-1.9.3-p286
|
44
|
+
./configure --prefix=/opt/ruby
|
45
|
+
make
|
46
|
+
make install
|
47
|
+
cd ..
|
48
|
+
rm -rf ruby-1.9.3-p286
|
49
|
+
rm ruby-1.9.3-p286.tar.gz
|
50
|
+
|
51
|
+
# Install RubyGems 1.8.24
|
52
|
+
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
|
53
|
+
tar xzf rubygems-1.8.24.tgz
|
54
|
+
cd rubygems-1.8.24
|
55
|
+
/opt/ruby/bin/ruby setup.rb
|
56
|
+
cd ..
|
57
|
+
rm -rf rubygems-1.8.24
|
58
|
+
rm rubygems-1.8.24.tgz
|
59
|
+
|
60
|
+
# Installing chef & Puppet
|
61
|
+
/opt/ruby/bin/gem install chef --no-ri --no-rdoc
|
62
|
+
/opt/ruby/bin/gem install puppet --no-ri --no-rdoc
|
63
|
+
|
64
|
+
# Add /opt/ruby/bin to the global path as the last resort so
|
65
|
+
# Ruby, RubyGems, and Chef/Puppet are visible
|
66
|
+
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
|
67
|
+
|
68
|
+
# Installing vagrant keys
|
69
|
+
mkdir /home/vagrant/.ssh
|
70
|
+
chmod 700 /home/vagrant/.ssh
|
71
|
+
cd /home/vagrant/.ssh
|
72
|
+
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
|
73
|
+
chmod 600 /home/vagrant/.ssh/authorized_keys
|
74
|
+
chown -R vagrant /home/vagrant/.ssh
|
75
|
+
|
76
|
+
# Remove items used for building, since they aren't needed anymore
|
77
|
+
apt-get -y remove linux-headers-$(uname -r) build-essential
|
78
|
+
apt-get -y autoremove
|
79
|
+
|
80
|
+
# Zero out the free space to save space in the final image:
|
81
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
82
|
+
rm -f /EMPTY
|
83
|
+
|
84
|
+
# Removing leftover leases and persistent rules
|
85
|
+
echo "cleaning up dhcp leases"
|
86
|
+
rm /var/lib/dhcp3/*
|
87
|
+
|
88
|
+
# Make sure Udev doesn't block our network
|
89
|
+
# http://6.ptmc.org/?p=164
|
90
|
+
echo "cleaning up udev rules"
|
91
|
+
rm /etc/udev/rules.d/70-persistent-net.rules
|
92
|
+
mkdir /etc/udev/rules.d/70-persistent-net.rules
|
93
|
+
rm -rf /dev/.udev/
|
94
|
+
rm /lib/udev/rules.d/75-persistent-net-generator.rules
|
95
|
+
|
96
|
+
echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
|
97
|
+
echo "pre-up sleep 2" >> /etc/network/interfaces
|
98
|
+
exit
|
@@ -0,0 +1,87 @@
|
|
1
|
+
## Options to set on the command line
|
2
|
+
d-i debian-installer/locale string en_US.utf8
|
3
|
+
d-i console-setup/ask_detect boolean false
|
4
|
+
d-i console-setup/layout string us
|
5
|
+
|
6
|
+
#d-i netcfg/get_hostname string dummy
|
7
|
+
d-i netcfg/get_hostname string unassigned-hostname
|
8
|
+
d-i netcfg/get_domain string unassigned-domain
|
9
|
+
|
10
|
+
# Continue without a default route
|
11
|
+
# Not working , specify a dummy in the DHCP
|
12
|
+
#d-i netcfg/no_default_route boolean
|
13
|
+
|
14
|
+
d-i time/zone string UTC
|
15
|
+
d-i clock-setup/utc-auto boolean true
|
16
|
+
d-i clock-setup/utc boolean true
|
17
|
+
|
18
|
+
d-i kbd-chooser/method select American English
|
19
|
+
|
20
|
+
d-i netcfg/wireless_wep string
|
21
|
+
|
22
|
+
d-i base-installer/kernel/override-image string linux-server
|
23
|
+
#d-i base-installer/kernel/override-image string linux-image-2.6.32-21-generic
|
24
|
+
|
25
|
+
# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive
|
26
|
+
d-i debconf debconf/frontend select Noninteractive
|
27
|
+
|
28
|
+
d-i pkgsel/install-language-support boolean false
|
29
|
+
tasksel tasksel/first multiselect standard, ubuntu-server
|
30
|
+
|
31
|
+
#d-i partman-auto/method string regular
|
32
|
+
d-i partman-auto/method string lvm
|
33
|
+
#d-i partman-auto/purge_lvm_from_device boolean true
|
34
|
+
|
35
|
+
d-i partman-lvm/confirm boolean true
|
36
|
+
d-i partman-lvm/device_remove_lvm boolean true
|
37
|
+
d-i partman-auto/choose_recipe select atomic
|
38
|
+
|
39
|
+
d-i partman/confirm_write_new_label boolean true
|
40
|
+
d-i partman/confirm_nooverwrite boolean true
|
41
|
+
d-i partman/choose_partition select finish
|
42
|
+
d-i partman/confirm boolean true
|
43
|
+
|
44
|
+
#http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9626883
|
45
|
+
#Message: "write the changes to disk and configure lvm preseed"
|
46
|
+
#http://serverfault.com/questions/189328/ubuntu-kickstart-installation-using-lvm-waits-for-input
|
47
|
+
#preseed partman-lvm/confirm_nooverwrite boolean true
|
48
|
+
|
49
|
+
# Write the changes to disks and configure LVM?
|
50
|
+
d-i partman-lvm/confirm boolean true
|
51
|
+
d-i partman-lvm/confirm_nooverwrite boolean true
|
52
|
+
d-i partman-auto-lvm/guided_size string max
|
53
|
+
|
54
|
+
## Default user, we can get away with a recipe to change this
|
55
|
+
d-i passwd/user-fullname string vagrant
|
56
|
+
d-i passwd/username string vagrant
|
57
|
+
d-i passwd/user-password password vagrant
|
58
|
+
d-i passwd/user-password-again password vagrant
|
59
|
+
d-i user-setup/encrypt-home boolean false
|
60
|
+
d-i user-setup/allow-password-weak boolean true
|
61
|
+
|
62
|
+
## minimum is puppet and ssh and ntp
|
63
|
+
# Individual additional packages to install
|
64
|
+
d-i pkgsel/include string openssh-server ntp
|
65
|
+
|
66
|
+
# Whether to upgrade packages after debootstrap.
|
67
|
+
# Allowed values: none, safe-upgrade, full-upgrade
|
68
|
+
d-i pkgsel/upgrade select full-upgrade
|
69
|
+
|
70
|
+
d-i grub-installer/only_debian boolean true
|
71
|
+
d-i grub-installer/with_other_os boolean true
|
72
|
+
d-i finish-install/reboot_in_progress note
|
73
|
+
|
74
|
+
#For the update
|
75
|
+
d-i pkgsel/update-policy select none
|
76
|
+
|
77
|
+
# debconf-get-selections --install
|
78
|
+
#Use mirror
|
79
|
+
#d-i apt-setup/use_mirror boolean true
|
80
|
+
#d-i mirror/country string manual
|
81
|
+
#choose-mirror-bin mirror/protocol string http
|
82
|
+
#choose-mirror-bin mirror/http/hostname string 192.168.4.150
|
83
|
+
#choose-mirror-bin mirror/http/directory string /ubuntu
|
84
|
+
#choose-mirror-bin mirror/suite select maverick
|
85
|
+
#d-i debian-installer/allow_unauthenticated string true
|
86
|
+
|
87
|
+
choose-mirror-bin mirror/http/proxy string
|