veewee 0.1.12 → 0.1.13
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/Gemfile.lock +3 -12
- data/lib/vagrant_init.rb +6 -1
- data/lib/veewee/session.rb +6 -1
- data/lib/veewee/version.rb +1 -1
- data/templates/Debian-6.0-amd64-netboot/definition.rb +1 -2
- data/templates/Debian-6.0-amd64-netboot/postinstall.sh +1 -1
- data/templates/{freebsd-8.1-experimental → freebsd-8.2-experimental}/definition.rb +3 -3
- data/templates/{freebsd-8.1-experimental → freebsd-8.2-experimental}/postinstall.sh +97 -4
- data/validation/vagrant.feature +3 -3
- data/veewee.gemspec +2 -2
- metadata +12 -24
data/Gemfile.lock
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
veewee (0.1.
|
5
|
-
cucumber
|
4
|
+
veewee (0.1.13)
|
5
|
+
cucumber (= 0.8.5)
|
6
6
|
highline (~> 1.6.1)
|
7
7
|
net-ssh (~> 2.1.0)
|
8
8
|
popen4 (~> 0.1.2)
|
9
9
|
progressbar
|
10
|
-
rspec
|
11
10
|
thor (~> 0.14.6)
|
12
11
|
vagrant (~> 0.7.0)
|
13
12
|
|
@@ -38,21 +37,13 @@ GEM
|
|
38
37
|
mario (0.0.6)
|
39
38
|
net-scp (1.0.4)
|
40
39
|
net-ssh (>= 1.99.1)
|
41
|
-
net-ssh (2.1.
|
40
|
+
net-ssh (2.1.2)
|
42
41
|
open4 (1.0.1)
|
43
42
|
popen4 (0.1.2)
|
44
43
|
Platform (>= 0.4.0)
|
45
44
|
open4 (>= 0.4.0)
|
46
45
|
progressbar (0.9.0)
|
47
46
|
rake (0.8.7)
|
48
|
-
rspec (2.5.0)
|
49
|
-
rspec-core (~> 2.5.0)
|
50
|
-
rspec-expectations (~> 2.5.0)
|
51
|
-
rspec-mocks (~> 2.5.0)
|
52
|
-
rspec-core (2.5.1)
|
53
|
-
rspec-expectations (2.5.0)
|
54
|
-
diff-lcs (~> 1.1.2)
|
55
|
-
rspec-mocks (2.5.0)
|
56
47
|
term-ansicolor (1.0.5)
|
57
48
|
thor (0.14.6)
|
58
49
|
trollop (1.16.2)
|
data/lib/vagrant_init.rb
CHANGED
data/lib/veewee/session.rb
CHANGED
@@ -492,6 +492,11 @@ module Veewee
|
|
492
492
|
|
493
493
|
#Exec and system stop the execution here
|
494
494
|
Veewee::Shell.execute("#{command}")
|
495
|
+
|
496
|
+
#Set a shared folder for validation
|
497
|
+
command="#{@vboxcmd} sharedfolder add '#{boxname}' --name 'veewee-validation' --hostpath '#{File.expand_path(@veewee_dir)}/validation' --automount"
|
498
|
+
|
499
|
+
Veewee::Shell.execute("#{command}")
|
495
500
|
|
496
501
|
end
|
497
502
|
|
@@ -818,7 +823,7 @@ module Veewee
|
|
818
823
|
|
819
824
|
#Need to look it up again because if it was an initial load
|
820
825
|
vm=VirtualBox::VM.find(boxname)
|
821
|
-
puts "Step [#{current_step_nr}] was
|
826
|
+
puts "Step [#{current_step_nr}] was succesfully - saving state"
|
822
827
|
vm.save_state
|
823
828
|
sleep 2 #waiting for it to be ok
|
824
829
|
#puts "about to snapshot #{vm}"
|
data/lib/veewee/version.rb
CHANGED
@@ -12,7 +12,6 @@ Veewee::Session.declare( {
|
|
12
12
|
:boot_wait => "10",:boot_cmd_sequence => [
|
13
13
|
'<Esc>',
|
14
14
|
'install ',
|
15
|
-
'acpi=off noapic nolapic ',
|
16
15
|
'preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
17
16
|
'debian-installer=en_US ',
|
18
17
|
'auto ',
|
@@ -36,7 +35,7 @@ Veewee::Session.declare( {
|
|
36
35
|
:ssh_host_port => "7222",
|
37
36
|
:ssh_guest_port => "22",
|
38
37
|
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
39
|
-
:shutdown_cmd => "
|
38
|
+
:shutdown_cmd => "halt -p",
|
40
39
|
:postinstall_files => [ "postinstall.sh" ],
|
41
40
|
:postinstall_timeout => "10000"
|
42
41
|
}
|
@@ -8,7 +8,7 @@ apt-get clean
|
|
8
8
|
|
9
9
|
#Setting up sudo
|
10
10
|
cp /etc/sudoers /etc/sudoers.orig
|
11
|
-
sed -i -e 's/%
|
11
|
+
sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
|
12
12
|
|
13
13
|
#Installing ruby
|
14
14
|
wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
|
@@ -2,9 +2,9 @@ Veewee::Session.declare( {
|
|
2
2
|
:cpu_count => '1', :memory_size=> '256',
|
3
3
|
:disk_size => '10140', :disk_format => 'VDI',:disk_size => '10240' ,
|
4
4
|
:os_type_id => 'FreeBSD_64',
|
5
|
-
:iso_file => "mfsbsd-8.
|
6
|
-
:iso_src => "http://mfsbsd.vx.sk/iso/mfsbsd-8.
|
7
|
-
:iso_md5 => "
|
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
8
|
:iso_download_timeout => "1000",
|
9
9
|
:boot_wait => "10",:boot_cmd_sequence => [
|
10
10
|
'<Enter>'
|
@@ -1,9 +1,30 @@
|
|
1
1
|
#http://www.freebsd.org/doc/en_US.ISO8859-1/articles/remote-install/installation.html
|
2
2
|
dd if=/dev/zero of=/dev/ad4 count=2
|
3
|
-
#bsdlabel -
|
3
|
+
#bsdlabel -w -B /dev/ad4
|
4
4
|
|
5
5
|
sysctl kern.geom.debugflags=16
|
6
6
|
|
7
|
+
#http://forum.nginx.org/read.php?23,146311,146451
|
8
|
+
# Init the disk with an MBR
|
9
|
+
gpart create -s mbr ad4
|
10
|
+
# Create a BSD container
|
11
|
+
gpart add -t freebsd ad4
|
12
|
+
# Init with a BSD scheme
|
13
|
+
gpart create -s bsd ad4s1
|
14
|
+
|
15
|
+
# 1GB for /
|
16
|
+
gpart add -t freebsd-ufs -s 1G ad4s1
|
17
|
+
|
18
|
+
gpart add -t freebsd-swap -s 2G ad4s1
|
19
|
+
# 2GB for swap
|
20
|
+
gpart add -t freebsd-ufs -s 2G ad4s1
|
21
|
+
# 2GB for /var
|
22
|
+
gpart add -t freebsd-ufs ad4s1
|
23
|
+
# all rest for /usr
|
24
|
+
|
25
|
+
#install bootcode
|
26
|
+
gpart bootcode -p /boot/boot -i 1 ad4s1
|
27
|
+
gpart set -a active -i ad4
|
7
28
|
|
8
29
|
cat <<EOF >/install.cfg
|
9
30
|
# This is the installation configuration file for our rackmounted FreeBSD
|
@@ -28,9 +49,14 @@ tryDHCP=NO
|
|
28
49
|
|
29
50
|
################################
|
30
51
|
# Which installation device to use
|
31
|
-
|
52
|
+
# ftp://ftp.smr.ru/pub/0/FreeBSD/current/src/release/sysinstall/sysinstall.h
|
53
|
+
_ftpPath=ftp://ftp2.freebsd.org/pub/FreeBSD/
|
54
|
+
#_httpPath=ftp://ftp2.freebsd.org/pub/FreeBSD/
|
55
|
+
#httpProxy=192.168.2.10:800
|
32
56
|
netDev=em0
|
33
57
|
mediaSetFTP
|
58
|
+
#mediaSetHTTP
|
59
|
+
|
34
60
|
################################
|
35
61
|
|
36
62
|
################################
|
@@ -47,7 +73,7 @@ partition=all
|
|
47
73
|
#http://www.mail-archive.com/freebsd-questions@freebsd.org/msg212036.html
|
48
74
|
bootManager=standard
|
49
75
|
diskPartitionEditor
|
50
|
-
diskPartitionWrite
|
76
|
+
#diskPartitionWrite
|
51
77
|
|
52
78
|
################################
|
53
79
|
|
@@ -92,5 +118,72 @@ installCommit
|
|
92
118
|
|
93
119
|
EOF
|
94
120
|
|
95
|
-
exit
|
96
121
|
sysinstall configFile=/install.cfg loadConfig
|
122
|
+
|
123
|
+
|
124
|
+
#http://www.daemonforums.org/showthread.php?t=4389
|
125
|
+
|
126
|
+
cd /mnt/boot
|
127
|
+
cp -Rp GENERIC/* kernel/
|
128
|
+
|
129
|
+
#For some reason this is the disk layout the sysinstall creates
|
130
|
+
|
131
|
+
cat <<EOF > /mnt/etc/fstab
|
132
|
+
/dev/ad4s1b none swap sw 0 0
|
133
|
+
/dev/ad4s1d / ufs rw 0 0
|
134
|
+
/dev/ad4s1f /usr ufs rw 0 0
|
135
|
+
/dev/ad4s1e /var ufs rw 0 0
|
136
|
+
EOF
|
137
|
+
|
138
|
+
|
139
|
+
# boot0cfg -B ad4
|
140
|
+
#make the menu appear
|
141
|
+
|
142
|
+
# Booting mentions an error
|
143
|
+
# Invalid partition
|
144
|
+
# FAILS WITH: 0:ad(0,a)/boot/kernel/kernel
|
145
|
+
# WORKS WITH: 0:ad(4,d)/boot/loader
|
146
|
+
|
147
|
+
#http://www.mail-archive.com/freebsd-questions@freebsd.org/msg72530.html
|
148
|
+
cat <<EOF > /mnt/boot/loader.conf
|
149
|
+
#geom_label_load="YES"
|
150
|
+
#root_disk_unit="4"
|
151
|
+
#currdev="disk4s1d"
|
152
|
+
#rootdev="disk4s1d"
|
153
|
+
#vfs.root.mountfrom="ufs:/dev/ad4s1d"
|
154
|
+
EOF
|
155
|
+
|
156
|
+
#activate dhcp
|
157
|
+
cat <<EOF > /mnt/etc/rc.conf
|
158
|
+
ifconfig_DEFAULT="DHCP"
|
159
|
+
EOF
|
160
|
+
|
161
|
+
|
162
|
+
#The vi edit program needs a /var/tmp/vi.recover file.
|
163
|
+
|
164
|
+
mkdir -p /mnt/usr/local/etc/rc.d/
|
165
|
+
cd /mnt/usr/local/etc/rc.d/
|
166
|
+
cat <<EOF > mkvirecover
|
167
|
+
#!/bin/sh
|
168
|
+
# PROVIDE: mkvirecover
|
169
|
+
# REQUIRE: mountcritremote
|
170
|
+
# BEFORE: DAEMON virecover
|
171
|
+
|
172
|
+
|
173
|
+
. /etc/rc.subr
|
174
|
+
|
175
|
+
name="mkvirecover"
|
176
|
+
stop_cmd=":"
|
177
|
+
start_cmd="mkvirecover_start"
|
178
|
+
|
179
|
+
mkvirecover_start()
|
180
|
+
{
|
181
|
+
[ -d /var/tmp/vi.recover ] || mkdir -m 1777 /var/tmp/vi.recover
|
182
|
+
echo '.'
|
183
|
+
}
|
184
|
+
|
185
|
+
load_rc_config "\$name"
|
186
|
+
run_rc_command "\$1"
|
187
|
+
EOF
|
188
|
+
|
189
|
+
chmod 555 /mnt/usr/local/etc/rc.d/mkvirecover
|
data/validation/vagrant.feature
CHANGED
@@ -44,9 +44,9 @@ Scenario: Checking puppet
|
|
44
44
|
And I run ". /etc/profile ; puppet --version 2> /dev/null 1>/dev/null; echo $?"
|
45
45
|
Then I should see "0" in the output
|
46
46
|
|
47
|
-
Scenario: Checking
|
47
|
+
Scenario: Checking shared folders
|
48
48
|
When I ssh to "127.0.0.1" with the following credentials:
|
49
49
|
| username| password |keyfile | port |
|
50
50
|
| vagrant | vagrant | vagrant-private.key | 7222 |
|
51
|
-
And I run "
|
52
|
-
Then I should see "
|
51
|
+
And I run "mount|grep veewee-validation"
|
52
|
+
Then I should see "veewee-validation" in the output
|
data/veewee.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_dependency "thor", "~> 0.14.6"
|
21
21
|
s.add_dependency "highline", "~> 1.6.1"
|
22
22
|
s.add_dependency "progressbar"
|
23
|
-
s.add_dependency "cucumber"
|
24
|
-
s.add_dependency "rspec"
|
23
|
+
s.add_dependency "cucumber", "0.8.5"
|
24
|
+
#s.add_dependency "rspec"
|
25
25
|
|
26
26
|
s.add_development_dependency "bundler", ">= 1.0.0"
|
27
27
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: veewee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 13
|
10
|
+
version: 0.1.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Patrick Debois
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-03-08 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -117,32 +117,20 @@ dependencies:
|
|
117
117
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
120
|
-
- - "
|
120
|
+
- - "="
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
hash:
|
122
|
+
hash: 53
|
123
123
|
segments:
|
124
124
|
- 0
|
125
|
-
|
125
|
+
- 8
|
126
|
+
- 5
|
127
|
+
version: 0.8.5
|
126
128
|
type: :runtime
|
127
129
|
requirement: *id007
|
128
130
|
name: cucumber
|
129
131
|
prerelease: false
|
130
132
|
- !ruby/object:Gem::Dependency
|
131
133
|
version_requirements: &id008 !ruby/object:Gem::Requirement
|
132
|
-
none: false
|
133
|
-
requirements:
|
134
|
-
- - ">="
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
hash: 3
|
137
|
-
segments:
|
138
|
-
- 0
|
139
|
-
version: "0"
|
140
|
-
type: :runtime
|
141
|
-
requirement: *id008
|
142
|
-
name: rspec
|
143
|
-
prerelease: false
|
144
|
-
- !ruby/object:Gem::Dependency
|
145
|
-
version_requirements: &id009 !ruby/object:Gem::Requirement
|
146
134
|
none: false
|
147
135
|
requirements:
|
148
136
|
- - ">="
|
@@ -154,7 +142,7 @@ dependencies:
|
|
154
142
|
- 0
|
155
143
|
version: 1.0.0
|
156
144
|
type: :development
|
157
|
-
requirement: *
|
145
|
+
requirement: *id008
|
158
146
|
name: bundler
|
159
147
|
prerelease: false
|
160
148
|
description: Expand the 'vagrant box' command to support the creation of base boxes from scratch
|
@@ -205,8 +193,8 @@ files:
|
|
205
193
|
- templates/Debian-6.0-amd64-netboot/preseed.cfg
|
206
194
|
- templates/Sysrescuecd-2.0.0-experimental/autorun0
|
207
195
|
- templates/Sysrescuecd-2.0.0-experimental/definition.rb
|
208
|
-
- templates/freebsd-8.
|
209
|
-
- templates/freebsd-8.
|
196
|
+
- templates/freebsd-8.2-experimental/definition.rb
|
197
|
+
- templates/freebsd-8.2-experimental/postinstall.sh
|
210
198
|
- templates/ubuntu-10.04.1-server-amd64/definition.rb
|
211
199
|
- templates/ubuntu-10.04.1-server-amd64/postinstall.sh
|
212
200
|
- templates/ubuntu-10.04.1-server-amd64/preseed.cfg
|