RandomNoun7 / pdk_test

0 stars 0 forks source link

kitchen-puppet does not install puppet #1

Open RandomNoun7 opened 6 years ago

RandomNoun7 commented 6 years ago

Currently when running bundle exec kitchen converge the required manifests are copied to the vagrant machine, but puppet is not actually installed. Then when the runner attempts to execute the converge, there is no puppet install to execute, and it failed. To find this output, rather than just a non-descript silent failure, run bundle exec kitchen converge -l debug.

The relevant output is below at the very end of the converge run:

D      [WinRM] Command created for

             & "C:\Program Files\Puppet Labs\Puppet\bin\puppet" apply $env:TEMP\kitchen/manifests/ --modulepath=$env:TEMP\kitchen/modules --fileserverconfig=$env:TEMP\kitchen/fileserver.conf       -v -d    ; exit $LASTEXITCODE

if (!$?) { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } } with id: 4154EF44-0667-4ABE-8ACC-431012C244AF
D      [WinRM] creating command_id: 4154EF44-0667-4ABE-8ACC-431012C244AF on shell_id ABF9EA2D-609D-4C45-AA7B-5A40FE34BA16
D      [WinRM] Waiting for output...
D      [WinRM] Processing output
D      [WinRM] cleaning up command_id: 4154EF44-0667-4ABE-8ACC-431012C244AF on shell_id ABF9EA2D-609D-4C45-AA7B-5A40FE34BA16
$$$$$$ The term 'C:\Program Files\Puppet Labs\Puppet\bin\puppet' 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:3 char:16
$$$$$$ + ...            & "C:\Program Files\Puppet Labs\Puppet\bin\puppet" apply $ ...
$$$$$$ +                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Program File...ppet\bin\puppet:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Opening a PowerShell session into the vagrant box confirms that no Puppet Labs directory exists in c:\Program Files

michaeltlombardi commented 6 years ago

Should we manage this via a bolt task or something, or is this something the kitchen plugin needs to be updated to handle?

RandomNoun7 commented 6 years ago

I think other examples imply or should already know how to do this. I haven't conclusively ruled out user error. But if it genuinely can't do this on Windows it may be a bug that deserves fixing.

michaeltlombardi commented 6 years ago

Looking at the repo, the examples all use puppetlabs-supplied images, which have the agent pre-installed.

RandomNoun7 commented 6 years ago

insuspect you’re right. I had that suspicion earlier and tried downloading one and checking and it didn’t, but I probably just checked the wrong box. We’ll have to work around that.