chef-purifier full guide
Detailed setup, dependency management, build commands, and troubleshooting. Start with the overview for the initial commands; use the sections below for the complete setup and behavior. chef-purifier is classified at maturity tier 4 (see tier assessment for details).
Contents
- Setup and activation
- Version compatibility
- Development loop
- Using locked dependencies
- Nix builds
- Supported scope
Setup and activation
In a project with a Policyfile.rb:
Use the overview’s Quickstart for the initial command sequence. The setup details below apply to that workflow.
Version compatibility
| Tool or language | Packaged defaults | Tested versions |
|---|---|---|
| Cinc CLI | 6.1.34 | — |
| Cinc Infra Client | 19.3.14 | — |
| Ruby | 3.4.11 | — |
Operating systems and architectures
| OS | CPU architecture | Packaged toolchain | Recorded workflow |
|---|---|---|---|
| Linux | ARM64 | Yes | Not recorded |
| Linux | x86-64 | Yes | Tested |
Development loop
Recipe bodies, policy attributes and run lists remain editable. Native
cinc-cli update refreshes project code while preserving the locked cookbook
versions. Use chef-purifier lock --update to change dependencies, and
chef-purifier prefetch to realize the current lock.
Using locked dependencies
Commit chef-purifier.lock.json and Policyfile.lock.json. The cinc-cli and
chef-cli wrappers use private native caches backed by immutable Nix cookbooks.
They are required for locked resolution. Without a purifier lock, they warn and
run ordinary Cinc CLI commands. Install the integration with your usual method
when you want it available beyond the temporary shell.
chef-purifier --project PATH exec -- COMMAND ... runs a Cinc CLI command in a
selected project. The native wrappers preserve the caller’s working directory. Set
CHEF_PURIFIER_PROJECT and CHEF_PURIFIER_LOCK to select their project and an
external companion lock explicitly.
Nix builds
The overlay exposes pkgs.chef-purifier.buildChefProject { src = ./.; }.
It exports the policy through Cinc, with hash-pinned cookbook archives.
packages.environment contains the native cookbook cache,
packages.project contains the exported policy, and release is its
reproducible policy/ tarball. Deployment is a separate native operation.
Set doCheck = true and provide checkCommand to check the exported policy.
The checks run in its directory, with the Cinc client available. The builder
accepts lockFile and fetchers overrides.
chef-purifier build exports the policy; chef-purifier bundle creates its
archive. chef-purifier publish --tag TAG uploads that archive to an existing
GitHub release using your authenticated gh account.
Supported scope
Supported dependencies
The initial provider supports public HTTPS Supermarket cookbook archives and local cookbooks inside the project. Native Cinc evaluates the Policyfile, resolves dependencies, installs archives and checks cookbook content identities. Cookbook gem dependencies, included policies, Git sources and authenticated registries require additional providers and are rejected.
The integration locks cookbook resolution. Recipes execute normally, including network requests and resource changes. Run exported policies with an ordinary Cinc client; deployment credentials and server operation remain native concerns.
Target systems
- x86_64-linux
- aarch64-linux
Platform limitations and validation
- Native capture, cookbook replay, policy export and reproducible builds pass CI on x86-64 and ARM64 Linux.