Comments (7)
The docker flag --isolation=process should be run to allow the transport to work by default on W10 systems.
from kitchen-docker.
@nanolonny I'm still trying to get an environment set up to test this on my machine, but would you mind testing the code in PR #351? You'll need the following driver configuration in your kitchen.yml file:
driver:
name: docker
isolation: process
or use the following for Hyper-V:
driver:
name: docker
isolation: hyperv
from kitchen-docker.
@jeffreycoe Working for me. I appreciate it. I tested on a Windows 10 1809 system and I changed the isolation mode to process.
PS C:\Users\nanolonny\chef\blah> kitchen test
-----> Starting Kitchen (v2.3.3)
-----> Cleaning up any prior instances of <default-windows>
-----> Destroying <default-windows>...
[Docker] Destroying Docker container 0a94e1aac8b6be7adae02d5c111afd3ff867c26a573a2aaabd681292637630f3
Name PID CPU Private Working Set
smss.exe 10028 00:00:00.125 245.8kB
csrss.exe 3844 00:00:00.375 876.5kB
wininit.exe 7188 00:00:00.109 966.7kB
services.exe 4996 00:00:00.671 2.179MB
lsass.exe 5444 00:00:00.750 3.867MB
fontdrvhost.exe 9912 00:00:00.078 1.02MB
svchost.exe 2352 00:00:00.343 2.245MB
svchost.exe 3296 00:00:00.312 1.905MB
svchost.exe 8012 00:00:00.187 1.434MB
svchost.exe 10068 00:00:00.109 2.261MB
svchost.exe 8960 00:00:02.203 7.549MB
svchost.exe 10516 00:00:03.218 2.798MB
svchost.exe 10336 00:00:11.218 16.05MB
svchost.exe 8856 00:00:00.093 1.294MB
svchost.exe 9536 00:00:00.046 1.282MB
svchost.exe 1452 00:00:00.015 1.028MB
CExecSvc.exe 10556 00:00:00.296 868.4kB
svchost.exe 5392 00:00:00.031 614.4kB
svchost.exe 6544 00:00:00.828 6.504MB
PING.EXE 6964 00:00:00.062 577.5kB
CompatTelRunner.exe 5764 00:00:00.015 565.2kB
conhost.exe 11048 00:00:00.015 1.016MB
svchost.exe 10296 00:00:00.765 3.31MB
msiexec.exe 6464 00:00:05.531 2.609MB
svchost.exe 8812 00:00:00.156 974.8kB
svchost.exe 10508 00:00:00.046 925.7kB
WmiPrvSE.exe 1344 00:00:02.015 6.332MB
WmiPrvSE.exe 4080 00:00:00.250 2.839MB
0a94e1aac8b6be7adae02d5c111afd3ff867c26a573a2aaabd681292637630f3
0a94e1aac8b6be7adae02d5c111afd3ff867c26a573a2aaabd681292637630f3
Finished destroying <default-windows> (0m10.51s).
-----> Testing <default-windows>
-----> Creating <default-windows>...
Sending build context to Docker daemon 2.048kB
Step 1/1 : FROM mcr.microsoft.com/windows:1809
---> 57519a5da87b
Successfully built 57519a5da87b
9ff80b55e2e577a861cb048a234337cb046cf19332f7518920e405b759d27768
Finished creating <default-windows> (0m9.45s).
-----> Converging <default-windows>...
Preparing files for transfer
Installing cookbooks for Policyfile C:/Users/nanolonny/chef/blah/Policyfile.rb using `chef install`
Installing cookbooks from lock
Installing blah 0.1.0
Preparing dna.json
Exporting cookbook dependencies from Policyfile C:/Users/nanolonny/AppData/Local/Temp/default-windows-sandbox-20191029-8828-vrb63e...
Exported policy 'blah' to C:/Users/nanolonny/AppData/Local/Temp/default-windows-sandbox-20191029-8828-vrb63e
To converge this system with the exported policy, run:
cd C:/Users/nanolonny/AppData/Local/Temp/default-windows-sandbox-20191029-8828-vrb63e
chef-client -z
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
[Docker] Executing command on container
Exception setting "OutputEncoding": "The request is not supported.
"
At C:\Users\ContainerAdministrator\AppData\Local\Temp\docker-77ee4822-231c-4528
-a5dd-afc10ad3ca3e.ps1:1 char:1
+ [Console]::OutputEncoding = New-Object -typename System.Text.ASCIIEnc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SetValueInvocationExceptio
n
+ FullyQualifiedErrorId : ExceptionWhenSetting
-----> Installing Chef install only if missing package
Get-Item : Cannot find path 'C:\Users\ContainerAdministrator\AppData\Local\Temp
\chef-client-15.4.45-1-x64.msi' because it does not exist.
At C:\Users\ContainerAdministrator\AppData\Local\Temp\docker-77ee4822-231c-4528
-a5dd-afc10ad3ca3e.ps1:214 char:37
+ $bytes = $c.ComputeHash(($in = (Get-Item $src).OpenRead()))
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Contai....4.45-1-x64.m
si:String) [Get-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetIt
emCommand
You cannot call a method on a null-valued expression.
At C:\Users\ContainerAdministrator\AppData\Local\Temp\docker-77ee4822-231c-4528
-a5dd-afc10ad3ca3e.ps1:214 char:30
+ $bytes = $c.ComputeHash(($in = (Get-Item $src).OpenRead()))
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Downloading package from https://packages.chef.io/files/stable/chef/15.4.45/windows/2019/chef-client-15.4.45-1-x64.msi
Download complete.
Successfully verified C:\Users\ContainerAdministrator\AppData\Local\Temp\chef-client-15.4.45-1-x64.msi
Installing Chef package C:\Users\ContainerAdministrator\AppData\Local\Temp\chef-client-15.4.45-1-x64.msi
Installation complete
[Docker] Executing command on container
Transferring files to <default-windows>
[Docker] Executing command on container
+---------------------------------------------+
✔ 2 product licenses accepted.
+---------------------------------------------+
Starting Chef Infra Client, version 15.4.45
[2019-10-29T11:13:22+00:00] WARN: Plugin Network: unable to detect ipaddress
Creating a new client identity for default-windows using the validator key.
Using policy 'blah' at revision 'e07b736297a74858b690dccb8bf4cf9f31572e61269f6c6b9ae68353fb3af499'
resolving cookbooks for run list: ["blah::[email protected] (59f0fd2)"]
Synchronizing Cookbooks:
- blah (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 1 resources
Recipe: blah::default
* directory[c:\blah] action create
- create new directory c:\blah
Running handlers:
Running handlers complete
Chef Infra Client finished, 1/1 resources updated in 07 seconds
Downloading files from <default-windows>
Finished converging <default-windows> (5m23.52s).
-----> Setting up <default-windows>...
Finished setting up <default-windows> (0m0.00s).
-----> Verifying <default-windows>...
Preparing files for transfer
Transferring files to <default-windows>
Finished verifying <default-windows> (0m0.01s).
-----> Destroying <default-windows>...
[Docker] Destroying Docker container 9ff80b55e2e577a861cb048a234337cb046cf19332f7518920e405b759d27768
Name PID CPU Private Working Set
smss.exe 3124 00:00:00.171 229.4kB
csrss.exe 2704 00:00:00.484 962.6kB
wininit.exe 11004 00:00:00.031 1.044MB
services.exe 5000 00:00:00.812 2.29MB
lsass.exe 2348 00:00:00.515 4.018MB
fontdrvhost.exe 4952 00:00:00.031 1.057MB
svchost.exe 7908 00:00:00.265 2.306MB
svchost.exe 10832 00:00:00.406 1.966MB
svchost.exe 10664 00:00:00.203 1.356MB
svchost.exe 9668 00:00:00.140 2.138MB
svchost.exe 4876 00:00:01.921 8.765MB
svchost.exe 9472 00:00:03.500 3.023MB
svchost.exe 4428 00:00:10.453 16.71MB
svchost.exe 10048 00:00:00.125 2.572MB
svchost.exe 9608 00:00:00.046 1.335MB
svchost.exe 3692 00:00:00.046 1.069MB
CExecSvc.exe 9044 00:00:00.406 897kB
svchost.exe 8456 00:00:00.015 548.9kB
svchost.exe 9020 00:00:00.937 6.398MB
PING.EXE 3948 00:00:00.046 614.4kB
CompatTelRunner.exe 7004 00:00:00.015 585.7kB
conhost.exe 1320 00:00:00.062 1.126MB
svchost.exe 7356 00:00:00.765 3.293MB
msiexec.exe 1984 00:00:05.609 2.822MB
svchost.exe 7208 00:00:00.109 868.4kB
svchost.exe 6272 00:00:00.031 843.8kB
WmiPrvSE.exe 11124 00:00:01.953 5.841MB
WMIADAP.exe 10824 00:00:00.109 1.102MB
spoolsv.exe 4992 00:00:00.031 999.4kB
WmiPrvSE.exe 10152 00:00:00.203 3.518MB
9ff80b55e2e577a861cb048a234337cb046cf19332f7518920e405b759d27768
9ff80b55e2e577a861cb048a234337cb046cf19332f7518920e405b759d27768
Finished destroying <default-windows> (0m9.58s).
Finished testing <default-windows> (5m53.35s).
-----> Kitchen is finished. (6m0.01s)
PS C:\Users\nanolonny\chef\blah>
from kitchen-docker.
@nanolonny Awesome, great to hear. 👍 I'll see if we can get this PR merged and a gem released soon.
from kitchen-docker.
#351 is working for me to get past hyperv isolation on Windows 10. Appreciated.
from kitchen-docker.
@nanolonny @magruder85 PR #351 has been merged to master, so we'll work on getting this fix included in the next release.
from kitchen-docker.
While using process isolation does indeed work, the default is still hyperv, which doesn't.
There should probably be a note that the docker
transport only works in Windows in process isolation mode (though test-kitchen/test-kitchen#1699 indicates that WinRM doesn't actually work then either at the moment).
from kitchen-docker.
Related Issues (20)
- chef-client cookbook now fails with this driver HOT 1
- Gem v2.9.0 doesn't include the docker transport HOT 6
- Unable to fetch packages during kitchen create for ubuntu-14.04 platform HOT 1
- Message: Error getting internal IP of Docker container HOT 4
- Docker images deletions fails when instances share the same image ID
- There does not appear to be a way to clean up volumes created by kitchen-docker HOT 4
- dependency roles in requirements.yml installed successfully, but error role not found when running test playbook. HOT 1
- Create new release of kitchen-docker gem HOT 5
- kitchen-docker 2.10.0 doesn't work, at least not docker-in-docker HOT 16
- This seems to be fixed, does it still need to be here?
- Unable to use docker as transport HOT 10
- docker build output no longer matches image_helper regex HOT 1
- Unable to map docker.sock in as volume for docker-in-docker HOT 2
- Cannot use docker transport when using docker tmpfs on /tmp
- Docker build on M1 Mac can fail if the buildkit output includes timings/timestamps HOT 8
- Support for Centosstream and PhotonOS missing from kitchen-docker HOT 1
- SSH failed with Ubuntu 22 and Centos 9 HOT 2
- Amazon 2022 images fail to build due to conflict between curl packages HOT 6
- Waiting for SSH service on localhost:49714, retrying in 3 seconds HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kitchen-docker.