0

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

在我的 Windows 主机上安装了 gem: 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"`
4

1 回答 1

0

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

  • ChefDK 路径 -C:\opscode\chefdk\embedded\bin\ruby.exe
  • 厨师客户路径 -C:\opscode\chef\embedded\bin\ruby.exe
于 2016-03-06T06:50:58.860 回答