厨师WebPI菜谱无法安装在Azure中

问题描述:

我使用Chef插件在Azure中设置了一个新的Win2012虚拟机,并将其连接到manage.chef.io。增加了一本使用WebPi食谱来安装ServiceBus及其依赖项的食谱。安装失败,出现以下错误:厨师WebPI菜谱无法安装在Azure中

“Error opening installation log file. Verify that the specified log file location exists and is writable.” 

经过一番搜索,它看起来像这不是在此基础上2013的博客文章,Azure的新 - https://nemetht.wordpress.com/2013/02/27/web-platform-installer-in-windows-azure-startup-tasks/

它提供了一个劈禁用安全的文件夹上暂时但我正在寻找更好的解决方案。

任何想法?

更多的日志输出 - (!感谢布莱恩)

Started installing: 'Microsoft Windows Fabric V1 RTM' 

. 

Install completed (Failure): 'Microsoft Windows Fabric V1 RTM' 

. 

WindowsFabric_1_0_960_0 : Failed. 
Error opening installation log file. Verify that the specified log file location exists and is writable. 


DependencyFailed: Microsoft Windows Fabric V1 CU1 


DependencyFailed: Windows Azure Pack: Service Bus 1.1 

. 
.. 




Verifying successful installation... 


Microsoft Visual C++ 2012 SP1 Redistributable Package (x64) True 


Microsoft Windows Fabric V1 RTM     False 


    Log Location: C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Web Platform Installer\logs\install\2015-05-11T14.15.51\WindowsFabric.txt 


Microsoft Windows Fabric V1 CU1     False 


Windows Azure Pack: Service Bus 1.1    False 


Install of Products: FAILURE 
STDERR: 
---- End output of "WebpiCmd.exe" /Install /products:ServiceBus_1_1 /suppressreboot /accepteula /Log:c:/chef/cache/WebPI.log ---- 
Ran "WebpiCmd.exe" /Install /products:ServiceBus_1_1 /suppressreboot /accepteula /Log:c:/chef/cache/WebPI.log returned -1 
+0

我可以获得厨师客户端运行的完整输出吗? (另外,如果chef-client在info或debug模式下运行,可以通过chef-client -l switch或通过设置client.rb中的log_level来运行) –

+0

在原始问题中添加了更多日志。在进一步测试中,我还注意到,如果我登录到VM并手动运行chef-client,则安装将正常工作。我假设它是作为我(管理员帐户)而不是系统帐户运行的,并且我有权访问日志文件夹/文件。 – chief7

+0

嗨,我看了一下(https://github.com/opscode-cookbooks/webpi)食谱,我需要一些额外的疑难解答信息。您能否提供以下内容:(*)发布节点的完整run_list,(*)您正在运行的配方的上下文,(*)您用来设置webpi的烹饪书的链接。另外,你如何运行厨师客户端 - 通过测试厨房,或通过定时器,流浪者或其他方式的厨师客户食谱?最后,你可以发布chef-client run的完整输出,并且包含失败的Stacktrace。 –

厨师的接触帮助我理解这个问题更好。某些WebPI软件包不尊重提供给WebPIcmd.exe的显式日志路径。作者应该修复该包以在设置时使用提供的日志路径。所以选项变成了:

  • 纷纷撰文修复包
  • 运行厨师在一个新的计划任务为不同的用户,其具有AppData文件夹
  • 编辑食谱访问 执行/ unperform一个注册表编辑将AppData文件夹临时移动到系统 用户有权访问的位置。无论是在我的自定义食谱或分叉WebPI 食谱。

显然,等待作者(在这种情况下,微软)修复软件包不会很快发生。

更改Azure虚拟机的运行方式考虑到整体思路是在配置时提供配置并且它正常工作,Chef没有任何意义。另外,更改默认设置可能会产生意想不到的后果,并将我们置于非标准环境中。

在短期内,我决定在我的自定义食谱中更改注册表。

registry_key 'HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' do 
    values [{ 
     :name => "Local AppData", 
     :type => :expand_string, 
     :data => "%~dp0appdata" 
     }] 
     action :create 
end 
webpi_product 'ServiceBus_1_1' do 
    accept_eula true 
    action :install 
end 
webpi_product 'ServiceBus_1_1_CU1' do 
    accept_eula true 
    action :install 
end 
registry_key 'HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' do 
    values [{ 
     :name => "Local AppData", 
     :type => :expand_string, 
     :data => '%%USERPROFILE%%\AppData\Local' 
     }] 
end 

这个改变也可以在WebPI食谱中完成,也可以解决所有相关食谱中的这个问题。我决定不采取这种行动,直到WebPI团队响应该框架的功能请求来验证软件包是否遵守日志路径。

http://forums.iis.net/t/1225061.aspx?WebPI+Feature+Request+Validate+product+package+log+path+usage

请去回复此线程试图让球队以帮助抵御这个共同的封装问题。

+0

谢谢。我遇到了与AWS OpsWork相同的问题。这真的很有帮助。这是一个耻辱*实施这样的黑客,但我们还能做什么:( –