-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a ChefZeroCapture kitchen provisioner #75
Conversation
This provisioner makes a `chef capture`d node's dependencies fully available to chef-zero by adding support for policies, policy_groups, and cookbook_artifacts to the provisioner. This allows policy-managed nodes captured with `chef capture` to converge in the same way as they do when running in their nornal enviornment without the kitchen provisioner performing any policyfile resolution ahead of time. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading this correctly... It takes the directory of stuff we captured from a node and uses it to provision a kitchen instance. Looks good to me and much more clever approach than I was anticipating.
This adds chef-capture support for policy-managed nodes. It works int he same way that it does for non-policy-managed nodes - it will capture the nodes state including , policy group/policy/cookbook artifacts from a Chef Infra Server and make it available to the captured note via test-kitchen. This differs from running policyfile tests in TK in that Kitchen itself won't attempt to resolve or download any cookbook depenencies - it relies on chef capture having saved that chef-server state into the node repo before kitchen converge. This functionality relies on a new provisioner for TK, "chef_zero_capture". This provisioner ships with chef-cli, and will be available once the following PR merges: chef/chef-cli#75 Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I specify this in my kitchen.yml?
provisioner:
name: chef_zero_capture
?
Yep |
Description
This provisioner makes a
chef capture
d node'sdependencies fully available to chef-zero by adding
support for policies, policy_groups, and cookbook_artifacts
to the provisioner.
This allows policy-managed nodes captured with
chef capture
to convergein the same way as they do when running in their normal enviornment
without the kitchen provisioner performing any policyfile resolution
ahead of time.
This provisioner is only suitable for use with a
capture
d node; in the normal case,a node using chef-zero will want the current behavior of resolving policyfiles/berksfiles.
Signed-off-by: Marc A. Paradise marc.paradise@gmail.com