HeSYINUvSBZfxqA-veewee 0.2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +15 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +69 -0
- data/HeSYINUvSBZfxqA-veewee.gemspec +33 -0
- data/README.md +198 -0
- data/Rakefile +92 -0
- data/bin/veewee +79 -0
- data/lib/java/README.txt +5 -0
- data/lib/java/dir2floppy.jar +0 -0
- data/lib/java/dir2floppy.java +137 -0
- data/lib/vagrant_init.rb +6 -0
- data/lib/veewee/command.rb +82 -0
- data/lib/veewee/config.rb +5 -0
- data/lib/veewee/export.rb +81 -0
- data/lib/veewee/scancode.rb +151 -0
- data/lib/veewee/session.rb +783 -0
- data/lib/veewee/shell.rb +54 -0
- data/lib/veewee/ssh.rb +193 -0
- data/lib/veewee/transaction.rb +122 -0
- data/lib/veewee/utils.rb +26 -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 +55 -0
- data/templates/CentOS-5.6-i386/definition.rb +17 -0
- data/templates/CentOS-5.6-i386/ks.cfg +45 -0
- data/templates/CentOS-5.6-i386/postinstall.sh +50 -0
- data/templates/CentOS-5.6-i386-netboot/definition.rb +16 -0
- data/templates/CentOS-5.6-i386-netboot/ks.cfg +45 -0
- data/templates/CentOS-5.6-i386-netboot/postinstall.sh +52 -0
- data/templates/CentOS-5.6-x86_64-netboot/definition.rb +16 -0
- data/templates/CentOS-5.6-x86_64-netboot/ks.cfg +45 -0
- data/templates/CentOS-5.6-x86_64-netboot/postinstall.sh +60 -0
- data/templates/CentOS-6.0-i386/definition.rb +17 -0
- data/templates/CentOS-6.0-i386/ks.cfg +47 -0
- data/templates/CentOS-6.0-i386/postinstall.sh +48 -0
- data/templates/CentOS-6.0-i386-netboot/definition.rb +16 -0
- data/templates/CentOS-6.0-i386-netboot/ks.cfg +52 -0
- data/templates/CentOS-6.0-i386-netboot/postinstall.sh +30 -0
- data/templates/CentOS-6.0-x86_64/definition.rb +17 -0
- data/templates/CentOS-6.0-x86_64/ks.cfg +47 -0
- data/templates/CentOS-6.0-x86_64/postinstall.sh +48 -0
- data/templates/CentOS-6.0-x86_64-netboot/definition.rb +16 -0
- data/templates/CentOS-6.0-x86_64-netboot/ks.cfg +52 -0
- data/templates/CentOS-6.0-x86_64-netboot/postinstall.sh +30 -0
- data/templates/Debian-5.0.8-amd64-netboot/definition.rb +39 -0
- data/templates/Debian-5.0.8-amd64-netboot/postinstall.sh +60 -0
- data/templates/Debian-5.0.8-amd64-netboot/preseed.cfg +312 -0
- data/templates/Debian-5.0.8-i386-netboot/definition.rb +39 -0
- data/templates/Debian-5.0.8-i386-netboot/postinstall.sh +60 -0
- data/templates/Debian-5.0.8-i386-netboot/preseed.cfg +312 -0
- data/templates/Debian-6.0.2-amd64-netboot/definition.rb +39 -0
- data/templates/Debian-6.0.2-amd64-netboot/postinstall.sh +71 -0
- data/templates/Debian-6.0.2-amd64-netboot/preseed.cfg +312 -0
- data/templates/Debian-6.0.2-i386-netboot/definition.rb +41 -0
- data/templates/Debian-6.0.2-i386-netboot/postinstall.sh +83 -0
- data/templates/Debian-6.0.2-i386-netboot/preseed.cfg +312 -0
- data/templates/Fedora-14-amd64/definition.rb +16 -0
- data/templates/Fedora-14-amd64/ks.cfg +41 -0
- data/templates/Fedora-14-amd64/postinstall.sh +54 -0
- data/templates/Fedora-14-amd64-netboot/definition.rb +16 -0
- data/templates/Fedora-14-amd64-netboot/ks.cfg +40 -0
- data/templates/Fedora-14-amd64-netboot/postinstall.sh +54 -0
- data/templates/Fedora-14-i386/definition.rb +16 -0
- data/templates/Fedora-14-i386/ks.cfg +41 -0
- data/templates/Fedora-14-i386/postinstall.sh +54 -0
- data/templates/Fedora-14-i386-netboot/definition.rb +16 -0
- data/templates/Fedora-14-i386-netboot/ks.cfg +40 -0
- data/templates/Fedora-14-i386-netboot/postinstall.sh +54 -0
- data/templates/Fedora-15-i386/definition.rb +17 -0
- data/templates/Fedora-15-i386/ks.cfg +64 -0
- data/templates/Fedora-15-i386/postinstall.sh +33 -0
- data/templates/Fedora-15-i386-netboot/definition.rb +17 -0
- data/templates/Fedora-15-i386-netboot/ks.cfg +82 -0
- data/templates/Fedora-15-i386-netboot/postinstall.sh +18 -0
- data/templates/Sysrescuecd-2.0.0-experimental/autorun0 +3 -0
- data/templates/Sysrescuecd-2.0.0-experimental/definition.rb +20 -0
- data/templates/archlinux-i386/aif.cfg +33 -0
- data/templates/archlinux-i386/definition.rb +29 -0
- data/templates/archlinux-i386/postinstall.sh +95 -0
- data/templates/archlinux-x86_64/aif.cfg +33 -0
- data/templates/archlinux-x86_64/definition.rb +29 -0
- data/templates/archlinux-x86_64/postinstall.sh +95 -0
- data/templates/freebsd-8.2-experimental/definition.rb +19 -0
- data/templates/freebsd-8.2-experimental/postinstall.sh +191 -0
- data/templates/freebsd-8.2-pcbsd-i386/definition.rb +31 -0
- data/templates/freebsd-8.2-pcbsd-i386/pcinstall.fbg.cfg +57 -0
- data/templates/freebsd-8.2-pcbsd-i386/postinstall.sh +93 -0
- data/templates/freebsd-8.2-pcbsd-i386-netboot/definition.rb +34 -0
- data/templates/freebsd-8.2-pcbsd-i386-netboot/pcinstall.fbg.cfg +58 -0
- data/templates/freebsd-8.2-pcbsd-i386-netboot/postinstall.sh +93 -0
- data/templates/gentoo-latest-i386-experimental/definition.rb +29 -0
- data/templates/gentoo-latest-i386-experimental/postinstall.sh +184 -0
- data/templates/openindiana-148-ai-x86/auto_install/ai.dtd +58 -0
- data/templates/openindiana-148-ai-x86/auto_install/ai_manifest.xml +241 -0
- data/templates/openindiana-148-ai-x86/auto_install/configuration.dtd +44 -0
- data/templates/openindiana-148-ai-x86/auto_install/default.xml +121 -0
- data/templates/openindiana-148-ai-x86/auto_install/default.xml.orig +124 -0
- data/templates/openindiana-148-ai-x86/auto_install/sc_profiles/static_network.xml +105 -0
- data/templates/openindiana-148-ai-x86/auto_install/software.dtd +105 -0
- data/templates/openindiana-148-ai-x86/auto_install/target.dtd +196 -0
- data/templates/openindiana-148-ai-x86/default.xml +121 -0
- data/templates/openindiana-148-ai-x86/definition.rb +59 -0
- data/templates/openindiana-148-ai-x86/postinstall.sh +103 -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 +90 -0
- data/templates/solaris-11-express-i386/auto_install/ai.dtd +58 -0
- data/templates/solaris-11-express-i386/auto_install/ai_manifest.xml +241 -0
- data/templates/solaris-11-express-i386/auto_install/configuration.dtd +44 -0
- data/templates/solaris-11-express-i386/auto_install/default.xml +124 -0
- data/templates/solaris-11-express-i386/auto_install/default.xml.orig +124 -0
- data/templates/solaris-11-express-i386/auto_install/sc_profiles/static_network.xml +105 -0
- data/templates/solaris-11-express-i386/auto_install/software.dtd +105 -0
- data/templates/solaris-11-express-i386/auto_install/target.dtd +196 -0
- data/templates/solaris-11-express-i386/default.xml +121 -0
- data/templates/solaris-11-express-i386/definition.rb +65 -0
- data/templates/solaris-11-express-i386/postinstall.sh +98 -0
- data/templates/ubuntu-10.04.2-amd64-netboot/definition.rb +23 -0
- data/templates/ubuntu-10.04.2-amd64-netboot/postinstall.sh +90 -0
- data/templates/ubuntu-10.04.2-amd64-netboot/preseed.cfg +89 -0
- data/templates/ubuntu-10.04.2-server-amd64/definition.rb +57 -0
- data/templates/ubuntu-10.04.2-server-amd64/postinstall.sh +90 -0
- data/templates/ubuntu-10.04.2-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-10.04.2-server-amd64-alt/definition.rb +57 -0
- data/templates/ubuntu-10.04.2-server-amd64-alt/postinstall.sh +249 -0
- data/templates/ubuntu-10.04.2-server-amd64-alt/preseed.cfg +124 -0
- data/templates/ubuntu-10.04.2-server-i386/definition.rb +24 -0
- data/templates/ubuntu-10.04.2-server-i386/postinstall.sh +91 -0
- data/templates/ubuntu-10.04.2-server-i386/preseed.cfg +87 -0
- data/templates/ubuntu-10.04.2-server-i386-netboot/definition.rb +23 -0
- data/templates/ubuntu-10.04.2-server-i386-netboot/postinstall.sh +90 -0
- data/templates/ubuntu-10.04.2-server-i386-netboot/preseed.cfg +89 -0
- data/templates/ubuntu-10.10-server-amd64/definition.rb +24 -0
- data/templates/ubuntu-10.10-server-amd64/postinstall.sh +90 -0
- data/templates/ubuntu-10.10-server-amd64/preseed.cfg +87 -0
- data/templates/ubuntu-10.10-server-amd64-netboot/definition.rb +24 -0
- data/templates/ubuntu-10.10-server-amd64-netboot/postinstall.sh +90 -0
- data/templates/ubuntu-10.10-server-amd64-netboot/preseed.cfg +89 -0
- data/templates/ubuntu-10.10-server-i386/definition.rb +24 -0
- data/templates/ubuntu-10.10-server-i386/postinstall.sh +90 -0
- data/templates/ubuntu-10.10-server-i386/preseed.cfg +87 -0
- data/templates/ubuntu-10.10-server-i386-netboot/definition.rb +24 -0
- data/templates/ubuntu-10.10-server-i386-netboot/postinstall.sh +90 -0
- data/templates/ubuntu-10.10-server-i386-netboot/preseed.cfg +89 -0
- data/templates/ubuntu-11.04-server-amd64/definition.rb +24 -0
- data/templates/ubuntu-11.04-server-amd64/postinstall.sh +90 -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 +90 -0
- data/templates/ubuntu-11.04-server-i386/preseed.cfg +87 -0
- data/templates/ubuntu-8.04.4-server-amd64/definition.rb +25 -0
- data/templates/ubuntu-8.04.4-server-amd64/postinstall.sh +68 -0
- data/templates/ubuntu-8.04.4-server-amd64/preseed.cfg +88 -0
- data/templates/ubuntu-8.04.4-server-i386/definition.rb +25 -0
- data/templates/ubuntu-8.04.4-server-i386/postinstall.sh +47 -0
- data/templates/ubuntu-8.04.4-server-i386/preseed.cfg +87 -0
- data/templates/windows-2008R2-amd64/Autounattend.xml +132 -0
- data/templates/windows-2008R2-amd64/README.md +68 -0
- data/templates/windows-2008R2-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-2008R2-amd64/definition.rb +16 -0
- data/templates/windows-2008R2-amd64/install-cygwin-sshd.bat +38 -0
- data/templates/windows-2008R2-amd64/install-winrm.bat +6 -0
- data/templates/windows-2008R2-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R2-amd64/postinstall.sh +122 -0
- data/templates/windows-2008R2-amd64/winrm.rb +8 -0
- data/trials/docu-vbox.txt +83 -0
- data/trials/f.rb +29 -0
- data/trials/t.rb +15 -0
- data/validation/features/steps/ssh_steps.rb +170 -0
- data/validation/support/env.rb +1 -0
- data/validation/vagrant-private.key +27 -0
- data/validation/vagrant.feature +52 -0
- data/validation/vagrant.pub +1 -0
- data/veewee.gemspec +33 -0
- data/vendor/cache/Platform-0.4.0.gem +0 -0
- data/vendor/cache/archive-tar-minitar-0.5.2.gem +0 -0
- data/vendor/cache/builder-3.0.0.gem +0 -0
- data/vendor/cache/cucumber-1.0.2.gem +0 -0
- data/vendor/cache/diff-lcs-1.1.2.gem +0 -0
- data/vendor/cache/erubis-2.7.0.gem +0 -0
- data/vendor/cache/ffi-1.0.9.gem +0 -0
- data/vendor/cache/gherkin-2.4.6.gem +0 -0
- data/vendor/cache/highline-1.6.2.gem +0 -0
- data/vendor/cache/i18n-0.5.0.gem +0 -0
- data/vendor/cache/json-1.5.3.gem +0 -0
- data/vendor/cache/net-scp-1.0.4.gem +0 -0
- data/vendor/cache/net-ssh-2.1.4.gem +0 -0
- data/vendor/cache/open4-1.1.0.gem +0 -0
- data/vendor/cache/popen4-0.1.2.gem +0 -0
- data/vendor/cache/progressbar-0.9.1.gem +0 -0
- data/vendor/cache/rspec-2.5.0.gem +0 -0
- data/vendor/cache/rspec-core-2.5.2.gem +0 -0
- data/vendor/cache/rspec-expectations-2.5.0.gem +0 -0
- data/vendor/cache/rspec-mocks-2.5.0.gem +0 -0
- data/vendor/cache/term-ansicolor-1.0.6.gem +0 -0
- data/vendor/cache/thor-0.14.6.gem +0 -0
- data/vendor/cache/vagrant-0.8.2.gem +0 -0
- data/vendor/cache/virtualbox-0.9.1.gem +0 -0
- metadata +417 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
Veewee::Session.declare({
|
2
|
+
:cpu_count => '1', :memory_size=> '256',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
|
4
|
+
:os_type_id => 'FreeBSD_64',
|
5
|
+
:iso_file => "mfsbsd-8.2-amd64.iso",
|
6
|
+
:iso_src => "http://mfsbsd.vx.sk/iso/mfsbsd-8.2-amd64.iso",
|
7
|
+
:iso_md5 => "3296cf0e5844",
|
8
|
+
:iso_download_timeout => "1000",
|
9
|
+
:boot_wait => "10", :boot_cmd_sequence => [
|
10
|
+
'<Enter>'
|
11
|
+
],
|
12
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "",
|
13
|
+
:ssh_login_timeout => "10000", :ssh_user => "root", :ssh_password => "mfsroot", :ssh_key => "",
|
14
|
+
:ssh_host_port => "7222", :ssh_guest_port => "22",
|
15
|
+
:sudo_cmd => "sh '%f'",
|
16
|
+
:shutdown_cmd => "shutdown -H",
|
17
|
+
:postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000"
|
18
|
+
})
|
19
|
+
#'setkmap=us dodhcp=eth0 dhcphostname=%NAME% ar_source=http://%IP%:%PORT%/ autoruns=0 rootpass=vagrant',
|
@@ -0,0 +1,191 @@
|
|
1
|
+
date > /etc/vagrant_box_build_time
|
2
|
+
|
3
|
+
#http://www.freebsd.org/doc/en_US.ISO8859-1/articles/remote-install/installation.html
|
4
|
+
dd if=/dev/zero of=/dev/ad4 count=2
|
5
|
+
#bsdlabel -w -B /dev/ad4
|
6
|
+
|
7
|
+
sysctl kern.geom.debugflags=16
|
8
|
+
|
9
|
+
#http://forum.nginx.org/read.php?23,146311,146451
|
10
|
+
# Init the disk with an MBR
|
11
|
+
gpart create -s mbr ad4
|
12
|
+
# Create a BSD container
|
13
|
+
gpart add -t freebsd ad4
|
14
|
+
# Init with a BSD scheme
|
15
|
+
gpart create -s bsd ad4s1
|
16
|
+
|
17
|
+
# 1GB for /
|
18
|
+
gpart add -t freebsd-ufs -s 1G ad4s1
|
19
|
+
|
20
|
+
gpart add -t freebsd-swap -s 2G ad4s1
|
21
|
+
# 2GB for swap
|
22
|
+
gpart add -t freebsd-ufs -s 2G ad4s1
|
23
|
+
# 2GB for /var
|
24
|
+
gpart add -t freebsd-ufs ad4s1
|
25
|
+
# all rest for /usr
|
26
|
+
|
27
|
+
#install bootcode
|
28
|
+
gpart bootcode -p /boot/boot -i 1 ad4s1
|
29
|
+
gpart set -a active -i ad4
|
30
|
+
|
31
|
+
cat <<EOF >/install.cfg
|
32
|
+
# This is the installation configuration file for our rackmounted FreeBSD
|
33
|
+
# cluster machines
|
34
|
+
|
35
|
+
# Turn on extra debugging.
|
36
|
+
debug=yes
|
37
|
+
|
38
|
+
#releaseName 8.0-RELEASE
|
39
|
+
|
40
|
+
|
41
|
+
################################
|
42
|
+
# My host specific data
|
43
|
+
#hostname=dragonfly
|
44
|
+
#domainname=cs.duke.edu
|
45
|
+
#nameserver=152.3.145.240
|
46
|
+
#defaultrouter=152.3.145.240
|
47
|
+
#ipaddr=152.3.145.64
|
48
|
+
#netmask=255.255.255.0
|
49
|
+
################################
|
50
|
+
tryDHCP=NO
|
51
|
+
|
52
|
+
################################
|
53
|
+
# Which installation device to use
|
54
|
+
# ftp://ftp.smr.ru/pub/0/FreeBSD/current/src/release/sysinstall/sysinstall.h
|
55
|
+
_ftpPath=ftp://ftp2.freebsd.org/pub/FreeBSD/
|
56
|
+
#_httpPath=ftp://ftp2.freebsd.org/pub/FreeBSD/
|
57
|
+
#httpProxy=192.168.2.10:800
|
58
|
+
netDev=em0
|
59
|
+
mediaSetFTP
|
60
|
+
#mediaSetHTTP
|
61
|
+
|
62
|
+
################################
|
63
|
+
|
64
|
+
################################
|
65
|
+
# Select which distributions we want.
|
66
|
+
#dists= bin doc games manpages catpages proflibs dict info des compat1x compat20 compat21 X331bin X331cfg X331doc X331html X331lib X331lkit X331man X331prog X331ps X331set X331VG16 X331nest X331vfb X331fnts X331f100 X331fcyr X331fscl X331fnon sinclude
|
67
|
+
#distSetCustom
|
68
|
+
distSetMinimum
|
69
|
+
################################
|
70
|
+
|
71
|
+
################################
|
72
|
+
# Now set the parameters for the partition editor on ad4.
|
73
|
+
disk=ad4
|
74
|
+
partition=all
|
75
|
+
#http://www.mail-archive.com/freebsd-questions@freebsd.org/msg212036.html
|
76
|
+
bootManager=standard
|
77
|
+
diskPartitionEditor
|
78
|
+
#diskPartitionWrite
|
79
|
+
|
80
|
+
################################
|
81
|
+
|
82
|
+
################################
|
83
|
+
# All sizes are expressed in 512 byte blocks!
|
84
|
+
#
|
85
|
+
# A 960MB root partition, followed by a 0.5G swap partition, followed by
|
86
|
+
# a 1G /var, and a /usr using all the remaining space on the disk
|
87
|
+
#
|
88
|
+
ad4s1-1=ufs 1966080 /mnt
|
89
|
+
ad4s1-2=swap 1048576 none
|
90
|
+
ad4s1-3=ufs 2097152 /mnt/var
|
91
|
+
ad4s1-4=ufs 0 /mnt/usr
|
92
|
+
# Let's do it!
|
93
|
+
|
94
|
+
|
95
|
+
diskLabelEditor
|
96
|
+
diskLabelCommit
|
97
|
+
|
98
|
+
#http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2010-11/msg00420.html
|
99
|
+
installRoot=/mnt
|
100
|
+
#
|
101
|
+
|
102
|
+
# OK, everything is set. Do it!
|
103
|
+
installCommit
|
104
|
+
|
105
|
+
|
106
|
+
# Install some packages at the end.
|
107
|
+
# package=LPRng-3.2.3
|
108
|
+
# packageAdd
|
109
|
+
|
110
|
+
|
111
|
+
# Install some packages at the end.
|
112
|
+
|
113
|
+
#
|
114
|
+
# this last package is special. It is used to configure the machine.
|
115
|
+
# it installs several files (like /root/.rhosts) an its installation
|
116
|
+
# script tweaks several options in /etc/rc.conf
|
117
|
+
#
|
118
|
+
#package=ari-0.0
|
119
|
+
#packageAdd
|
120
|
+
|
121
|
+
EOF
|
122
|
+
|
123
|
+
sysinstall configFile=/install.cfg loadConfig
|
124
|
+
|
125
|
+
|
126
|
+
#http://www.daemonforums.org/showthread.php?t=4389
|
127
|
+
|
128
|
+
cd /mnt/boot
|
129
|
+
cp -Rp GENERIC/* kernel/
|
130
|
+
|
131
|
+
#For some reason this is the disk layout the sysinstall creates
|
132
|
+
|
133
|
+
cat <<EOF > /mnt/etc/fstab
|
134
|
+
/dev/ad4s1b none swap sw 0 0
|
135
|
+
/dev/ad4s1d / ufs rw 0 0
|
136
|
+
/dev/ad4s1f /usr ufs rw 0 0
|
137
|
+
/dev/ad4s1e /var ufs rw 0 0
|
138
|
+
EOF
|
139
|
+
|
140
|
+
|
141
|
+
# boot0cfg -B ad4
|
142
|
+
#make the menu appear
|
143
|
+
|
144
|
+
# Booting mentions an error
|
145
|
+
# Invalid partition
|
146
|
+
# FAILS WITH: 0:ad(0,a)/boot/kernel/kernel
|
147
|
+
# WORKS WITH: 0:ad(4,d)/boot/loader
|
148
|
+
|
149
|
+
#http://www.mail-archive.com/freebsd-questions@freebsd.org/msg72530.html
|
150
|
+
cat <<EOF > /mnt/boot/loader.conf
|
151
|
+
#geom_label_load="YES"
|
152
|
+
#root_disk_unit="4"
|
153
|
+
#currdev="disk4s1d"
|
154
|
+
#rootdev="disk4s1d"
|
155
|
+
#vfs.root.mountfrom="ufs:/dev/ad4s1d"
|
156
|
+
EOF
|
157
|
+
|
158
|
+
#activate dhcp
|
159
|
+
cat <<EOF > /mnt/etc/rc.conf
|
160
|
+
ifconfig_DEFAULT="DHCP"
|
161
|
+
EOF
|
162
|
+
|
163
|
+
|
164
|
+
#The vi edit program needs a /var/tmp/vi.recover file.
|
165
|
+
|
166
|
+
mkdir -p /mnt/usr/local/etc/rc.d/
|
167
|
+
cd /mnt/usr/local/etc/rc.d/
|
168
|
+
cat <<EOF > mkvirecover
|
169
|
+
#!/bin/sh
|
170
|
+
# PROVIDE: mkvirecover
|
171
|
+
# REQUIRE: mountcritremote
|
172
|
+
# BEFORE: DAEMON virecover
|
173
|
+
|
174
|
+
|
175
|
+
. /etc/rc.subr
|
176
|
+
|
177
|
+
name="mkvirecover"
|
178
|
+
stop_cmd=":"
|
179
|
+
start_cmd="mkvirecover_start"
|
180
|
+
|
181
|
+
mkvirecover_start()
|
182
|
+
{
|
183
|
+
[ -d /var/tmp/vi.recover ] || mkdir -m 1777 /var/tmp/vi.recover
|
184
|
+
echo '.'
|
185
|
+
}
|
186
|
+
|
187
|
+
load_rc_config "\$name"
|
188
|
+
run_rc_command "\$1"
|
189
|
+
EOF
|
190
|
+
|
191
|
+
chmod 555 /mnt/usr/local/etc/rc.d/mkvirecover
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Many thanks to @draco2002
|
2
|
+
# http://dracosplace.com/veewee_and_freebsd
|
3
|
+
|
4
|
+
# :iso_src => "ftp://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-bootonly.iso",
|
5
|
+
# :iso_file => "PCBSD8.2-x86-bootonly.iso",
|
6
|
+
|
7
|
+
Veewee::Session.declare({
|
8
|
+
:cpu_count => '1', :memory_size=> '768',
|
9
|
+
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
|
10
|
+
:os_type_id => 'FreeBSD',
|
11
|
+
:iso_file => "PCBSD8.2-x86-DVD.iso",
|
12
|
+
:iso_src => "ftp://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-DVD.iso",
|
13
|
+
:iso_md5 => "6433a8abf6073b177750d48398bed341",
|
14
|
+
:iso_download_timeout => "1000",
|
15
|
+
:boot_wait => "70", :boot_cmd_sequence => [
|
16
|
+
'<KillX>',
|
17
|
+
'<Enter>',
|
18
|
+
'dhclient em0<Enter>',
|
19
|
+
'sleep 15;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
|
20
|
+
'echo \'echo sshd_enable=\"YES\" >> $FSMNT/etc/rc.conf\' > /root/activate-ssh.sh ; cat /root/activate-ssh.sh<Enter>',
|
21
|
+
'chmod +x /root/activate-ssh.sh<Enter>',
|
22
|
+
'echo "Hope i got the file";/usr/PCBSD/pc-sysinstall/pc-sysinstall -c /root/pcinstall.fbg.cfg<Enter>',
|
23
|
+
'reboot<Enter>'
|
24
|
+
],
|
25
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "pcinstall.fbg.cfg",
|
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 => "cat '%f'|su -",
|
29
|
+
:shutdown_cmd => "shutdown -p now",
|
30
|
+
:postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000"
|
31
|
+
})
|
@@ -0,0 +1,57 @@
|
|
1
|
+
installInteractive=no
|
2
|
+
installMode=fresh
|
3
|
+
installType=FreeBSD
|
4
|
+
packageType=tar
|
5
|
+
hostname=freebsd
|
6
|
+
#installMedium=dvd
|
7
|
+
installMedium=dvd
|
8
|
+
netSaveDev=AUTO-DHCP
|
9
|
+
|
10
|
+
# Timezone
|
11
|
+
timeZone=America/New_York
|
12
|
+
enableNTP=yes
|
13
|
+
|
14
|
+
# Keyboard Layout Options
|
15
|
+
localizeKeyModel=pc104
|
16
|
+
localizeKeyLayout=us U.S.
|
17
|
+
|
18
|
+
# Disk Setup for ada0
|
19
|
+
disk0=ada0
|
20
|
+
partition=ALL
|
21
|
+
bootManager=none
|
22
|
+
partscheme=MBR
|
23
|
+
commitDiskPart
|
24
|
+
|
25
|
+
# Setup the disk label
|
26
|
+
# All sizes are expressed in MB
|
27
|
+
disk0-part=UFS+S 1024 /
|
28
|
+
disk0-part=SWAP 1534 none
|
29
|
+
disk0-part=UFS+S 2048 /var
|
30
|
+
disk0-part=UFS+S 5529 /usr
|
31
|
+
commitDiskLabel
|
32
|
+
|
33
|
+
# List our components to install
|
34
|
+
# Src is only needed for the virtualbox extensions
|
35
|
+
# installComponents=ports,src
|
36
|
+
installComponents=ports
|
37
|
+
|
38
|
+
# Set the root pass
|
39
|
+
rootPass=vagrant
|
40
|
+
|
41
|
+
userName=vagrant
|
42
|
+
userComment=vagrant user
|
43
|
+
userPass=vagrant
|
44
|
+
userShell=/bin/csh
|
45
|
+
userHome=/home/vagrant
|
46
|
+
# Wheel group makes user sudo able
|
47
|
+
userGroups=wheel,operator
|
48
|
+
commitUser
|
49
|
+
|
50
|
+
runExtCommand=/root/activate-ssh.sh
|
51
|
+
|
52
|
+
# We temporary disable password checks , we promise to make up for it later
|
53
|
+
runCommand=sed -i -e 's@auth.*include.*system@@' /etc/pam.d/su
|
54
|
+
|
55
|
+
# making the clock run correctly
|
56
|
+
# http://forums.virtualbox.org/viewtopic.php?f=11&t=12210&start=0
|
57
|
+
# runCommand=echo 'kern.hz=100' > /boot/loader.conf
|
@@ -0,0 +1,93 @@
|
|
1
|
+
date > /etc/vagrant_box_build_time
|
2
|
+
|
3
|
+
# Get the latest portstree (needed for virtualbox to be on 4.x)
|
4
|
+
portsnap fetch update
|
5
|
+
|
6
|
+
#First install sudo
|
7
|
+
cd /usr/ports/security/sudo
|
8
|
+
make install -DBATCH
|
9
|
+
|
10
|
+
#We prefer bash to be there
|
11
|
+
cd /usr/ports/shells/bash
|
12
|
+
make install -DBATCH
|
13
|
+
|
14
|
+
|
15
|
+
#Off to rubygems to get first ruby running
|
16
|
+
cd /usr/ports/devel/ruby-gems
|
17
|
+
make install -DBATCH
|
18
|
+
|
19
|
+
#Gem chef - does install chef 9.12 (latest in ports?)
|
20
|
+
cd /usr/ports/sysutils/rubygem-chef
|
21
|
+
make install -DBATCH
|
22
|
+
|
23
|
+
#Installing chef & Puppet
|
24
|
+
/usr/local/bin/gem update chef --no-ri --no-rdoc
|
25
|
+
/usr/local/bin/gem install puppet --no-ri --no-rdoc
|
26
|
+
|
27
|
+
#Get wget
|
28
|
+
cd /usr/ports/ftp/wget
|
29
|
+
make install -DBATCH
|
30
|
+
|
31
|
+
#Installing vagrant keys
|
32
|
+
mkdir /home/vagrant/.ssh
|
33
|
+
chmod 700 /home/vagrant/.ssh
|
34
|
+
cd /home/vagrant/.ssh
|
35
|
+
/usr/local/bin/wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
36
|
+
chown -R vagrant /home/vagrant/.ssh
|
37
|
+
|
38
|
+
# Cleaning portstree to save space
|
39
|
+
# http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
|
40
|
+
cd /usr/ports/ports-mgmt/portupgrade
|
41
|
+
make install -DBATCH clean
|
42
|
+
|
43
|
+
/usr/local/sbin/portsclean -C
|
44
|
+
|
45
|
+
# As sharedfolders are not in defaults ports tree
|
46
|
+
# We will use vagrant via NFS
|
47
|
+
# Enable NFS
|
48
|
+
echo 'rpcbind_enable="YES"' >> /etc/rc.conf
|
49
|
+
echo 'nfs_server_enable="YES"' >> /etc/rc.conf
|
50
|
+
echo 'mountd_flags="-r"' >> /etc/rc.conf
|
51
|
+
|
52
|
+
# Enable passwordless sudo
|
53
|
+
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /usr/local/etc/sudoers
|
54
|
+
# Restore correct su permissions
|
55
|
+
# I'll leave that up to the reader :)
|
56
|
+
|
57
|
+
echo "=============================================================================="
|
58
|
+
echo "NOTE: FreeBSD - Vagrant"
|
59
|
+
echo "When using this basebox you need to do some special stuff in your Vagrantfile"
|
60
|
+
echo "1) Include the correct system"
|
61
|
+
echo " require 'vagrant/systems/freebsd' "
|
62
|
+
echo "2) Add after your config.vm.box = ..."
|
63
|
+
echo " config.vm.system = :freebsd"
|
64
|
+
echo "3) Enable HostOnly network"
|
65
|
+
echo " config.vm.network ...."
|
66
|
+
echo "4) Use nfs instead of shared folders"
|
67
|
+
echo " :nfs => true"
|
68
|
+
echo "============================================================================="
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
exit
|
73
|
+
|
74
|
+
# The iso from virtualbox will only install windows/solaris or linux, no BSD
|
75
|
+
# Research is on it's way to have 4.x in the main portstree
|
76
|
+
# http://www.listware.net/201102/freebsd-ports/65201-call-for-testers-virtualbox-404.html
|
77
|
+
# Virtualbox additions - http://wiki.freebsd.org/VirtualBox
|
78
|
+
# Currently this will only work for 4.0.4
|
79
|
+
cd /tmp
|
80
|
+
wget http://home.bluelife.at/ports/virtualbox-cft-20110218.tar.gz
|
81
|
+
cd /usr/ports
|
82
|
+
tar -xzvf /tmp/virtualbox-cft-20110218.tar.gz
|
83
|
+
|
84
|
+
# This requires libtool >= 2.4
|
85
|
+
cd /usr/ports/devel/libtool
|
86
|
+
make clean
|
87
|
+
make install -DBATCH
|
88
|
+
|
89
|
+
cd /usr/ports/emulators/virtualbox-ose-additions
|
90
|
+
make install -DBATCH
|
91
|
+
|
92
|
+
echo 'vboxguest_enable="YES"' >> /etc/rc.conf
|
93
|
+
echo 'vboxservice_enable="YES"' >> /etc/rc.conf
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Many thanks to @draco2002
|
2
|
+
# http://dracosplace.com/veewee_and_freebsd
|
3
|
+
|
4
|
+
# :iso_src => "ftp://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-bootonly.iso",
|
5
|
+
# :iso_file => "PCBSD8.2-x86-bootonly.iso",
|
6
|
+
|
7
|
+
#Based on https://gist.github.com/911058
|
8
|
+
|
9
|
+
Veewee::Session.declare( {
|
10
|
+
:cpu_count => '1', :memory_size=> '768',
|
11
|
+
:disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
|
12
|
+
:os_type_id => 'FreeBSD',
|
13
|
+
:iso_file => "PCBSD8.2-x86-bootonly.iso",
|
14
|
+
:iso_src => "http://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-bootonly.iso",
|
15
|
+
:iso_md5 => "548646b9d1042a162f769bc280149417",
|
16
|
+
:iso_download_timeout => "1000",
|
17
|
+
:boot_wait => "70",:boot_cmd_sequence => [
|
18
|
+
'<KillX>',
|
19
|
+
'<Enter>',
|
20
|
+
'dhclient em0<Enter>',
|
21
|
+
'sleep 15;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
|
22
|
+
'echo \'echo sshd_enable=\"YES\" >> $FSMNT/etc/rc.conf\' > /root/activate-ssh.sh ; cat /root/activate-ssh.sh<Enter>',
|
23
|
+
'chmod +x /root/activate-ssh.sh<Enter>',
|
24
|
+
'echo "Hope i got the file";/usr/PCBSD/pc-sysinstall/pc-sysinstall -c /root/pcinstall.fbg.cfg<Enter>',
|
25
|
+
'reboot<Enter>'
|
26
|
+
],
|
27
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "pcinstall.fbg.cfg",
|
28
|
+
:ssh_login_timeout => "10000",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "",
|
29
|
+
:ssh_host_port => "7222", :ssh_guest_port => "22",
|
30
|
+
:sudo_cmd => "cat '%f'|su -",
|
31
|
+
:shutdown_cmd => "shutdown -p now",
|
32
|
+
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
|
33
|
+
}
|
34
|
+
)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
installInteractive=no
|
2
|
+
installMode=fresh
|
3
|
+
installType=FreeBSD
|
4
|
+
packageType=tar
|
5
|
+
hostname=freebsd
|
6
|
+
#installMedium=dvd
|
7
|
+
ftpPath=ftp://ftp.pcbsd.org/pub/mirror/8.2/i386/netinstall/
|
8
|
+
installMedium=ftp
|
9
|
+
netSaveDev=AUTO-DHCP
|
10
|
+
|
11
|
+
# Timezone
|
12
|
+
timeZone=America/New_York
|
13
|
+
enableNTP=yes
|
14
|
+
|
15
|
+
# Keyboard Layout Options
|
16
|
+
localizeKeyModel=pc104
|
17
|
+
localizeKeyLayout=us U.S.
|
18
|
+
|
19
|
+
# Disk Setup for ada0
|
20
|
+
disk0=ada0
|
21
|
+
partition=ALL
|
22
|
+
bootManager=none
|
23
|
+
partscheme=MBR
|
24
|
+
commitDiskPart
|
25
|
+
|
26
|
+
# Setup the disk label
|
27
|
+
# All sizes are expressed in MB
|
28
|
+
disk0-part=UFS+S 1024 /
|
29
|
+
disk0-part=SWAP 1534 none
|
30
|
+
disk0-part=UFS+S 2048 /var
|
31
|
+
disk0-part=UFS+S 5529 /usr
|
32
|
+
commitDiskLabel
|
33
|
+
|
34
|
+
# List our components to install
|
35
|
+
# Src is only needed for the virtualbox extensions
|
36
|
+
# installComponents=ports,src
|
37
|
+
installComponents=ports
|
38
|
+
|
39
|
+
# Set the root pass
|
40
|
+
rootPass=vagrant
|
41
|
+
|
42
|
+
userName=vagrant
|
43
|
+
userComment=vagrant user
|
44
|
+
userPass=vagrant
|
45
|
+
userShell=/bin/csh
|
46
|
+
userHome=/home/vagrant
|
47
|
+
# Wheel group makes user sudo able
|
48
|
+
userGroups=wheel,operator
|
49
|
+
commitUser
|
50
|
+
|
51
|
+
runExtCommand=/root/activate-ssh.sh
|
52
|
+
|
53
|
+
# We temporary disable password checks , we promise to make up for it later
|
54
|
+
runCommand=sed -i -e 's@auth.*include.*system@@' /etc/pam.d/su
|
55
|
+
|
56
|
+
# making the clock run correctly
|
57
|
+
# http://forums.virtualbox.org/viewtopic.php?f=11&t=12210&start=0
|
58
|
+
# runCommand=echo 'kern.hz=100' > /boot/loader.conf
|
@@ -0,0 +1,93 @@
|
|
1
|
+
date > /etc/vagrant_box_build_time
|
2
|
+
|
3
|
+
# Get the latest portstree (needed for virtualbox to be on 4.x)
|
4
|
+
portsnap fetch update
|
5
|
+
|
6
|
+
#First install sudo
|
7
|
+
cd /usr/ports/security/sudo
|
8
|
+
make install -DBATCH
|
9
|
+
|
10
|
+
#We prefer bash to be there
|
11
|
+
cd /usr/ports/shells/bash
|
12
|
+
make install -DBATCH
|
13
|
+
|
14
|
+
|
15
|
+
#Off to rubygems to get first ruby running
|
16
|
+
cd /usr/ports/devel/ruby-gems
|
17
|
+
make install -DBATCH
|
18
|
+
|
19
|
+
#Gem chef - does install chef 9.12 (latest in ports?)
|
20
|
+
cd /usr/ports/sysutils/rubygem-chef
|
21
|
+
make install -DBATCH
|
22
|
+
|
23
|
+
#Installing chef & Puppet
|
24
|
+
/usr/local/bin/gem update chef --no-ri --no-rdoc
|
25
|
+
/usr/local/bin/gem install puppet --no-ri --no-rdoc
|
26
|
+
|
27
|
+
#Get wget
|
28
|
+
cd /usr/ports/ftp/wget
|
29
|
+
make install -DBATCH
|
30
|
+
|
31
|
+
#Installing vagrant keys
|
32
|
+
mkdir /home/vagrant/.ssh
|
33
|
+
chmod 700 /home/vagrant/.ssh
|
34
|
+
cd /home/vagrant/.ssh
|
35
|
+
/usr/local/bin/wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
|
36
|
+
chown -R vagrant /home/vagrant/.ssh
|
37
|
+
|
38
|
+
# Cleaning portstree to save space
|
39
|
+
# http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
|
40
|
+
cd /usr/ports/ports-mgmt/portupgrade
|
41
|
+
make install -DBATCH clean
|
42
|
+
|
43
|
+
/usr/local/sbin/portsclean -C
|
44
|
+
|
45
|
+
# As sharedfolders are not in defaults ports tree
|
46
|
+
# We will use vagrant via NFS
|
47
|
+
# Enable NFS
|
48
|
+
echo 'rpcbind_enable="YES"' >> /etc/rc.conf
|
49
|
+
echo 'nfs_server_enable="YES"' >> /etc/rc.conf
|
50
|
+
echo 'mountd_flags="-r"' >> /etc/rc.conf
|
51
|
+
|
52
|
+
# Enable passwordless sudo
|
53
|
+
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /usr/local/etc/sudoers
|
54
|
+
# Restore correct su permissions
|
55
|
+
# I'll leave that up to the reader :)
|
56
|
+
|
57
|
+
echo "=============================================================================="
|
58
|
+
echo "NOTE: FreeBSD - Vagrant"
|
59
|
+
echo "When using this basebox you need to do some special stuff in your Vagrantfile"
|
60
|
+
echo "1) Include the correct system"
|
61
|
+
echo " require 'vagrant/systems/freebsd' "
|
62
|
+
echo "2) Add after your config.vm.box = ..."
|
63
|
+
echo " config.vm.system = :freebsd"
|
64
|
+
echo "3) Enable HostOnly network"
|
65
|
+
echo " config.vm.network ...."
|
66
|
+
echo "4) Use nfs instead of shared folders"
|
67
|
+
echo " :nfs => true"
|
68
|
+
echo "============================================================================="
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
exit
|
73
|
+
|
74
|
+
# The iso from virtualbox will only install windows/solaris or linux, no BSD
|
75
|
+
# Research is on it's way to have 4.x in the main portstree
|
76
|
+
# http://www.listware.net/201102/freebsd-ports/65201-call-for-testers-virtualbox-404.html
|
77
|
+
# Virtualbox additions - http://wiki.freebsd.org/VirtualBox
|
78
|
+
# Currently this will only work for 4.0.4
|
79
|
+
cd /tmp
|
80
|
+
wget http://home.bluelife.at/ports/virtualbox-cft-20110218.tar.gz
|
81
|
+
cd /usr/ports
|
82
|
+
tar -xzvf /tmp/virtualbox-cft-20110218.tar.gz
|
83
|
+
|
84
|
+
# This requires libtool >= 2.4
|
85
|
+
cd /usr/ports/devel/libtool
|
86
|
+
make clean
|
87
|
+
make install -DBATCH
|
88
|
+
|
89
|
+
cd /usr/ports/emulators/virtualbox-ose-additions
|
90
|
+
make install -DBATCH
|
91
|
+
|
92
|
+
echo 'vboxguest_enable="YES"' >> /etc/rc.conf
|
93
|
+
echo 'vboxservice_enable="YES"' >> /etc/rc.conf
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Veewee::Session.declare( {
|
2
|
+
:cpu_count => '1', :memory_size=> '768',
|
3
|
+
:disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
|
4
|
+
:os_type_id => 'Gentoo',
|
5
|
+
:iso_file => "install-x86-minimal-20110426.iso",
|
6
|
+
:iso_src => "http://distfiles.gentoo.org/releases/x86/autobuilds/current-iso/install-x86-minimal-20110426.iso",
|
7
|
+
:iso_md5 => "548646b9d1042a162f769bc280149417",
|
8
|
+
:iso_download_timeout => "1000",
|
9
|
+
:boot_wait => "120",:boot_cmd_sequence => [
|
10
|
+
'net-setup eth0<Enter>',
|
11
|
+
'<Wait><Enter>',
|
12
|
+
'2<Enter>',
|
13
|
+
'1<Enter>',
|
14
|
+
'<Wait><Wait>ifconfig -a <Enter>',
|
15
|
+
#'sleep 5 ;curl http://%IP%:%PORT%/stages.sh -o stages.sh &&',
|
16
|
+
#'bash stages.sh &<Enter>',
|
17
|
+
'passwd<Enter><Wait><Wait>',
|
18
|
+
'vagrant<Enter><Wait>',
|
19
|
+
'vagrant<Enter><Wait>',
|
20
|
+
'/etc/init.d/sshd start<Enter>'
|
21
|
+
],
|
22
|
+
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "",
|
23
|
+
:ssh_login_timeout => "10000",:ssh_user => "root", :ssh_password => "vagrant",:ssh_key => "",
|
24
|
+
:ssh_host_port => "7222", :ssh_guest_port => "22",
|
25
|
+
:sudo_cmd => "cat '%f'|su -",
|
26
|
+
:shutdown_cmd => "shutdown -p now",
|
27
|
+
:postinstall_files => [ "post_install.sh"],:postinstall_timeout => "10000"
|
28
|
+
}
|
29
|
+
)
|