Skip to content

Commit

Permalink
- Added download instructions for the solaris express template
Browse files Browse the repository at this point in the history
- Provided a way to show download_instructions if no ISO download is available (iso_download_instructions
- move yes| pkgutil to pkgutil -y
- added note about validation script not correctly running for solaris (needs other commands)
  • Loading branch information
jedi4ever committed May 4, 2011
1 parent a48a4c7 commit 4901199
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 20 deletions.
14 changes: 9 additions & 5 deletions README.md
Expand Up @@ -11,18 +11,22 @@ Before we can actually build the boxes, we need to take care of the minimal thin
People have reported good experiences, why don't you give it a try?

## Installation:
__from source__
__as a gem__
<pre>
$ gem install veewee
</pre>

__from source__
<pre>
$ git clone https://github.com/jedi4ever/veewee.git
$ cd veewee
$ gem install bundler
$ bundle install

# If you don't use rvm, be sure to execute vagrant through bundle exec
$ alias vagrant="bundle exec vagrant"
</pre>
__as a gem__
<pre>
$ gem install veewee
</pre>


## List all templates
<pre>
Expand Down
21 changes: 17 additions & 4 deletions lib/veewee/session.rb
Expand Up @@ -149,16 +149,29 @@ def self.verify_iso(filename,autodownload = false)
puts
puts "Verifying the isofile #{filename} is ok."
else

full_path=File.join(@iso_dir,filename)
path1=Pathname.new(full_path)
path2=Pathname.new(Dir.pwd)
rel_path=path1.relative_path_from(path2).to_s

puts
puts "We did not find an isofile in <currentdir>/iso. The definition provided the following download information:"
puts "- Download url: #{@definition[:iso_src]}"
puts "We did not find an isofile in <currentdir>/iso. \n\nThe definition provided the following download information:"
unless "#{@definition[:iso_src]}"==""
puts "- Download url: #{@definition[:iso_src]}"
end
puts "- Md5 Checksum: #{@definition[:iso_md5]}"
puts ""
puts "#{@definition[:iso_download_instructions]}"
puts

if @definition[:iso_src] == ""
puts "Please follow the instructions above:"
puts "- to get the ISO"
puts" - put it in <currentdir>/iso"
puts "- then re-run the command"
puts
exit
else

question=ask("Download? (Yes/No)") {|q| q.default="No"}
if question.downcase == "yes"
Expand All @@ -176,7 +189,7 @@ def self.verify_iso(filename,autodownload = false)
exit
end


end
end

end
Expand Down
5 changes: 5 additions & 0 deletions templates/solaris-11-express-i386/definition.rb
Expand Up @@ -5,6 +5,11 @@
:os_type_id => 'OpenSolaris',
:iso_file => "sol-11-exp-201011-ai-x86.iso",
:iso_src => "",
:iso_download_instructions => "- You need to download this manually as there is no automated way to do it\n"+
"http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html\n"+
"\n"+
"- The version tested is 2010.11\n"+
"- For other version: changed the iso filename+checksum\n",
:iso_md5 => "36527d4d49a645ef6f6d2677c8e0118c",
:iso_download_timeout => 1000,
:boot_wait => "10", :boot_cmd_sequence => [
Expand Down
24 changes: 13 additions & 11 deletions templates/solaris-11-express-i386/postinstall.sh
Expand Up @@ -12,32 +12,32 @@ yes|/usr/sbin/pkgadd -d http://mirror.opencsw.org/opencsw/pkgutil-`uname -p`.pkg
/usr/bin/pkg install SUNWarc SUNWsfwhea SUNWhea SUNWtoo
/usr/bin/pkg install math/header-math

yes|/opt/csw/bin/pkgutil -i CSWgsed
yes|/opt/csw/bin/pkgutil -i CSWruby18-gcc4
yes|/opt/csw/bin/pkgutil -i CSWruby18-dev
yes|/opt/csw/bin/pkgutil -i CSWrubygems
/opt/csw/bin/pkgutil -y -i CSWgsed
/opt/csw/bin/pkgutil -y -i CSWruby18-gcc4
/opt/csw/bin/pkgutil -y -i CSWruby18-dev
/opt/csw/bin/pkgutil -y -i CSWrubygems

# These are needed to get a compiler working
# Mainly because chef depends on compiling some native gems
export PATH=/opt/csw/bin/:$PATH
export PATH=/opt/csw/gcc4/bin/:$PATH

yes | /opt/csw/bin/pkgutil -i CSWgcc4core
/opt/csw/bin/pkgutil -y -i CSWgcc4core


yes | /opt/csw/bin/pkgutil -i CSWgcc4g++
yes | /opt/csw/bin/pkgutil -i CSWreadline
yes | /opt/csw/bin/pkgutil -i CSWzlib
yes | /opt/csw/bin/pkgutil -i CSWossldevel
/opt/csw/bin/pkgutil -y -i CSWgcc4g++
/opt/csw/bin/pkgutil -y -i CSWreadline
/opt/csw/bin/pkgutil -y -i CSWzlib
/opt/csw/bin/pkgutil -y -i CSWossldevel

# prevents ":in `require': no such file to load -- mkmf (LoadError)"
# yes|/opt/csw/bin/pkgutil -i CSWruby
# used SUNWspro
# has entries in /opt/csw/lib/ruby/1.8/i386-solaris2.9/rbconfig.rb
# luckily there is another one
# For some reason these don't get installed ok, we need to give them a slight kick again
yes | /opt/csw/bin/pkgutil -i CSWgcc4core
yes|/opt/csw/bin/pkgutil -i CSWruby18-gcc4
/opt/csw/bin/pkgutil -y -i CSWgcc4core
/opt/csw/bin/pkgutil -y -i CSWruby18-gcc4

# no solaris2.11 .... mkheaders here ! needs some fixing ??
# /opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.10/4.3.3/install-tools/mkheaders
Expand Down Expand Up @@ -69,6 +69,8 @@ yes|/usr/sbin/pkgadd -d . SUNWvbox
echo "export PATH=/opt/csw/bin:/opt/csw/sbin/:$PATH" >> /root/.profile
echo "export PATH=/opt/csw/bin:/opt/csw/sbin/:$PATH" >> /export/home/vagrant/.profile

puts "Note: validation of this box wil fail, as it's not linux based, working on that"

exit

#Inspiration for ruby enterprise
Expand Down

0 comments on commit 4901199

Please sign in to comment.