@rem @rem Author:: Seth Chisamore () @rem Copyright:: Copyright (c) 2011 Opscode, Inc. @rem License:: Apache License, Version 2.0 @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem <%= "SETX HTTP_PROXY \"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] %> mkdir C:\chef > C:\chef\wget.vbs ( <%= win_wget %> ) cscript /nologo C:\chef\wget.vbs /url:http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/rubyinstaller-1.8.7-p334.exe /path:%TEMP%\rubyinstaller.exe %TEMP%\rubyinstaller.exe /verysilent /dir="C:\ruby" /tasks="assocfiles,modpath" @rem Install the Ruby Dev Kit so we compile us some native gems cscript /nologo C:\chef\wget.vbs /url:http://cloud.github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe /path:%TEMP%\rubydevkit.exe mkdir C:\DevKit copy %TEMP%\rubydevkit.exe C:\DevKit cmd.exe /C C:\DevKit\rubydevkit.exe -y cmd.exe /C C:\ruby\bin\ruby c:/DevKit/dk.rb init cmd.exe /C C:\ruby\bin\ruby c:/DevKit/dk.rb install cmd.exe /C C:\ruby\bin\gem install win32-open3 rdp-ruby-wmi windows-api windows-pr --no-rdoc --no-ri --verbose @rem Install Chef gems separately to prevent 'failed to allocate memory' errors cmd.exe /C C:\ruby\bin\gem install ohai --no-rdoc --no-ri --verbose cmd.exe /C C:\ruby\bin\gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %> > C:\chef\validation.pem ( <%= validation_key %> ) <% if @config[:encrypted_data_bag_secret] -%> > C:\chef\encrypted_data_bag_secret ( <%= encrypted_data_bag_secret %> ) <% end -%> > C:\chef\client.rb ( echo.require 'win32ole' echo.WIN32OLE.codepage = WIN32OLE::CP_UTF8 <%= config_content %> ) > C:\chef\first-boot.json ( <%= run_list %> ) <%= start_chef %>