test-kitchen com o Windows guest convergente falha com WinRMAuthorizationError

2

Estou tentando fazer o teste de cozinha funcionar com uma VM guest do Windows. Eu segui muitos dos excelentes posts de Matt Wrock. Eu configurei uma caixa de trabalho do Windows Vagrant , usou o ram de teste-cozinha e cozinha-vagrant direita e conseguiram fazer com que kitchen create funcione.

Neste ponto, estou empenhado em fazer com que kitchen converge funcione. Eu vou fazer um converge e topar com:

$ kitchen converge
-----> Starting Kitchen (v1.3.2.dev)
-----> Converging <default-windows-7>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 3.1.3...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [[Kitchen::Transport::Winrm] WinRM::WinRMAuthorizationError using shell: [powershell] and command: [ $ProgressPreference='SilentlyContinue';   if (-Not (Test-Path "/tmp/kitchen")) {
    mkdir "/tmp/kitchen" | Out-Null
  }
if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' };
  if (-Not (Test-Path "/tmp/kitchen")) {
    mkdir "/tmp/kitchen" | Out-Null
  }
if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' };
  if (-Not (Test-Path "/tmp/kitchen")) {
    mkdir "/tmp/kitchen" | Out-Null
  }
if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' };
  if (-Not (Test-Path "/tmp/kitchen")) {
    mkdir "/tmp/kitchen" | Out-Null
  }
if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' };
  if (-Not (Test-Path "/tmp/kitchen")) {
    mkdir "/tmp/kitchen" | Out-Null
  }
if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' };
  if (-Not (Test-Path "/tmp/kitchen")) {
    mkdir "/tmp/kitchen" | Out-Null
  }
if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' };]]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running 'kitchen diagnose --all' for configuration

Neste ponto, estou perdido, posso executar vagrant up e fazer com que o provisionador de shell crie um arquivo, para que as permissões do powershell pareçam estar definidas corretamente. Eu tenho mais detalhes com todos os arquivos de configuração em uma essência .

    
por Arthur Maltson 03.02.2015 / 21:19

2 respostas

1

As ramificações para suporte do Windows foram mescladas recentemente na versão mais recente. Meu Gemfile (abaixo) apontando para testar o branch master de ambas as tarefas test-kitchen e kitchen-vagrant para mim. Espero que também funcione para você.

PS: Finalmente assinei após anos de uso e esta é minha primeira resposta: -)

source 'https://rubygems.org'

group :development do
  gem "test-kitchen", :git => 'https://github.com/test-kitchen/test-kitchen.git', :branch => 'master'
  gem 'kitchen-vagrant', git: 'https://github.com/test-kitchen/kitchen-vagrant.git', :branch => 'master'
  gem "berkshelf"
  gem "vagrant-wrapper", ">= 2.0"
end
    
por 25.03.2015 / 22:30
0

Eu encontrei exatamente o mesmo problema. cozinha criar funcionou bem, mas convergem falhou com esse erro. Eu estava executando a versão 1.7.2 do Vagrant. Eu rebaixei para o Vagrant 1.6.3 e isso pareceu resolver o problema.

    
por 07.03.2015 / 00:55