Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Document kitchen named run lists in policyfile readme
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsdeleo committed Nov 17, 2015
1 parent a10a1b4 commit e43eee1
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions POLICYFILE_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ override["same"]["with"] = "overrides"

### Testing With Test Kitchen

ChefDK now includes a Test Kitchen provisioner, which allows you to
converge VMs using Chef Client in policyfile mode, using Chef Zero to
serve cookbook data. Add the following to your `.kitchen.yml`:
ChefDK includes a Test Kitchen provisioner, which allows you to converge
VMs using Chef Client in policyfile mode, using Chef Zero to serve
cookbook data. Add the following to your `.kitchen.yml`:

```yaml
provisioner:
Expand All @@ -313,6 +313,35 @@ provisioner:
require_chef_omnibus: true
```

#### Using Named Run Lists With Kitchen

As of ChefDK 0.11, the Test Kitchen provisioner supports named run
lists. In addition to testing named run lists that you are using on
production policies, you can use this feature to test different recipes
in a library cookbook in isolation.

To use a different named run list on a per-suite basis, specify the
named run list inside a `provisioner` section, like this:

```yaml
suites:
- name: client
provisioner:
named_run_list: test_client_recipe
- name: server
provisioner:
named_run_list: test_server_recipe
```

To use a named run list globally, specify it at the top level of the
provisioner section:

```yaml
provisioner:
name: policyfile_zero
named_run_list: integration_test_run_list
```

## Applying the Policy on a Node

On the node you with to use the policy update the client.rb to include
Expand Down

0 comments on commit e43eee1

Please sign in to comment.