veewee 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- veewee (0.1.20)
4
+ veewee (0.1.21)
5
5
  cucumber (= 0.8.5)
6
6
  highline (~> 1.6.1)
7
7
  net-ssh (~> 2.1.0)
data/README.md CHANGED
@@ -8,33 +8,53 @@ Before we can actually build the boxes, we need to take care of the minimal thin
8
8
  - Have Virtualbox 4.x installed -> download it from http://download.virtualbox.org/virtualbox/
9
9
 
10
10
 
11
- ALPHA CODE: -> you're on your own....
11
+ People have reported good experiences, why don't you give it a try?
12
12
 
13
13
  ## Installation:
14
- __from source__
14
+ __as a gem__
15
+ <pre>
16
+ $ gem install veewee
17
+ </pre>
15
18
 
19
+ __from source__
16
20
  <pre>
17
21
  $ git clone https://github.com/jedi4ever/veewee.git
18
22
  $ cd veewee
19
23
  $ gem install bundler
20
24
  $ bundle install
21
- </pre>
22
- __as a gem__
23
- <pre>
24
- $ gem install veewee
25
+
26
+ If you don't use rvm, be sure to execute vagrant through bundle exec
27
+ $ alias vagrant="bundle exec vagrant"
25
28
  </pre>
26
29
 
30
+
27
31
  ## List all templates
28
32
  <pre>
29
33
  $ vagrant basebox templates
30
34
  The following templates are available:
31
- vagrant basebox define 'boxname' 'CentOS-4.8-i386'
32
- vagrant basebox define 'boxname' 'CentOS-5.5-i386'
33
- vagrant basebox define 'boxname' 'CentOS-5.5-i386-netboot'
34
- vagrant basebox define 'boxname' 'ubuntu-10.04.1-server-amd64'
35
- vagrant basebox define 'boxname' 'ubuntu-10.04.1-server-i386'
36
- vagrant basebox define 'boxname' 'ubuntu-10.10-server-amd64'
37
- vagrant basebox define 'boxname' 'ubuntu-10.10-server-i386'
35
+ The following templates are available:
36
+ vagrant basebox define '<boxname>' 'Archlinux-latest'
37
+ vagrant basebox define '<boxname>' 'CentOS-4.8-i386'
38
+ vagrant basebox define '<boxname>' 'CentOS-5.5-i386'
39
+ vagrant basebox define '<boxname>' 'CentOS-5.5-i386-netboot'
40
+ vagrant basebox define '<boxname>' 'Debian-6.0-amd64-netboot'
41
+ vagrant basebox define '<boxname>' 'Debian-6.0-i386-netboot'
42
+ vagrant basebox define '<boxname>' 'Fedora-14-amd64'
43
+ vagrant basebox define '<boxname>' 'Fedora-14-amd64-netboot'
44
+ vagrant basebox define '<boxname>' 'Fedora-14-i386'
45
+ vagrant basebox define '<boxname>' 'Fedora-14-i386-netboot'
46
+ vagrant basebox define '<boxname>' 'freebsd-8.2-experimental'
47
+ vagrant basebox define '<boxname>' 'freebsd-8.2-pcbsd-i386'
48
+ vagrant basebox define '<boxname>' 'freebsd-8.2-pcbsd-i386-netboot'
49
+ vagrant basebox define '<boxname>' 'solaris-11-express-i386'
50
+ vagrant basebox define '<boxname>' 'Sysrescuecd-2.0.0-experimental'
51
+ vagrant basebox define '<boxname>' 'ubuntu-10.04.2-server-amd64'
52
+ vagrant basebox define '<boxname>' 'ubuntu-10.04.2-server-i386'
53
+ vagrant basebox define '<boxname>' 'ubuntu-10.10-server-amd64'
54
+ vagrant basebox define '<boxname>' 'ubuntu-10.10-server-amd64-netboot'
55
+ vagrant basebox define '<boxname>' 'ubuntu-10.10-server-i386'
56
+ vagrant basebox define '<boxname>' 'ubuntu-10.10-server-i386-netboot'
57
+
38
58
 
39
59
  </pre>
40
60
  ## Define a new box
@@ -54,7 +74,7 @@ definition.rb postinstall.sh postinstall2.sh preseed.cfg
54
74
  <pre>
55
75
  Veewee::Session.declare( {
56
76
  :cpu_count => '1', :memory_size=> '256',
57
- :disk_size => '10140', :disk_format => 'VDI',:disk_size => '10240' ,
77
+ :disk_size => '10140', :disk_format => 'VDI',
58
78
  :os_type_id => 'Ubuntu',
59
79
  :iso_file => "ubuntu-10.10-server-i386.iso",
60
80
  :iso_src => "http://releases.ubuntu.com/maverick/ubuntu-10.10-server-i386.iso",
@@ -88,6 +108,7 @@ Put your isofile inside the 'currentdir'/iso directory or if you don't run
88
108
 
89
109
  - the build assumes your iso files are in 'currentdir'/iso
90
110
  - if it can not find it will suggest to download the iso for you
111
+ - use '--force' to overwrite an existing install
91
112
 
92
113
  ## Build the new box:
93
114
  <pre>
@@ -102,6 +123,11 @@ $ vagrant basebox build 'myubuntubox'</pre>
102
123
  - Wait for ssh login to work with :ssh_user , :ssh_password
103
124
  - Sudo execute the :postinstall_files
104
125
 
126
+ ## Validate the vm
127
+ <pre>$ vagrant basebox validate 'myubuntubox' </pre>
128
+
129
+ this will run some cucumber test against the box to see if it has the necessary bits and pieces for vagrant to work
130
+
105
131
  ## Export the vm to a .box file
106
132
  <pre>$ vagrant basebox export 'myubuntubox' </pre>
107
133
 
@@ -122,6 +148,35 @@ $ vagrant init 'myubuntubox'
122
148
  $ vagrant up
123
149
  $ vagrant ssh
124
150
  </pre>
151
+
152
+ ## How to add a new OS/installation (needs some love)
153
+
154
+ - I suggest the easiest way is to get an account on github
155
+ - fork of the veewee repository
156
+
157
+ <pre>
158
+ $ git clone https://github.com/*your account*/veewee.git
159
+ $ cd veewee
160
+ $ gem install bundler
161
+ $ bundle install
162
+ </pre>
163
+
164
+ If you don't use rvm, be sure to execute vagrant through bundle exec
165
+ <pre>
166
+ $ alias vagrant="bundle exec vagrant"
167
+ </pre>
168
+
169
+ Start of an existing one
170
+ <pre>
171
+ $ vagrant basebox define 'mynewos' 'ubuntu...'
172
+ </pre>
173
+
174
+ - Do changes in the currentdir/definitions/mynewos
175
+ - When it builds ok, move the definition/mynewos to a sensible directory under templates
176
+ - commit the changes (git commit -a)
177
+ - push the changes to github (git push)
178
+ - go to the github gui and issue a pull request for it
179
+
125
180
  ## If you have a setup working, share your 'definition' with me. That would be fun!
126
181
 
127
182
  IDEAS:
@@ -130,11 +185,6 @@ IDEAS:
130
185
 
131
186
  FUTURE IDEAS:
132
187
 
133
- - use snapshots to fastforward initial boot, and every postinstall command
134
188
  - export to AMI too
135
189
  - provide for more failsafe execution, testing parameters
136
- - use more virtualbox ruby instead of calling the VBoxManage command
137
- - Verify the installation with cucumber-nagios (ssh functionality)
138
190
  - Do the same for Vmware Fusion
139
-
140
- BUGS: Lots = Like I said it currently works for me, on my machine and with the correct magic sequence :)
@@ -12,7 +12,7 @@ definition_dir= File.expand_path(File.join(veewee_dir, "definitions"))
12
12
  tmp_dir=File.expand_path(File.join(veewee_dir, "tmp"))
13
13
  iso_dir=File.expand_path(File.join(veewee_dir, "iso"))
14
14
  box_dir=File.expand_path(File.join(veewee_dir, "boxes"))
15
- validation_dir=File.expand_path(File.join(veewee_dir, "validation"))
15
+ validation_dir=File.expand_path(File.join(lib_dir, "validation"))
16
16
 
17
17
  #Initialize
18
18
  Veewee::Session.setenv({:veewee_dir => veewee_dir, :definition_dir => definition_dir,
@@ -149,16 +149,29 @@ module Veewee
149
149
  puts
150
150
  puts "Verifying the isofile #{filename} is ok."
151
151
  else
152
+
152
153
  full_path=File.join(@iso_dir,filename)
153
154
  path1=Pathname.new(full_path)
154
155
  path2=Pathname.new(Dir.pwd)
155
156
  rel_path=path1.relative_path_from(path2).to_s
156
157
 
157
158
  puts
158
- puts "We did not find an isofile in <currentdir>/iso. The definition provided the following download information:"
159
- puts "- Download url: #{@definition[:iso_src]}"
159
+ puts "We did not find an isofile in <currentdir>/iso. \n\nThe definition provided the following download information:"
160
+ unless "#{@definition[:iso_src]}"==""
161
+ puts "- Download url: #{@definition[:iso_src]}"
162
+ end
160
163
  puts "- Md5 Checksum: #{@definition[:iso_md5]}"
161
- puts ""
164
+ puts "#{@definition[:iso_download_instructions]}"
165
+ puts
166
+
167
+ if @definition[:iso_src] == ""
168
+ puts "Please follow the instructions above:"
169
+ puts "- to get the ISO"
170
+ puts" - put it in <currentdir>/iso"
171
+ puts "- then re-run the command"
172
+ puts
173
+ exit
174
+ else
162
175
 
163
176
  question=ask("Download? (Yes/No)") {|q| q.default="No"}
164
177
  if question.downcase == "yes"
@@ -176,7 +189,7 @@ module Veewee
176
189
  exit
177
190
  end
178
191
 
179
-
192
+ end
180
193
  end
181
194
 
182
195
  end
@@ -1,3 +1,3 @@
1
1
  module Veewee
2
- VERSION = "0.1.20"
2
+ VERSION = "0.1.21"
3
3
  end
@@ -3,9 +3,9 @@ Veewee::Session.declare({
3
3
  :memory_size=> '256',
4
4
  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
5
5
  :os_type_id => 'Debian_64',
6
- :iso_file => "debian-6.0.0-amd64-netinst.iso",
7
- :iso_src => "http://ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-6.0.0-amd64-netinst.iso",
8
- :iso_md5 => "98111f815d3bea761d303a14d8df8887",
6
+ :iso_file => "debian-6.0.1a-amd64-netinst.iso",
7
+ :iso_src => "http://cdimage.debian.org/debian-cd/6.0.1a/amd64/iso-cd/debian-6.0.1a-amd64-netinst.iso",
8
+ :iso_md5 => "eb25e5098ed0e60381f78b4efdde8737",
9
9
  :iso_download_timeout => "1000",
10
10
  :boot_wait => "10", :boot_cmd_sequence => [
11
11
  '<Esc>',
@@ -5,9 +5,9 @@ Veewee::Session.declare({
5
5
  :memory_size=> '256',
6
6
  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
7
7
  :os_type_id => 'Debian',
8
- :iso_file => "debian-6.0.0-i386-netinst.iso",
9
- :iso_src => "http://ftp.acc.umu.se/debian-cd/current/i386/iso-cd/debian-6.0.0-i386-netinst.iso",
10
- :iso_md5 => "2840eea06e9cdd2e125f32cefa25fa1d",
8
+ :iso_file => "debian-6.0.1a-i386-netinst.iso",
9
+ :iso_src => "http://cdimage.debian.org/debian-cd/6.0.1a/i386/iso-cd/debian-6.0.1a-i386-netinst.iso",
10
+ :iso_md5 => "57bd4f765d0f5909cc84f1a7c1eaf976",
11
11
  :iso_download_timeout => "1000",
12
12
  :boot_wait => "10", :boot_cmd_sequence => [
13
13
  '<Esc>',
@@ -5,6 +5,11 @@ Veewee::Session.declare({
5
5
  :os_type_id => 'OpenSolaris',
6
6
  :iso_file => "sol-11-exp-201011-ai-x86.iso",
7
7
  :iso_src => "",
8
+ :iso_download_instructions => "- You need to download this manually as there is no automated way to do it\n"+
9
+ "http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html\n"+
10
+ "\n"+
11
+ "- The version tested is 2010.11\n"+
12
+ "- For other version: changed the iso filename+checksum\n",
8
13
  :iso_md5 => "36527d4d49a645ef6f6d2677c8e0118c",
9
14
  :iso_download_timeout => 1000,
10
15
  :boot_wait => "10", :boot_cmd_sequence => [
@@ -12,23 +12,23 @@ yes|/usr/sbin/pkgadd -d http://mirror.opencsw.org/opencsw/pkgutil-`uname -p`.pkg
12
12
  /usr/bin/pkg install SUNWarc SUNWsfwhea SUNWhea SUNWtoo
13
13
  /usr/bin/pkg install math/header-math
14
14
 
15
- yes|/opt/csw/bin/pkgutil -i CSWgsed
16
- yes|/opt/csw/bin/pkgutil -i CSWruby18-gcc4
17
- yes|/opt/csw/bin/pkgutil -i CSWruby18-dev
18
- yes|/opt/csw/bin/pkgutil -i CSWrubygems
15
+ /opt/csw/bin/pkgutil -y -i CSWgsed
16
+ /opt/csw/bin/pkgutil -y -i CSWruby18-gcc4
17
+ /opt/csw/bin/pkgutil -y -i CSWruby18-dev
18
+ /opt/csw/bin/pkgutil -y -i CSWrubygems
19
19
 
20
20
  # These are needed to get a compiler working
21
21
  # Mainly because chef depends on compiling some native gems
22
22
  export PATH=/opt/csw/bin/:$PATH
23
23
  export PATH=/opt/csw/gcc4/bin/:$PATH
24
24
 
25
- yes | /opt/csw/bin/pkgutil -i CSWgcc4core
25
+ /opt/csw/bin/pkgutil -y -i CSWgcc4core
26
26
 
27
27
 
28
- yes | /opt/csw/bin/pkgutil -i CSWgcc4g++
29
- yes | /opt/csw/bin/pkgutil -i CSWreadline
30
- yes | /opt/csw/bin/pkgutil -i CSWzlib
31
- yes | /opt/csw/bin/pkgutil -i CSWossldevel
28
+ /opt/csw/bin/pkgutil -y -i CSWgcc4g++
29
+ /opt/csw/bin/pkgutil -y -i CSWreadline
30
+ /opt/csw/bin/pkgutil -y -i CSWzlib
31
+ /opt/csw/bin/pkgutil -y -i CSWossldevel
32
32
 
33
33
  # prevents ":in `require': no such file to load -- mkmf (LoadError)"
34
34
  # yes|/opt/csw/bin/pkgutil -i CSWruby
@@ -36,8 +36,8 @@ yes | /opt/csw/bin/pkgutil -i CSWossldevel
36
36
  # has entries in /opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb
37
37
  # luckily there is another one
38
38
  # For some reason these don't get installed ok, we need to give them a slight kick again
39
- yes | /opt/csw/bin/pkgutil -i CSWgcc4core
40
- yes|/opt/csw/bin/pkgutil -i CSWruby18-gcc4
39
+ /opt/csw/bin/pkgutil -y -i CSWgcc4core
40
+ /opt/csw/bin/pkgutil -y -i CSWruby18-gcc4
41
41
 
42
42
  # no solaris2.11 .... mkheaders here ! needs some fixing ??
43
43
  # /opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.10/4.3.3/install-tools/mkheaders
@@ -69,6 +69,8 @@ yes|/usr/sbin/pkgadd -d . SUNWvbox
69
69
  echo "export PATH=/opt/csw/bin:/opt/csw/sbin/:$PATH" >> /root/.profile
70
70
  echo "export PATH=/opt/csw/bin:/opt/csw/sbin/:$PATH" >> /export/home/vagrant/.profile
71
71
 
72
+ puts "Note: validation of this box wil fail, as it's not linux based, working on that"
73
+
72
74
  exit
73
75
 
74
76
  #Inspiration for ruby enterprise
@@ -7,7 +7,7 @@ Veewee::Session.declare({
7
7
  :iso_md5 => "02abb1a71bde21a1335e9368dad529ca",
8
8
  :iso_download_timeout => "1000",
9
9
  :boot_wait => "10", :boot_cmd_sequence => [
10
- '<Tabr>',
10
+ '<Tab>',
11
11
  'noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
12
12
  'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
13
13
  'hostname=%NAME% ',
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: 51
4
+ hash: 49
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 20
10
- version: 0.1.20
9
+ - 21
10
+ version: 0.1.21
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-05-03 00:00:00 +02:00
19
+ date: 2011-05-04 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -204,12 +204,12 @@ files:
204
204
  - templates/CentOS-5.5-i386/definition.rb
205
205
  - templates/CentOS-5.5-i386/ks.cfg
206
206
  - templates/CentOS-5.5-i386/postinstall.sh
207
- - templates/Debian-6.0-amd64-netboot/definition.rb
208
- - templates/Debian-6.0-amd64-netboot/postinstall.sh
209
- - templates/Debian-6.0-amd64-netboot/preseed.cfg
210
- - templates/Debian-6.0-i386-netboot/definition.rb
211
- - templates/Debian-6.0-i386-netboot/postinstall.sh
212
- - templates/Debian-6.0-i386-netboot/preseed.cfg
207
+ - templates/Debian-6.0.1a-amd64-netboot/definition.rb
208
+ - templates/Debian-6.0.1a-amd64-netboot/postinstall.sh
209
+ - templates/Debian-6.0.1a-amd64-netboot/preseed.cfg
210
+ - templates/Debian-6.0.1a-i386-netboot/definition.rb
211
+ - templates/Debian-6.0.1a-i386-netboot/postinstall.sh
212
+ - templates/Debian-6.0.1a-i386-netboot/preseed.cfg
213
213
  - templates/Fedora-14-amd64-netboot/definition.rb
214
214
  - templates/Fedora-14-amd64-netboot/ks.cfg
215
215
  - templates/Fedora-14-amd64-netboot/postinstall.sh