kitchen-ec2 | A Test Kitchen Driver for Amazon EC2 | AWS library
kandi X-RAY | kitchen-ec2 Summary
kandi X-RAY | kitchen-ec2 Summary
A Test Kitchen Driver for Amazon EC2.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kitchen-ec2
kitchen-ec2 Key Features
kitchen-ec2 Examples and Code Snippets
Community Discussions
Trending Discussions on kitchen-ec2
QUESTION
I am using the Kitchen EC2 driver for testing some Windows "base" cookbooks on Windows Server 2012R2, 2016, and 1803 AMIs from Amazon. I'm encountering what seems like a problem that happens after a specific duration of time while executing a recipe via Kitchen, as opposed to hitting a specific line of code.
At some point during the recipe converge it stops with a WinRM::WinRMAuthorizationError. If I rerun the converge it immediately boots me out with the same error. I've tried changing and moving resources in the recipe, and it seems like it isn't a problem with a specific part of the recipe, it just happens randomly and then continues to happen.
This started because I'm trying to remove our custom user-data script, and instead use the one that the Kitchen-EC2 driver generates. They are roughly the same, but they just do things in slightly different ways.
I'm planning to do more troubleshooting (this seems like a good resource) but given that I'm trying to use vanilla settings, I'm hoping I'm missing something obvious.
Relevant part of the .kitchen.yml
:
ANSWER
Answered 2019-Mar-19 at 13:05My best guess is this had to do with the AMI I was using, which was a CIS image.
More specifically, I think the userdata script did work for initial WinRM authorization. But some of the CIS AMI group policies that conflict with the winrm.cmd
commands in the userdata were possibly later applied and that killed the connection. My thought is that running gpupdate
later as part of the normal recipe was reapplying them.
I think running these commands these in userdata was what helped. It requires installing module that contains the Set-PolicyFileEntry
command.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kitchen-ec2
Install Chef Workstation. If testing things other than Chef Infra cookbooks, please consult your driver's documentation for information on what to install.
Install the AWS command line tools.
Run aws configure. This will set up your AWS credentials for both the AWS CLI tools and kitchen-ec2.
Add or edit the driver section of your kitchen.yml: driver: name: ec2
Run kitchen test.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page