Posts on Security, Cloud, DevOps, Citrix, VMware and others.
Words and views are my own and do not reflect on my companies views.
Disclaimer: some of the links on this site are affiliate links, if you click on them and make a purchase, I make a commission.
It often seems like every day brings about a new mission-critical business application to manage. Each of thesecritical systems needs special attention as you build out your infrastructure automation. No one wants to push out that "simple" configuration change that causes a business outage. Each and every change, no matter the size, needs full validation, but how can this be accomplished without slowing the business velocity?
Test Kitchen is an open source testing framework that tests cookbooks using Vagrant, Docker, VMware vSphere, or leading cloud providers. With Test Kitchen you can automate the validation of your complex infrastructure systems on local workstations during your development process as well as part of automated CI pipelines. This shifts the validation of systems as far left as possible, avoiding the need for costly manual validation in pre-production environments, or worse yet, validation in production.
Test Kitchen ispart of Chef Workstation and works in concert withChef InSpec letting you write complex tests for your infrastructure code with ease. With Chef InSpec you utilize the same test language, and even code, for your infrastructure tests as your security and compliance tests. This reduces the time necessary to test systems and time spent training employees on new testing frameworks.
Overview: Chef Infra Client and Test Kitchen Infrastructure Automation
Test Kitchen validates infrastructure changes in four main stages: Create, Converge,Verify and Destroy:
Create: In the create stage systems are created and booted in a clean-room environment either running locally on a workstation hypervisor or on a cloud provider.
ConvergeIn the convergephasethe Chef Infra Client is installed and cookbooks are then run to bring the node into policy compliance.
Verify: In the verify Chef InSpec is used to smoke testsand verify systems meetbusiness needs.One of the coolest things about Test Kitchen is that you are validating the compliance primitives along with running smoke tests.
Destroy: In the destroyphase passed runs are committed to source control, failed runs are returned to development and the clean room instances are deleted from your local hypervisor or cloud provider.