Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BENTO-17 passes validation for windows 7 and 2008R2 #15

Merged
merged 11 commits into from
Jan 28, 2013
Merged
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ bin/
.bundle/
iso/
*.box
virtualfloppy.vfd
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source :rubygems

gem "vagrant", "~> 1.0.3"
gem "veewee", ">= 0.3.0.alpha"
gem "vagrant", "~> 1.0.5"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do "~> 1.0" here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds fine there

gem "veewee", ">= 0.3.7"
gem "em-winrm" # for windows!
gem "rake"
118 changes: 86 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,63 +1,105 @@
GEM
remote: http://rubygems.org/
specs:
CFPropertyList (2.1.1)
CFPropertyList (2.0.17)
libxml-ruby (>= 1.1.0)
rake (>= 0.7.0)
Platform (0.4.0)
akami (1.2.0)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
ansi (1.3.0)
archive-tar-minitar (0.5.2)
builder (3.0.0)
childprocess (0.3.3)
ffi (~> 1.0.6)
builder (3.1.4)
childprocess (0.3.6)
ffi (~> 1.0, >= 1.0.6)
cucumber (1.2.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0)
json (>= 1.4.6)
diff-lcs (1.1.3)
em-winrm (0.5.4)
eventmachine (= 1.0.0.beta.3)
mixlib-log (>= 1.3.0)
uuidtools (~> 2.1.1)
winrm (~> 1.1.0)
erubis (2.7.0)
excon (0.9.6)
ffi (1.0.11)
fog (1.1.2)
eventmachine (1.0.0.beta.3)
excon (0.16.10)
ffi (1.3.1)
fission (0.4.0)
CFPropertyList (~> 2.0.17)
fog (1.9.0)
builder
excon (~> 0.9.0)
excon (~> 0.14)
formatador (~> 0.2.0)
mime-types
multi_json (~> 1.0.3)
multi_json (~> 1.0)
net-scp (~> 1.0.4)
net-ssh (>= 2.1.3)
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.3)
gherkin (2.11.1)
formatador (0.2.4)
gherkin (2.11.5)
json (>= 1.4.6)
highline (1.6.13)
i18n (0.6.0)
grit (2.5.0)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
gssapi (1.0.3)
ffi (>= 1.0.1)
gyoku (1.0.0)
builder (>= 2.1.2)
highline (1.6.15)
httpclient (2.2.0.2)
httpi (0.9.7)
rack
i18n (0.6.1)
json (1.5.4)
libxml-ruby (2.4.0)
little-plugger (1.1.3)
log4r (1.1.10)
logging (1.6.2)
little-plugger (>= 1.1.3)
mime-types (1.19)
multi_json (1.0.4)
mixlib-log (1.4.1)
multi_json (1.5.0)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.2.2)
nokogiri (1.5.5)
nokogiri (1.5.6)
nori (1.1.4)
open4 (1.3.0)
popen4 (0.1.2)
Platform (>= 0.4.0)
open4 (>= 0.4.0)
progressbar (0.11.0)
rake (0.9.2.2)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.0)
rspec-expectations (2.11.1)
posix-spawn (0.3.6)
progressbar (0.12.0)
rack (1.5.0)
rake (10.0.3)
rspec (2.12.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.1)
rspec-mocks (2.12.1)
ruby-hmac (0.4.0)
ruby-vnc (1.0.1)
thor (0.14.6)
vagrant (1.0.3)
rubyntlm (0.1.1)
savon (0.9.5)
akami (~> 1.0)
builder (>= 2.1.2)
gyoku (>= 0.4.0)
httpi (~> 0.9)
nokogiri (>= 1.4.0)
nori (~> 1.0)
wasabi (~> 1.0)
thor (0.16.0)
uuidtools (2.1.3)
vagrant (1.0.5)
archive-tar-minitar (= 0.5.2)
childprocess (~> 0.3.1)
erubis (~> 2.7.0)
Expand All @@ -66,26 +108,38 @@ GEM
log4r (~> 1.1.9)
net-scp (~> 1.0.4)
net-ssh (~> 2.2.2)
veewee (0.3.0.alpha9)
CFPropertyList (>= 2.1.1)
veewee (0.3.7)
ansi (~> 1.3.0)
childprocess
cucumber (>= 1.0.0)
fog (~> 1.1.2)
fission (= 0.4.0)
fog (~> 1.8)
grit
highline
i18n
net-ssh (~> 2.2.0)
popen4 (~> 0.1.2)
progressbar
rspec (~> 2.5)
ruby-vnc (~> 1.0.0)
thor (~> 0.14.6)
thor (~> 0.15)
vagrant (>= 0.9)
wasabi (1.0.0)
nokogiri (>= 1.4.0)
winrm (1.1.2)
gssapi (~> 1.0.0)
httpclient (~> 2.2.0.2)
logging (~> 1.6.1)
nokogiri (~> 1.5.0)
rubyntlm (~> 0.1.1)
savon (= 0.9.5)
uuidtools (~> 2.1.2)

PLATFORMS
ruby

DEPENDENCIES
em-winrm
rake
vagrant (~> 1.0.3)
veewee (>= 0.3.0.alpha)
vagrant (~> 1.0.5)
veewee (>= 0.3.7)
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ filename, its source URL, and the MD5 checksum of the file.
* `sudoers.sh`: Customization for `/etc/sudoers`
* `update.sh`: Ensures that the OS installation is updated

## Windows

* `install-chef.bat`: Installs Chef and Ruby with
[Opscode's full stack installer](http://opscode.com/chef/install)
* `oracle-cert.cer`: Needed for automated install via install-vbox.bat
* `install-vbox.bat`: Installs VirtualBox Guest Additions
* `mount-validation.bat`: Mounts the validation drive

Bugs and Issues
===============

Expand All @@ -115,6 +123,7 @@ License and Authors
- Author:: Stephen Delano (<stephen@opscode.com>)
- Author:: Joshua Timberman (<joshua@opscode.com>)
- Author:: Tim Dysinger (<tim@dysinger.net>)
- Author:: Chris McClimans (<chris@hippiehacker.org>)

Copyright:: 2012, Opscode, Inc (<legal@opscode.com>)
Copyright:: 2011-2012, Tim Dysinger (<tim@dysinger.net>)
Expand Down
9 changes: 7 additions & 2 deletions definitions/.common/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
:disk_format => "VDI",
:disk_size => "40960",
:hostiocache => "off",
:ioapic => "on",
:iso_download_timeout => "1000",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again moved into new location. Because that is per virtualization technology, and the hope is that we can target more than just Virtualbox eventually.

:kickstart_port => "7122",
:kickstart_timeout => "10000",
:memory_size=> "384",
:pae => "on",
:postinstall_timeout => "10000",
:ssh_guest_port => "22",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was moved into https://github.com/hh/bento/blob/BENTO-17/definitions/.common/session.rb#L22 as the location of that config option changed.

:ssh_host_port => "7222",
Expand All @@ -18,4 +16,11 @@
:ssh_password => "vagrant",
:ssh_user => "vagrant",
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
:virtualbox => {
:vm_options => {
:ioapic => "on",
:pae => "on"
}
}

}
2 changes: 2 additions & 0 deletions definitions/.windows/install-chef.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cmd /C cscript %TEMP%\wget.vbs /url:http://www.opscode.com/chef/install.msi /path:%TEMP%\chef-client.msi
cmd /C msiexec /qn /i %TEMP%\chef-client.msi
6 changes: 6 additions & 0 deletions definitions/.windows/install-vbox.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# with this, we can open the iso, and extract the VBoxWindowsAdditions.exe!
# http://downloads.sourceforge.net/sevenzip/7z920.exe
cmd /c certutil -addstore -f "TrustedPublisher" a:oracle-cert.cer
cmd /c e:\VBoxWindowsAdditions-amd64.exe /S
cmd /c shutdown.exe /r /t 0 /d p:2:4 /c "Vagrant reboot for VBoxWindowsAdditions"

3 changes: 3 additions & 0 deletions definitions/.windows/mount-validation.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This is so we can pass the validation test
cmd /c net use z: \\vboxsrv\veewee-validation

Binary file added definitions/.windows/oracle-cert.cer
Binary file not shown.
21 changes: 21 additions & 0 deletions definitions/.windows/session.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require File.dirname(__FILE__) + "/../.common/session.rb"

WINDOWS_SESSION =
COMMON_SESSION.merge({ :boot_wait => "1",
:boot_cmd_sequence => [''],
:winrm_user => "vagrant",
:winrm_password => "vagrant",
:floppy_files => [
"Autounattend.xml",
"oracle-cert.cer"
],
:postinstall_files => [
"install-chef.bat",
"install-vbox.bat", # would be interesting to only include this on vbox
"mount-validation.bat" # maybe test if we are within a vbox vm?
# because this will eventually run on kvm, openstack, etc etc
],
:video_memory_size => '48',
:sudo_cmd => "%f",
:shutdown_cmd => "shutdown /s /t 10 /f /d p:4:1 /c \"Vagrant Shutdown\"" })

Loading