veewee 0.0.2
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 +7 -0
- data/.rvmrc +2 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +53 -0
- data/README.md +124 -0
- data/Rakefile +92 -0
- data/bin/veewee +79 -0
- data/iso/.gitignore +2 -0
- data/lib/vagrant_init.rb +1 -0
- data/lib/veewee/command.rb +66 -0
- data/lib/veewee/config.rb +5 -0
- data/lib/veewee/export.rb +81 -0
- data/lib/veewee/scancode.rb +108 -0
- data/lib/veewee/session.rb +712 -0
- data/lib/veewee/shell.rb +54 -0
- data/lib/veewee/ssh.rb +164 -0
- data/lib/veewee/transaction.rb +112 -0
- data/lib/veewee/version.rb +3 -0
- data/lib/veewee/web.rb +48 -0
- data/lib/veewee.rb +2 -0
- data/templates/CentOS-4.8-i386/definition.rb +14 -0
- data/templates/CentOS-4.8-i386/ks.cfg +45 -0
- data/templates/CentOS-4.8-i386/postinstall.sh +47 -0
- data/templates/CentOS-5.5-i386/definition.rb +16 -0
- data/templates/CentOS-5.5-i386/ks.cfg +45 -0
- data/templates/CentOS-5.5-i386/postinstall.sh +48 -0
- data/templates/CentOS-5.5-i386-netboot/definition.rb +17 -0
- data/templates/CentOS-5.5-i386-netboot/ks.cfg +45 -0
- data/templates/CentOS-5.5-i386-netboot/postinstall.sh +48 -0
- data/templates/ubuntu-10.04.1-server-amd64/definition.rb +25 -0
- data/templates/ubuntu-10.04.1-server-amd64/postinstall.sh +33 -0
- data/templates/ubuntu-10.04.1-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-10.04.1-server-i386/definition.rb +25 -0
- data/templates/ubuntu-10.04.1-server-i386/postinstall.sh +43 -0
- data/templates/ubuntu-10.04.1-server-i386/postinstall2.sh +9 -0
- data/templates/ubuntu-10.04.1-server-i386/preseed.cfg +87 -0
- data/templates/ubuntu-10.10-server-amd64/definition.rb +25 -0
- data/templates/ubuntu-10.10-server-amd64/postinstall.sh +43 -0
- data/templates/ubuntu-10.10-server-amd64/postinstall2.sh +9 -0
- data/templates/ubuntu-10.10-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-10.10-server-i386/definition.rb +25 -0
- data/templates/ubuntu-10.10-server-i386/postinstall.sh +43 -0
- data/templates/ubuntu-10.10-server-i386/postinstall2.sh +9 -0
- data/templates/ubuntu-10.10-server-i386/preseed.cfg +87 -0
- data/trials/docu-vbox.txt +83 -0
- data/trials/f.rb +29 -0
- data/trials/t.rb +15 -0
- data/veewee.gemspec +30 -0
- metadata +219 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
#http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
|
2
|
+
#kernel source is needed for vbox additions
|
3
|
+
|
4
|
+
yum -y install gcc bzip2 make kernel-devel-`uname -r`
|
5
|
+
|
6
|
+
#yum -y update
|
7
|
+
#yum -y upgrade
|
8
|
+
|
9
|
+
yum -y install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel
|
10
|
+
|
11
|
+
yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
|
12
|
+
|
13
|
+
#Installing ruby
|
14
|
+
wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
|
15
|
+
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
16
|
+
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby
|
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
|
20
|
+
|
21
|
+
#Installing chef
|
22
|
+
/opt/ruby/bin/gem install chef
|
23
|
+
|
24
|
+
#Installing vagrant keys
|
25
|
+
mkdir /home/vagrant/.ssh
|
26
|
+
chmod 700 /home/vagrant/.ssh
|
27
|
+
cd /home/vagrant/.ssh
|
28
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
29
|
+
chown -R vagrant /home/vagrant/.ssh
|
30
|
+
|
31
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
32
|
+
#INstalling the virtualbox guest additions
|
33
|
+
cd /tmp
|
34
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
35
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
36
|
+
sh /mnt/VBoxLinuxAdditions-x86.run
|
37
|
+
umount /mnt
|
38
|
+
|
39
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
40
|
+
|
41
|
+
#poweroff -h
|
42
|
+
|
43
|
+
exit
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Veewee::Session.declare( {
|
2
|
+
:cpu_count => '1', :memory_size=> '256',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI',:disk_size => '10240' ,
|
4
|
+
:os_type_id => 'Ubuntu_64',
|
5
|
+
:iso_file => "ubuntu-10.04.1-server-amd64.iso",
|
6
|
+
:iso_src => "http://releases.ubuntu.com/10.04.1/ubuntu-10.04.1-server-amd64.iso",
|
7
|
+
:iso_md5 => "142aaaa77e7da94ae62d7ee2f39d8b3b",
|
8
|
+
:iso_download_timeout => "1000",
|
9
|
+
:boot_wait => "10",:boot_cmd_sequence => [
|
10
|
+
'<Esc><Esc><Enter>',
|
11
|
+
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
12
|
+
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
|
13
|
+
'hostname=%NAME% ',
|
14
|
+
'fb=false debconf/frontend=noninteractive ',
|
15
|
+
'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ',
|
16
|
+
'initrd=/install/initrd.gz -- <Enter>'
|
17
|
+
],
|
18
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "preseed.cfg",
|
19
|
+
:ssh_login_timeout => "10000",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "",
|
20
|
+
:ssh_host_port => "2222", :ssh_guest_port => "22",
|
21
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
22
|
+
:shutdown_cmd => "shutdown -H",
|
23
|
+
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
|
24
|
+
}
|
25
|
+
)
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#http://adrianbravo.tumblr.com/post/644860401
|
2
|
+
|
3
|
+
#Updating the box
|
4
|
+
apt-get -y update
|
5
|
+
apt-get -y install linux-headers-$(uname -r) build-essential
|
6
|
+
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
|
7
|
+
apt-get clean
|
8
|
+
|
9
|
+
#Setting up sudo
|
10
|
+
cp /etc/sudoers /etc/sudoers.orig
|
11
|
+
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
12
|
+
|
13
|
+
#Installing vagrant keys
|
14
|
+
mkdir /home/vagrant/.ssh
|
15
|
+
chmod 700 /home/vagrant/.ssh
|
16
|
+
cd /home/vagrant/.ssh
|
17
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
18
|
+
chown -R vagrant /home/vagrant/.ssh
|
19
|
+
|
20
|
+
#INstalling the virtualbox guest additions
|
21
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
22
|
+
#INstalling the virtualbox guest additions
|
23
|
+
cd /tmp
|
24
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
25
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
26
|
+
sh /mnt/VBoxLinuxAdditions-amd64.run
|
27
|
+
umount /mnt
|
28
|
+
|
29
|
+
apt-get -y remove linux-headers-$(uname -r) build-essential
|
30
|
+
apt-get -y autoremove
|
31
|
+
|
32
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
33
|
+
exit
|
@@ -0,0 +1,87 @@
|
|
1
|
+
## Options to set on the command line
|
2
|
+
d-i debian-installer/locale string en_US
|
3
|
+
d-i console-setup/ask_detect boolean false
|
4
|
+
d-i console-setup/layout string Belgium
|
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 Europe/Brussels
|
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 Belgian
|
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 acpid
|
65
|
+
|
66
|
+
# Whether to upgrade packages after debootstrap.
|
67
|
+
# Allowed values: none, safe-upgrade, full-upgrade
|
68
|
+
d-i pkgsel/upgrade select none
|
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,25 @@
|
|
1
|
+
Veewee::Session.declare( {
|
2
|
+
:cpu_count => '1', :memory_size=> '256',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI',:disk_size => '10240' ,
|
4
|
+
:os_type_id => 'Ubuntu',
|
5
|
+
:iso_file => "ubuntu-10.04.1-server-i386.iso",
|
6
|
+
:iso_src => "http://releases.ubuntu.com/10.04.1/ubuntu-10.04.1-server-i386.iso",
|
7
|
+
:iso_md5 => "01f72c846845e4e19aec8a45912e5dda",
|
8
|
+
:iso_download_timeout => "1000",
|
9
|
+
:boot_wait => "10",:boot_cmd_sequence => [
|
10
|
+
'<Esc><Esc><Enter>',
|
11
|
+
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
12
|
+
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
|
13
|
+
'hostname=%NAME% ',
|
14
|
+
'fb=false debconf/frontend=noninteractive ',
|
15
|
+
'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ',
|
16
|
+
'initrd=/install/initrd.gz -- <Enter>'
|
17
|
+
],
|
18
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "preseed.cfg",
|
19
|
+
:ssh_login_timeout => "10000",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "",
|
20
|
+
:ssh_host_port => "2222", :ssh_guest_port => "22",
|
21
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
22
|
+
:shutdown_cmd => "shutdown -H",
|
23
|
+
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
|
24
|
+
}
|
25
|
+
)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#http://adrianbravo.tumblr.com/post/644860401
|
2
|
+
|
3
|
+
#Updating the box
|
4
|
+
apt-get -y update
|
5
|
+
#apt-get -y upgrade
|
6
|
+
apt-get -y remove apparmor
|
7
|
+
apt-get -y install linux-headers-$(uname -r) build-essential
|
8
|
+
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
|
9
|
+
apt-get clean
|
10
|
+
|
11
|
+
#Setting up sudo
|
12
|
+
cp /etc/sudoers /etc/sudoers.orig
|
13
|
+
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
14
|
+
|
15
|
+
#Installing ruby
|
16
|
+
wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
|
17
|
+
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
18
|
+
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby
|
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
|
22
|
+
|
23
|
+
#Installing chef
|
24
|
+
/opt/ruby/bin/gem install chef
|
25
|
+
|
26
|
+
#Installing vagrant keys
|
27
|
+
mkdir /home/vagrant/.ssh
|
28
|
+
chmod 700 /home/vagrant/.ssh
|
29
|
+
cd /home/vagrant/.ssh
|
30
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
31
|
+
chown -R vagrant /home/vagrant/.ssh
|
32
|
+
|
33
|
+
#INstalling the virtualbox guest additions
|
34
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
35
|
+
#INstalling the virtualbox guest additions
|
36
|
+
cd /tmp
|
37
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
38
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
39
|
+
sh /mnt/VBoxLinuxAdditions-x86.run
|
40
|
+
umount /mnt
|
41
|
+
|
42
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
43
|
+
exit
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#as root
|
2
|
+
apt-get -y install curl
|
3
|
+
apt-get -y install git
|
4
|
+
|
5
|
+
#as non root
|
6
|
+
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
|
7
|
+
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> $HOME/.bash_profile
|
8
|
+
source "$HOME/.rvm/scripts/rvm"
|
9
|
+
rvm install ree
|
@@ -0,0 +1,87 @@
|
|
1
|
+
## Options to set on the command line
|
2
|
+
d-i debian-installer/locale string en_US
|
3
|
+
d-i console-setup/ask_detect boolean false
|
4
|
+
d-i console-setup/layout string Belgium
|
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 Europe/Brussels
|
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 Belgian
|
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 none
|
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,25 @@
|
|
1
|
+
Veewee::Session.declare( {
|
2
|
+
:cpu_count => '1', :memory_size=> '256',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI',
|
4
|
+
:os_type_id => 'Ubuntu_64',
|
5
|
+
:iso_file => "ubuntu-10.10-server-amd64.iso",
|
6
|
+
:iso_src => "http://releases.ubuntu.com/maverick/ubuntu-10.10-server-amd64.iso",
|
7
|
+
:iso_md5 => "ab66a1d59a8d78e9ea8ef9b021d6574a",
|
8
|
+
:iso_download_timeout => "1000",
|
9
|
+
:boot_wait => "10",:boot_cmd_sequence => [
|
10
|
+
'<Esc><Esc><Enter>',
|
11
|
+
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
12
|
+
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
|
13
|
+
'hostname=%NAME% ',
|
14
|
+
'fb=false debconf/frontend=noninteractive ',
|
15
|
+
'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ',
|
16
|
+
'initrd=/install/initrd.gz -- <Enter>'
|
17
|
+
],
|
18
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "preseed.cfg",
|
19
|
+
:ssh_login_timeout => "10000",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "",
|
20
|
+
:ssh_host_port => "2222", :ssh_guest_port => "22",
|
21
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
22
|
+
:shutdown_cmd => "shutdown -P now",
|
23
|
+
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
|
24
|
+
}
|
25
|
+
)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#http://adrianbravo.tumblr.com/post/644860401
|
2
|
+
|
3
|
+
#Updating the box
|
4
|
+
apt-get -y update
|
5
|
+
#apt-get -y upgrade
|
6
|
+
apt-get -y remove apparmor
|
7
|
+
apt-get -y install linux-headers-$(uname -r) build-essential
|
8
|
+
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
|
9
|
+
apt-get clean
|
10
|
+
|
11
|
+
#Setting up sudo
|
12
|
+
cp /etc/sudoers /etc/sudoers.orig
|
13
|
+
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
14
|
+
|
15
|
+
#Installing ruby
|
16
|
+
wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
|
17
|
+
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
18
|
+
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby
|
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
|
22
|
+
|
23
|
+
#Installing chef
|
24
|
+
/opt/ruby/bin/gem install chef
|
25
|
+
|
26
|
+
#Installing vagrant keys
|
27
|
+
mkdir /home/vagrant/.ssh
|
28
|
+
chmod 700 /home/vagrant/.ssh
|
29
|
+
cd /home/vagrant/.ssh
|
30
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
31
|
+
chown -R vagrant /home/vagrant/.ssh
|
32
|
+
|
33
|
+
#INstalling the virtualbox guest additions
|
34
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
35
|
+
#INstalling the virtualbox guest additions
|
36
|
+
cd /tmp
|
37
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
38
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
39
|
+
sh /mnt/VBoxLinuxAdditions-amd64.run
|
40
|
+
umount /mnt
|
41
|
+
|
42
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
43
|
+
exit
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#as root
|
2
|
+
apt-get -y install curl
|
3
|
+
apt-get -y install git
|
4
|
+
|
5
|
+
#as non root
|
6
|
+
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
|
7
|
+
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> $HOME/.bash_profile
|
8
|
+
source "$HOME/.rvm/scripts/rvm"
|
9
|
+
rvm install ree
|
@@ -0,0 +1,87 @@
|
|
1
|
+
## Options to set on the command line
|
2
|
+
d-i debian-installer/locale string en_US
|
3
|
+
d-i console-setup/ask_detect boolean false
|
4
|
+
d-i console-setup/layout string Belgium
|
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 Europe/Brussels
|
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 Belgian
|
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 none
|
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,25 @@
|
|
1
|
+
Veewee::Session.declare( {
|
2
|
+
:cpu_count => '1', :memory_size=> '256',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI',:disk_size => '10240' ,
|
4
|
+
:os_type_id => 'Ubuntu',
|
5
|
+
:iso_file => "ubuntu-10.10-server-i386.iso",
|
6
|
+
:iso_src => "http://releases.ubuntu.com/maverick/ubuntu-10.10-server-i386.iso",
|
7
|
+
:iso_md5 => "ce1cee108de737d7492e37069eed538e",
|
8
|
+
:iso_download_timeout => "1000",
|
9
|
+
:boot_wait => "10",:boot_cmd_sequence => [
|
10
|
+
'<Esc><Esc><Enter>',
|
11
|
+
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
12
|
+
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
|
13
|
+
'hostname=%NAME% ',
|
14
|
+
'fb=false debconf/frontend=noninteractive ',
|
15
|
+
'console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us ',
|
16
|
+
'initrd=/install/initrd.gz -- <Enter>'
|
17
|
+
],
|
18
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "preseed.cfg",
|
19
|
+
:ssh_login_timeout => "10000",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "",
|
20
|
+
:ssh_host_port => "2222", :ssh_guest_port => "22",
|
21
|
+
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
22
|
+
:shutdown_cmd => "shutdown -P now",
|
23
|
+
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
|
24
|
+
}
|
25
|
+
)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#http://adrianbravo.tumblr.com/post/644860401
|
2
|
+
|
3
|
+
#Updating the box
|
4
|
+
apt-get -y update
|
5
|
+
#apt-get -y upgrade
|
6
|
+
apt-get -y remove apparmor
|
7
|
+
apt-get -y install linux-headers-$(uname -r) build-essential
|
8
|
+
apt-get -y install zlib1g-dev libssl-dev libreadline5-dev
|
9
|
+
apt-get clean
|
10
|
+
|
11
|
+
#Setting up sudo
|
12
|
+
cp /etc/sudoers /etc/sudoers.orig
|
13
|
+
sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
|
14
|
+
|
15
|
+
#Installing ruby
|
16
|
+
wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
|
17
|
+
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz
|
18
|
+
./ruby-enterprise-1.8.7-2010.02/installer -a /opt/ruby
|
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
|
22
|
+
|
23
|
+
#Installing chef
|
24
|
+
/opt/ruby/bin/gem install chef
|
25
|
+
|
26
|
+
#Installing vagrant keys
|
27
|
+
mkdir /home/vagrant/.ssh
|
28
|
+
chmod 700 /home/vagrant/.ssh
|
29
|
+
cd /home/vagrant/.ssh
|
30
|
+
wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
31
|
+
chown -R vagrant /home/vagrant/.ssh
|
32
|
+
|
33
|
+
#INstalling the virtualbox guest additions
|
34
|
+
VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
|
35
|
+
#INstalling the virtualbox guest additions
|
36
|
+
cd /tmp
|
37
|
+
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
|
38
|
+
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
|
39
|
+
sh /mnt/VBoxLinuxAdditions.run
|
40
|
+
umount /mnt
|
41
|
+
|
42
|
+
rm VBoxGuestAdditions_$VBOX_VERSION.iso
|
43
|
+
exit
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#as root
|
2
|
+
apt-get -y install curl
|
3
|
+
apt-get -y install git
|
4
|
+
|
5
|
+
#as non root
|
6
|
+
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
|
7
|
+
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> $HOME/.bash_profile
|
8
|
+
source "$HOME/.rvm/scripts/rvm"
|
9
|
+
rvm install ree
|