veewee 0.1.22 → 0.1.23
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/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/java/README.txt +5 -0
- data/lib/java/dir2floppy.jar +0 -0
- data/lib/java/dir2floppy.java +137 -0
- data/lib/veewee/session.rb +57 -10
- data/lib/veewee/version.rb +1 -1
- data/lib/veewee/web.rb +1 -1
- data/templates/CentOS-4.8-i386/definition.rb +2 -1
- data/templates/CentOS-4.8-i386/postinstall.sh +1 -1
- data/templates/{CentOS-5.5-i386-netboot → CentOS-5.6-i386-netboot}/definition.rb +4 -4
- data/templates/{CentOS-5.5-i386-netboot → CentOS-5.6-i386-netboot}/ks.cfg +0 -0
- data/templates/{CentOS-5.5-i386-netboot → CentOS-5.6-i386-netboot}/postinstall.sh +1 -1
- data/templates/{CentOS-5.5-i386 → CentOS-5.6-i386}/definition.rb +4 -2
- data/templates/{CentOS-5.5-i386 → CentOS-5.6-i386}/ks.cfg +0 -0
- data/templates/{CentOS-5.5-i386 → CentOS-5.6-i386}/postinstall.sh +1 -1
- data/templates/Debian-6.0.1a-amd64-netboot/postinstall.sh +1 -1
- data/templates/Fedora-14-amd64-netboot/definition.rb +1 -1
- data/templates/Fedora-14-amd64-netboot/postinstall.sh +1 -1
- data/templates/Fedora-14-amd64/definition.rb +1 -1
- data/templates/Fedora-14-amd64/postinstall.sh +1 -1
- data/templates/Fedora-14-i386-netboot/definition.rb +1 -1
- data/templates/Fedora-14-i386-netboot/postinstall.sh +1 -1
- data/templates/Fedora-14-i386/definition.rb +1 -1
- data/templates/Fedora-14-i386/postinstall.sh +1 -1
- data/templates/gentoo-latest-i386-experimental/definition.rb +29 -0
- data/templates/gentoo-latest-i386-experimental/postinstall.sh +182 -0
- data/templates/opensuse-11.4-i386-experimental/README +11 -0
- data/templates/opensuse-11.4-i386-experimental/autoinst.xml +1269 -0
- data/templates/opensuse-11.4-i386-experimental/autoinst.xml.generated +1269 -0
- data/templates/opensuse-11.4-i386-experimental/autoinst.xml.tweaked +1269 -0
- data/templates/opensuse-11.4-i386-experimental/definition.rb +31 -0
- data/templates/opensuse-11.4-i386-experimental/postinstall.sh +89 -0
- data/templates/solaris-11-express-i386/postinstall.sh +5 -5
- data/templates/ubuntu-10.04.2-server-amd64/postinstall.sh +44 -15
- data/templates/ubuntu-10.04.2-server-i386/postinstall.sh +46 -16
- data/templates/ubuntu-10.10-server-amd64-netboot/postinstall.sh +46 -16
- data/templates/ubuntu-10.10-server-amd64/postinstall.sh +45 -15
- data/templates/ubuntu-10.10-server-i386-netboot/postinstall.sh +45 -15
- data/templates/ubuntu-10.10-server-i386/postinstall.sh +45 -15
- data/templates/ubuntu-11.04-server-amd64/definition.rb +24 -0
- data/templates/ubuntu-11.04-server-amd64/postinstall.sh +73 -0
- data/templates/ubuntu-11.04-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-11.04-server-i386/definition.rb +24 -0
- data/templates/ubuntu-11.04-server-i386/postinstall.sh +73 -0
- data/templates/ubuntu-11.04-server-i386/preseed.cfg +87 -0
- data/templates/windows-2008R2-amd64-experimental/Autounattend.xml +132 -0
- data/templates/windows-2008R2-amd64-experimental/README.md +33 -0
- data/templates/windows-2008R2-amd64-experimental/cygwin-setup.exe +0 -0
- data/templates/windows-2008R2-amd64-experimental/cygwin-sshd.bat +38 -0
- data/templates/windows-2008R2-amd64-experimental/definition.rb +17 -0
- data/templates/windows-2008R2-amd64-experimental/install-winrm.bat +6 -0
- data/templates/windows-2008R2-amd64-experimental/note-virtualbox-additions.txt +23 -0
- data/templates/windows-2008R2-amd64-experimental/postinstall.sh +48 -0
- data/templates/windows-2008R2-amd64-experimental/setup.exe +0 -0
- data/templates/windows-2008R2-amd64-experimental/winrm.rb +8 -0
- metadata +37 -15
- data/templates/ubuntu-10.04.2-server-i386/postinstall2.sh +0 -9
- data/templates/ubuntu-10.10-server-amd64-netboot/postinstall2.sh +0 -9
- data/templates/ubuntu-10.10-server-amd64/postinstall2.sh +0 -9
- data/templates/ubuntu-10.10-server-i386-netboot/postinstall2.sh +0 -9
- data/templates/ubuntu-10.10-server-i386/postinstall2.sh +0 -9
@@ -0,0 +1,31 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1', :memory_size=> '384',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
|
4
|
+
:os_type_id => 'OpenSUSE',
|
5
|
+
:iso_file => "openSUSE-11.4-DVD-i586.iso",
|
6
|
+
:iso_src => "http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-DVD-i586.iso",
|
7
|
+
#:iso_src => "http://ftp.belnet.be/mirror/ftp.opensuse.org/distribution/11.4/iso/openSUSE-11.4-DVD-i586.iso",
|
8
|
+
:iso_md5 => "5f6d6d67c3e256b2513311f4ed650515",
|
9
|
+
:iso_download_timeout => "1000",
|
10
|
+
:boot_wait => "10", :boot_cmd_sequence => [
|
11
|
+
'<Esc><Enter>',
|
12
|
+
'linux',
|
13
|
+
#'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
14
|
+
' netdevice=eth0',
|
15
|
+
' netsetup=dhcp',
|
16
|
+
' instmode=dvd',
|
17
|
+
#' install=file://mnt/suse',
|
18
|
+
' textmode=1 autoyast=http://%IP%:%PORT%/autoinst.xml',
|
19
|
+
#'hostname=%NAME% ',
|
20
|
+
#'initrd=/install/initrd.gz -- <Enter>'
|
21
|
+
'<Enter>'
|
22
|
+
],
|
23
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",
|
24
|
+
#We need this twice, as it is read twice
|
25
|
+
:kickstart_file => ["autoinst.xml","autoinst.xml"],
|
26
|
+
:ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
|
27
|
+
:ssh_host_port => "7222", :ssh_guest_port => "22",
|
28
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
29
|
+
:shutdown_cmd => "shutdown -P now",
|
30
|
+
:postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000"
|
31
|
+
})
|
@@ -0,0 +1,89 @@
|
|
1
|
+
#Inspired by https://github.com/fnichol/wiki-notes/wiki/Creating-An-openSUSE-11.3-x32-Vagrant-Box
|
2
|
+
|
3
|
+
|
4
|
+
zypper --non-interactive refresh
|
5
|
+
# zypper --non-interactive up
|
6
|
+
|
7
|
+
# /sbin/shutdown -r now && exit
|
8
|
+
# Install VirtualBox Guest Additions
|
9
|
+
# Install some pre-requisites needed for the Guest Additions package and remove the system-installed package:
|
10
|
+
zypper --non-interactive install make gcc
|
11
|
+
zypper --non-interactive install kernel-default-devel
|
12
|
+
zypper --non-interactive remove virtualbox-ose-guest-kmp-default \
|
13
|
+
virtualbox-ose-guest-tools xorg-x11-driver-virtualbox-ose
|
14
|
+
|
15
|
+
# Fix remote login
|
16
|
+
echo 'UseDNS no' >> /etc/ssh/sshd_config
|
17
|
+
|
18
|
+
#install ruby
|
19
|
+
zypper --non-interactive install ruby ruby-devel rubygems
|
20
|
+
gem install chef --no-ri --no-rdoc
|
21
|
+
gem install puppet --no-ri --no-rdoc
|
22
|
+
sudo zypper --non-interactive refresh
|
23
|
+
sudo zypper --non-interactive up
|
24
|
+
#
|
25
|
+
#/sbin/shutdown -hP now && exit
|
26
|
+
|
27
|
+
|
28
|
+
#Installing vagrant keys
|
29
|
+
zypper --non-interactive install wget
|
30
|
+
mkdir /home/vagrant/.ssh
|
31
|
+
chmod 700 /home/vagrant/.ssh
|
32
|
+
cd /home/vagrant/.ssh
|
33
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
34
|
+
chown -R vagrant /home/vagrant/.ssh
|
35
|
+
|
36
|
+
#Installing the virtualbox guest additions
|
37
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
38
|
+
cd /tmp
|
39
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
40
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
41
|
+
sh /mnt/VBoxLinuxAdditions.run
|
42
|
+
umount /mnt
|
43
|
+
|
44
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
45
|
+
exit
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
sudo zypper --non-interactive refresh
|
50
|
+
sudo zypper --non-interactive up
|
51
|
+
sudo /sbin/shutdown -r now && exit
|
52
|
+
Install VirtualBox Guest Additions
|
53
|
+
Install some pre-requisites needed for the Guest Additions package and remove the system-installed package:
|
54
|
+
sudo zypper --non-interactive install make gcc
|
55
|
+
sudo zypper --non-interactive install kernel-default-devel
|
56
|
+
sudo zypper --non-interactive remove virtualbox-ose-guest-kmp-default \
|
57
|
+
virtualbox-ose-guest-tools xorg-x11-driver-virtualbox-ose
|
58
|
+
Now mount the Guest Additions from the Devices -> Install Guest Additions VirtualBox menu. Next, mount the iso and install the additions:
|
59
|
+
sudo mkdir -p /media/cdrom
|
60
|
+
sudo mount /dev/cdrom /media/cdrom
|
61
|
+
(cd /media/cdrom && sudo sh VBoxLinuxAdditions.run)
|
62
|
+
sudo umount /media/cdrom
|
63
|
+
Note: The installer will complain about not finding "the X.Org or XFree86 Window System" which is fine and expected.
|
64
|
+
Remove the disk from the virtual drive by clicking the CD-ROM icon and choosing from the flyout menu.
|
65
|
+
Prepare SSH Configuration
|
66
|
+
Install the public key that Vagrant uses when SSHing into the virtual machine:
|
67
|
+
sudo zypper --non-interactive install curl
|
68
|
+
mkdir -p ~/.ssh
|
69
|
+
chmod 0700 ~/.ssh
|
70
|
+
curl -o ~/.ssh/authorized_keys \
|
71
|
+
https://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub
|
72
|
+
chmod 0600 ~/.ssh/authorized_keys
|
73
|
+
Edit the sshd configuration to prevent DNS resolution (speedup logins):
|
74
|
+
sudo bash -c "echo 'UseDNS no' >> /etc/ssh/sshd_config"
|
75
|
+
Install Ruby, Chef, And Puppet
|
76
|
+
Thankfully, openSUSE comes with a decently up to date ruby (1.8.7) and a non-crippled rubygems (currently 1.3.7), so this is straight forward:
|
77
|
+
sudo zypper --non-interactive install ruby ruby-devel rubygems
|
78
|
+
Install the chef and puppet gems so they are ready for the provisioners:
|
79
|
+
sudo gem install chef --no-ri --no-rdoc
|
80
|
+
sudo gem install puppet --no-ri --no-rdoc
|
81
|
+
Update Message Of The Day
|
82
|
+
Modify the message of the day (to match the default Vagrant box):
|
83
|
+
sudo bash -c "echo 'Welcome to your Vagrant-built virtual machine.' > /etc/motd"
|
84
|
+
Final Cleanup
|
85
|
+
Run one last update and cleanup:
|
86
|
+
sudo zypper --non-interactive refresh
|
87
|
+
sudo zypper --non-interactive up
|
88
|
+
Finally, shutdown the virtual machine:
|
89
|
+
sudo /sbin/shutdown -hP now && exit
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# http://projects.puppetlabs.com/projects/1/wiki/Puppet_Solaris
|
2
2
|
|
3
3
|
# Add the opencsw package site
|
4
|
-
export PATH=/usr/bin
|
4
|
+
export PATH=/usr/bin:/usr/sbin:$PATH
|
5
5
|
|
6
6
|
yes|/usr/sbin/pkgadd -d http://mirror.opencsw.org/opencsw/pkgutil-`uname -p`.pkg all
|
7
7
|
|
@@ -19,8 +19,8 @@ yes|/usr/sbin/pkgadd -d http://mirror.opencsw.org/opencsw/pkgutil-`uname -p`.pkg
|
|
19
19
|
|
20
20
|
# These are needed to get a compiler working
|
21
21
|
# Mainly because chef depends on compiling some native gems
|
22
|
-
export PATH=/opt/csw/bin
|
23
|
-
export PATH=/opt/csw/gcc4/bin
|
22
|
+
export PATH=/opt/csw/bin:$PATH
|
23
|
+
export PATH=/opt/csw/gcc4/bin:$PATH
|
24
24
|
|
25
25
|
/opt/csw/bin/pkgutil -y -i CSWgcc4core
|
26
26
|
|
@@ -66,8 +66,8 @@ yes|/usr/sbin/pkgadd -d . SUNWvbox
|
|
66
66
|
|
67
67
|
# Fix the shells to include the /opt/csw directories
|
68
68
|
|
69
|
-
echo "export PATH=/opt/csw/bin:/opt/csw/sbin
|
70
|
-
echo "export PATH=/opt/csw/bin:/opt/csw/sbin
|
69
|
+
echo "export PATH=/opt/csw/bin:/opt/csw/sbin:$PATH" >> /root/.profile
|
70
|
+
echo "export PATH=/opt/csw/bin:/opt/csw/sbin:$PATH" >> /export/home/vagrant/.profile
|
71
71
|
|
72
72
|
puts "Note: validation of this box wil fail, as it's not linux based, working on that"
|
73
73
|
|
@@ -1,35 +1,58 @@
|
|
1
|
-
#
|
1
|
+
# postinstall.sh created from Mitchell's official lucid32/64 baseboxes
|
2
2
|
|
3
|
-
#
|
3
|
+
# Apt-install various things necessary for Ruby, guest additions,
|
4
|
+
# etc., and remove optional things to trim down the machine.
|
4
5
|
apt-get -y update
|
6
|
+
apt-get -y upgrade
|
5
7
|
apt-get -y install linux-headers-$(uname -r) build-essential
|
6
8
|
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
|
7
9
|
apt-get clean
|
8
10
|
|
9
|
-
#
|
11
|
+
# Setup sudo to allow no-password sudo for "admin"
|
10
12
|
cp /etc/sudoers /etc/sudoers.orig
|
13
|
+
sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
|
11
14
|
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
12
15
|
|
13
|
-
#
|
14
|
-
|
15
|
-
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
16
|
-
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby --no-dev-docs --dont-install-useful-gems
|
17
|
-
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/rubyenterprise.sh
|
18
|
-
rm -rf ./ruby-enterprise-1.8.7-2010.02/
|
19
|
-
rm ruby-enterprise-1.8.7-2010.02.tar.gz
|
16
|
+
# Install NFS client
|
17
|
+
apt-get -y install nfs-common
|
20
18
|
|
21
|
-
#
|
19
|
+
# Install Ruby from source in /opt so that users of Vagrant
|
20
|
+
# can install their own Rubies using packages or however.
|
21
|
+
# We must install the 1.8.x series since Puppet doesn't support
|
22
|
+
# Ruby 1.9 yet.
|
23
|
+
wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.8.7-p334.tar.gz
|
24
|
+
tar xvzf ruby-1.8.7-p334.tar.gz
|
25
|
+
cd ruby-1.8.7-p334
|
26
|
+
./configure --prefix=/opt/ruby
|
27
|
+
make
|
28
|
+
make install
|
29
|
+
cd ..
|
30
|
+
rm -rf ruby-1.8.7-p334*
|
31
|
+
|
32
|
+
# Install RubyGems 1.7.2
|
33
|
+
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
|
34
|
+
tar xzf rubygems-1.7.2.tgz
|
35
|
+
cd rubygems-1.7.2
|
36
|
+
/opt/ruby/bin/ruby setup.rb
|
37
|
+
cd ..
|
38
|
+
rm -rf rubygems-1.7.2*
|
39
|
+
|
40
|
+
# Installing chef & Puppet
|
22
41
|
/opt/ruby/bin/gem install chef --no-ri --no-rdoc
|
23
42
|
/opt/ruby/bin/gem install puppet --no-ri --no-rdoc
|
24
43
|
|
25
|
-
#
|
44
|
+
# Add /opt/ruby/bin to the global path as the last resort so
|
45
|
+
# Ruby, RubyGems, and Chef/Puppet are visible
|
46
|
+
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
|
47
|
+
|
48
|
+
# Installing vagrant keys
|
26
49
|
mkdir /home/vagrant/.ssh
|
27
50
|
chmod 700 /home/vagrant/.ssh
|
28
51
|
cd /home/vagrant/.ssh
|
29
52
|
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
30
53
|
chown -R vagrant /home/vagrant/.ssh
|
31
54
|
|
32
|
-
#Installing the virtualbox guest additions
|
55
|
+
# Installing the virtualbox guest additions
|
33
56
|
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
34
57
|
cd /tmp
|
35
58
|
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
@@ -37,8 +60,14 @@ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
|
37
60
|
sh /mnt/VBoxLinuxAdditions.run
|
38
61
|
umount /mnt
|
39
62
|
|
63
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
64
|
+
|
65
|
+
# Remove items used for building, since they aren't needed anymore
|
40
66
|
apt-get -y remove linux-headers-$(uname -r) build-essential
|
41
67
|
apt-get -y autoremove
|
42
68
|
|
43
|
-
|
44
|
-
|
69
|
+
# Zero out the free space to save space in the final image:
|
70
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
71
|
+
rm -f /EMPTY
|
72
|
+
|
73
|
+
exit
|
@@ -1,37 +1,58 @@
|
|
1
|
-
#
|
1
|
+
# postinstall.sh created from Mitchell's official lucid32/64 baseboxes
|
2
2
|
|
3
|
-
#
|
3
|
+
# Apt-install various things necessary for Ruby, guest additions,
|
4
|
+
# etc., and remove optional things to trim down the machine.
|
4
5
|
apt-get -y update
|
5
|
-
|
6
|
-
apt-get -y remove apparmor
|
6
|
+
apt-get -y upgrade
|
7
7
|
apt-get -y install linux-headers-$(uname -r) build-essential
|
8
8
|
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
|
9
9
|
apt-get clean
|
10
10
|
|
11
|
-
#
|
11
|
+
# Setup sudo to allow no-password sudo for "admin"
|
12
12
|
cp /etc/sudoers /etc/sudoers.orig
|
13
|
+
sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
|
13
14
|
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
14
15
|
|
15
|
-
#
|
16
|
-
|
17
|
-
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
18
|
-
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby --no-dev-docs --dont-install-useful-gems
|
19
|
-
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/rubyenterprise.sh
|
20
|
-
rm -rf ./ruby-enterprise-1.8.7-2010.02/
|
21
|
-
rm ruby-enterprise-1.8.7-2010.02.tar.gz
|
16
|
+
# Install NFS client
|
17
|
+
apt-get -y install nfs-common
|
22
18
|
|
23
|
-
#
|
19
|
+
# Install Ruby from source in /opt so that users of Vagrant
|
20
|
+
# can install their own Rubies using packages or however.
|
21
|
+
# We must install the 1.8.x series since Puppet doesn't support
|
22
|
+
# Ruby 1.9 yet.
|
23
|
+
wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.8.7-p334.tar.gz
|
24
|
+
tar xvzf ruby-1.8.7-p334.tar.gz
|
25
|
+
cd ruby-1.8.7-p334
|
26
|
+
./configure --prefix=/opt/ruby
|
27
|
+
make
|
28
|
+
make install
|
29
|
+
cd ..
|
30
|
+
rm -rf ruby-1.8.7-p334*
|
31
|
+
|
32
|
+
# Install RubyGems 1.7.2
|
33
|
+
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
|
34
|
+
tar xzf rubygems-1.7.2.tgz
|
35
|
+
cd rubygems-1.7.2
|
36
|
+
/opt/ruby/bin/ruby setup.rb
|
37
|
+
cd ..
|
38
|
+
rm -rf rubygems-1.7.2*
|
39
|
+
|
40
|
+
# Installing chef & Puppet
|
24
41
|
/opt/ruby/bin/gem install chef --no-ri --no-rdoc
|
25
42
|
/opt/ruby/bin/gem install puppet --no-ri --no-rdoc
|
26
43
|
|
27
|
-
#
|
44
|
+
# Add /opt/ruby/bin to the global path as the last resort so
|
45
|
+
# Ruby, RubyGems, and Chef/Puppet are visible
|
46
|
+
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
|
47
|
+
|
48
|
+
# Installing vagrant keys
|
28
49
|
mkdir /home/vagrant/.ssh
|
29
50
|
chmod 700 /home/vagrant/.ssh
|
30
51
|
cd /home/vagrant/.ssh
|
31
52
|
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
32
53
|
chown -R vagrant /home/vagrant/.ssh
|
33
54
|
|
34
|
-
#Installing the virtualbox guest additions
|
55
|
+
# Installing the virtualbox guest additions
|
35
56
|
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
36
57
|
cd /tmp
|
37
58
|
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
@@ -40,4 +61,13 @@ sh /mnt/VBoxLinuxAdditions.run
|
|
40
61
|
umount /mnt
|
41
62
|
|
42
63
|
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
43
|
-
|
64
|
+
|
65
|
+
# Remove items used for building, since they aren't needed anymore
|
66
|
+
apt-get -y remove linux-headers-$(uname -r) build-essential
|
67
|
+
apt-get -y autoremove
|
68
|
+
|
69
|
+
# Zero out the free space to save space in the final image:
|
70
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
71
|
+
rm -f /EMPTY
|
72
|
+
|
73
|
+
exit
|
@@ -1,37 +1,58 @@
|
|
1
|
-
#
|
1
|
+
# postinstall.sh created from Mitchell's official lucid32/64 baseboxes
|
2
2
|
|
3
|
-
#
|
3
|
+
# Apt-install various things necessary for Ruby, guest additions,
|
4
|
+
# etc., and remove optional things to trim down the machine.
|
4
5
|
apt-get -y update
|
5
|
-
|
6
|
-
apt-get -y remove apparmor
|
6
|
+
apt-get -y upgrade
|
7
7
|
apt-get -y install linux-headers-$(uname -r) build-essential
|
8
8
|
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
|
9
9
|
apt-get clean
|
10
10
|
|
11
|
-
#
|
11
|
+
# Setup sudo to allow no-password sudo for "admin"
|
12
12
|
cp /etc/sudoers /etc/sudoers.orig
|
13
|
+
sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
|
13
14
|
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
14
15
|
|
15
|
-
#
|
16
|
-
|
17
|
-
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
18
|
-
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby --no-dev-docs --dont-install-useful-gems
|
19
|
-
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/rubyenterprise.sh
|
20
|
-
rm -rf ./ruby-enterprise-1.8.7-2010.02/
|
21
|
-
rm ruby-enterprise-1.8.7-2010.02.tar.gz
|
16
|
+
# Install NFS client
|
17
|
+
apt-get -y install nfs-common
|
22
18
|
|
23
|
-
#
|
19
|
+
# Install Ruby from source in /opt so that users of Vagrant
|
20
|
+
# can install their own Rubies using packages or however.
|
21
|
+
# We must install the 1.8.x series since Puppet doesn't support
|
22
|
+
# Ruby 1.9 yet.
|
23
|
+
wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.8.7-p334.tar.gz
|
24
|
+
tar xvzf ruby-1.8.7-p334.tar.gz
|
25
|
+
cd ruby-1.8.7-p334
|
26
|
+
./configure --prefix=/opt/ruby
|
27
|
+
make
|
28
|
+
make install
|
29
|
+
cd ..
|
30
|
+
rm -rf ruby-1.8.7-p334*
|
31
|
+
|
32
|
+
# Install RubyGems 1.7.2
|
33
|
+
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
|
34
|
+
tar xzf rubygems-1.7.2.tgz
|
35
|
+
cd rubygems-1.7.2
|
36
|
+
/opt/ruby/bin/ruby setup.rb
|
37
|
+
cd ..
|
38
|
+
rm -rf rubygems-1.7.2*
|
39
|
+
|
40
|
+
# Installing chef & Puppet
|
24
41
|
/opt/ruby/bin/gem install chef --no-ri --no-rdoc
|
25
42
|
/opt/ruby/bin/gem install puppet --no-ri --no-rdoc
|
26
43
|
|
27
|
-
#
|
44
|
+
# Add /opt/ruby/bin to the global path as the last resort so
|
45
|
+
# Ruby, RubyGems, and Chef/Puppet are visible
|
46
|
+
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
|
47
|
+
|
48
|
+
# Installing vagrant keys
|
28
49
|
mkdir /home/vagrant/.ssh
|
29
50
|
chmod 700 /home/vagrant/.ssh
|
30
51
|
cd /home/vagrant/.ssh
|
31
52
|
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
32
53
|
chown -R vagrant /home/vagrant/.ssh
|
33
54
|
|
34
|
-
#Installing the virtualbox guest additions
|
55
|
+
# Installing the virtualbox guest additions
|
35
56
|
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
36
57
|
cd /tmp
|
37
58
|
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
@@ -40,4 +61,13 @@ sh /mnt/VBoxLinuxAdditions.run
|
|
40
61
|
umount /mnt
|
41
62
|
|
42
63
|
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
43
|
-
|
64
|
+
|
65
|
+
# Remove items used for building, since they aren't needed anymore
|
66
|
+
apt-get -y remove linux-headers-$(uname -r) build-essential
|
67
|
+
apt-get -y autoremove
|
68
|
+
|
69
|
+
# Zero out the free space to save space in the final image:
|
70
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
71
|
+
rm -f /EMPTY
|
72
|
+
|
73
|
+
exit
|
@@ -1,37 +1,58 @@
|
|
1
|
-
#
|
1
|
+
# postinstall.sh created from Mitchell's official lucid32/64 baseboxes
|
2
2
|
|
3
|
-
#
|
3
|
+
# Apt-install various things necessary for Ruby, guest additions,
|
4
|
+
# etc., and remove optional things to trim down the machine.
|
4
5
|
apt-get -y update
|
5
|
-
|
6
|
-
apt-get -y remove apparmor
|
6
|
+
apt-get -y upgrade
|
7
7
|
apt-get -y install linux-headers-$(uname -r) build-essential
|
8
8
|
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
|
9
9
|
apt-get clean
|
10
10
|
|
11
|
-
#
|
11
|
+
# Setup sudo to allow no-password sudo for "admin"
|
12
12
|
cp /etc/sudoers /etc/sudoers.orig
|
13
|
+
sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
|
13
14
|
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
14
15
|
|
15
|
-
#
|
16
|
-
|
17
|
-
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
18
|
-
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby --no-dev-docs --dont-install-useful-gems
|
19
|
-
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/rubyenterprise.sh
|
20
|
-
rm -rf ./ruby-enterprise-1.8.7-2010.02/
|
21
|
-
rm ruby-enterprise-1.8.7-2010.02.tar.gz
|
16
|
+
# Install NFS client
|
17
|
+
apt-get -y install nfs-common
|
22
18
|
|
23
|
-
#
|
19
|
+
# Install Ruby from source in /opt so that users of Vagrant
|
20
|
+
# can install their own Rubies using packages or however.
|
21
|
+
# We must install the 1.8.x series since Puppet doesn't support
|
22
|
+
# Ruby 1.9 yet.
|
23
|
+
wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.8.7-p334.tar.gz
|
24
|
+
tar xvzf ruby-1.8.7-p334.tar.gz
|
25
|
+
cd ruby-1.8.7-p334
|
26
|
+
./configure --prefix=/opt/ruby
|
27
|
+
make
|
28
|
+
make install
|
29
|
+
cd ..
|
30
|
+
rm -rf ruby-1.8.7-p334*
|
31
|
+
|
32
|
+
# Install RubyGems 1.7.2
|
33
|
+
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
|
34
|
+
tar xzf rubygems-1.7.2.tgz
|
35
|
+
cd rubygems-1.7.2
|
36
|
+
/opt/ruby/bin/ruby setup.rb
|
37
|
+
cd ..
|
38
|
+
rm -rf rubygems-1.7.2*
|
39
|
+
|
40
|
+
# Installing chef & Puppet
|
24
41
|
/opt/ruby/bin/gem install chef --no-ri --no-rdoc
|
25
42
|
/opt/ruby/bin/gem install puppet --no-ri --no-rdoc
|
26
43
|
|
27
|
-
#
|
44
|
+
# Add /opt/ruby/bin to the global path as the last resort so
|
45
|
+
# Ruby, RubyGems, and Chef/Puppet are visible
|
46
|
+
echo 'PATH=$PATH:/opt/ruby/bin/'> /etc/profile.d/vagrantruby.sh
|
47
|
+
|
48
|
+
# Installing vagrant keys
|
28
49
|
mkdir /home/vagrant/.ssh
|
29
50
|
chmod 700 /home/vagrant/.ssh
|
30
51
|
cd /home/vagrant/.ssh
|
31
52
|
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
32
53
|
chown -R vagrant /home/vagrant/.ssh
|
33
54
|
|
34
|
-
#Installing the virtualbox guest additions
|
55
|
+
# Installing the virtualbox guest additions
|
35
56
|
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
36
57
|
cd /tmp
|
37
58
|
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
@@ -40,4 +61,13 @@ sh /mnt/VBoxLinuxAdditions.run
|
|
40
61
|
umount /mnt
|
41
62
|
|
42
63
|
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
64
|
+
|
65
|
+
# Remove items used for building, since they aren't needed anymore
|
66
|
+
apt-get -y remove linux-headers-$(uname -r) build-essential
|
67
|
+
apt-get -y autoremove
|
68
|
+
|
69
|
+
# Zero out the free space to save space in the final image:
|
70
|
+
dd if=/dev/zero of=/EMPTY bs=1M
|
71
|
+
rm -f /EMPTY
|
72
|
+
|
43
73
|
exit
|