在Windows上的测试厨房错误中安装busser-serverspec插件

时间:2016-03-05 05:30:18

标签: windows test-kitchen serverspec

kitchen verify命令将在Windows平台上抛出以下内容。我不知道哪个gem开始调试来解决这个问题。

我的Windows主机上已安装的宝石: kitchen-pester (0.4.0) kitchen-salt (0.0.22) kitchen-vagrant (0.19.0) test-kitchen (1.5.0) winrm (1.6.0) winrm-s (0.3.4) winrm-transport (1.0.3)

C:\kitchen-salt-tutorial\beaver-formula>kitchen verify default
-----> Starting Kitchen (v1.5.0)
-----> Verifying <default-windows-2012r2>...
       Preparing files for transfer
       Installing Busser plugins: busser-serverspec

$$$$$$ &amp; : The term 'C:\opscode\chef\embedded\bin\ruby.exe' is not recognized as the
$$$$$$ name of a cmdlet, function, script file, or operable program. Check the
$$$$$$ spelling of the name, or if a path was included, verify that the path is
$$$$$$ correct and try again.
$$$$$$ At line:13 char:8
$$$$$$ + if ((&amp; "$ruby" "$gem" list busser -i) -ne "true") {
$$$$$$ +        ~~~~~~~
$$$$$$     + CategoryInfo          : ObjectNotFound: (C:\opscode\chef\embedded\bin\ru
$$$$$$    by.exe:String) [], CommandNotFoundException
$$$$$$     + FullyQualifiedErrorId : CommandNotFoundException
$$$$$$
$$$$$$ &amp; : The term 'C:\opscode\chef\embedded\bin\ruby.exe' is not recognized as the
$$$$$$ name of a cmdlet, function, script file, or operable program. Check the
$$$$$$ spelling of the name, or if a path was included, verify that the path is
$$$$$$ correct and try again.
$$$$$$ At line:21 char:19
$$$$$$ +   $gem_bindir = &amp; "$ruby" -rrubygems -e "puts Gem.bindir.dup.gsub('/', '\\')"
$$$$$$ +                   ~~~~~~~
$$$$$$     + CategoryInfo          : ObjectNotFound: (C:\opscode\chef\embedded\bin\ru
$$$$$$    by.exe:String) [], CommandNotFoundException
$$$$$$     + FullyQualifiedErrorId : CommandNotFoundException
$$$$$$
$$$$$$ &amp; : The term 'C:\opscode\chef\embedded\bin\ruby.exe' is not recognized as the
$$$$$$ name of a cmdlet, function, script file, or operable program. Check the
$$$$$$ spelling of the name, or if a path was included, verify that the path is
$$$$$$ correct and try again.
$$$$$$ At line:22 char:5
$$$$$$ +   &amp; "$ruby" "$gem_bindir\busser" setup --type bat 2&gt;&amp;1
$$$$$$ +     ~~~~~~~
$$$$$$     + CategoryInfo          : ObjectNotFound: (C:\opscode\chef\embedded\bin\ru
$$$$$$    by.exe:String) [], CommandNotFoundException
$$$$$$     + FullyQualifiedErrorId : CommandNotFoundException
$$$$$$
$$$$$$ &amp; : The term 'C:\Users\vagrant\AppData\Local\Temp\verifier\bin\busser.bat' is
$$$$$$ not recognized as the name of a cmdlet, function, script file, or operable
$$$$$$ program. Check the spelling of the name, or if a path was included, verify
$$$$$$ that the path is correct and try again.
$$$$$$ At line:26 char:3
$$$$$$ + &amp; "$busser" plugin install $plugins.Split() 2&gt;&amp;1
$$$$$$ +   ~~~~~~~~~
$$$$$$     + CategoryInfo          : ObjectNotFound: (C:\Users\vagran...\bin\busser.b
$$$$$$    at:String) [], CommandNotFoundException
$$$$$$     + FullyQualifiedErrorId : CommandNotFoundException
>>>>>> Verify failed on instance <default-windows-2012r2>.
>>>>>> Please see .kitchen/logs/default-windows-2012r2.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: WinRM exited (1) for command: [
$env:BUSSER_ROOT = "$env:TEMP\verifier"
$env:GEM_HOME = "$env:TEMP\verifier\gems"
$env:GEM_PATH = "$env:TEMP\verifier\gems"
$env:GEM_CACHE = "$env:TEMP\verifier\gems\cache"
$ruby = "$env:systemdrive\opscode\chef\embedded\bin\ruby.exe"
$gem = "$env:systemdrive\opscode\chef\embedded\bin\gem"
$version = "busser"
$gem_install_args = "busser --no-rdoc --no-ri --no-format-executable -n $env:TEMP\verifier\bin --no-user-install"
$busser = "$env:TEMP\verifier\bin\busser.bat"
$plugins = "busser-serverspec"`

1 个答案:

答案 0 :(得分:0)

这是因为在收敛期间尝试安装chefdk而不是chef-client。记录chef_omnibus_url here的选项说明它不是综合安装程序,而是厨师 - 客户。

  • ChefDK路径 - C:\opscode\chefdk\embedded\bin\ruby.exe
  • 厨师客户路径 - C:\opscode\chef\embedded\bin\ruby.exe