knife-windows 0.5.14.rc.0 → 0.5.14.rc.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -111,6 +111,7 @@ goto install
111
111
  <% url += "&v=#{@config[:bootstrap_version]}" if @config.key? :bootstrap_version -%>
112
112
  @set "REMOTE_SOURCE_MSI_URL=<%= url %>"
113
113
  @set "LOCAL_DESTINATION_MSI_PATH=<%= local_download_path %>"
114
+ @set "CHEF_CLIENT_MSI_LOG_PATH=%TEMP%\chef-client-msi%RANDOM%.log"
114
115
  @set "FALLBACK_QUERY_STRING=&DownloadContext=PowerShell"
115
116
 
116
117
  @rem Clear any pre-existing downloads
@@ -125,6 +126,9 @@ goto install
125
126
  echo No existing downloaded packages to delete.
126
127
  )
127
128
 
129
+ @rem If there's somehow a name collision, remove pre-existing log
130
+ @if EXIST "%CHEF_CLIENT_MSI_LOG_PATH%" del /f /q "%CHEF_CLIENT_MSI_LOG_PATH%"
131
+
128
132
  @echo Attempting to download client package using cscript...
129
133
  cscript /nologo <%= bootstrap_directory %>\wget.vbs /url:"%REMOTE_SOURCE_MSI_URL%" /path:"%LOCAL_DESTINATION_MSI_PATH%"
130
134
 
@@ -164,10 +168,18 @@ cscript /nologo <%= bootstrap_directory %>\wget.vbs /url:"%REMOTE_SOURCE_MSI_URL
164
168
  )
165
169
  )
166
170
 
167
- @echo Starting bootstrap with downloaded client package
171
+ @echo Installing downloaded client package...
168
172
 
169
173
  <%= install_chef %>
170
174
 
175
+ @if ERRORLEVEL 1 (
176
+ echo Chef-client package failed to install with status code !ERRORLEVEL!. > "&2"
177
+ echo See installation log for additional detail: %CHEF_CLIENT_MSI_LOG_PATH%. > "&2"
178
+ ) else (
179
+ @echo Installation completed successfully
180
+ del /f /q "%CHEF_CLIENT_MSI_LOG_PATH%"
181
+ )
182
+
171
183
  @endlocal
172
184
 
173
185
  @echo off
@@ -194,5 +206,6 @@ echo Validation key written.
194
206
  <%= first_boot %>
195
207
  )
196
208
 
209
+ @echo Starting chef to bootstrap the node...
197
210
  <%= start_chef %>
198
211
 
@@ -149,7 +149,7 @@ WGET_PS
149
149
  end
150
150
 
151
151
  def install_chef
152
- install_chef = 'msiexec /qn /i "%LOCAL_DESTINATION_MSI_PATH%"'
152
+ install_chef = 'msiexec /qn /log "%CHEF_CLIENT_MSI_LOG_PATH%" /i "%LOCAL_DESTINATION_MSI_PATH%"'
153
153
  end
154
154
 
155
155
  def bootstrap_directory
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Windows
3
- VERSION = "0.5.14.rc.0"
3
+ VERSION = "0.5.14.rc.1"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-windows
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.14.rc.0
4
+ version: 0.5.14.rc.1
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-29 00:00:00.000000000 Z
12
+ date: 2013-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: em-winrm
@@ -94,3 +94,4 @@ test_files:
94
94
  - spec/spec_helper.rb
95
95
  - spec/unit/knife/bootstrap_template_spec.rb
96
96
  - spec/unit/knife/winrm_spec.rb
97
+ has_rdoc: true