chef-purifier
Locked cookbook dependencies for Chef and Cinc Policyfiles.
Quickstart
Prerequisites: An existing Policyfile.rb project.
nix shell 'github:nix-purifiers/chef-purifier'
chef-purifier lock --update
cinc-cli install
cinc-cli export ./policy
Commit the lockfiles: chef-purifier.lock.json, Policyfile.lock.json.
Development loop
Keep using native build and test commands in your working tree. After changing dependency selection, refresh the lock and prepare the selected dependencies:
chef-purifier lock --update --project '<project_root>' --lock '<lockfile>'
chef-purifier prefetch --project '<project_root>' --lock '<lockfile>'
Use the project directory and lockfile from your setup for the placeholders.
Using locked dependencies
The development environment supplies a wrapper that runs the build tool with the locked dependencies. Without an applicable purifier lock, it warns and lets the tool use its usual dependency resolution. A stale or invalid lock fails with a repair command.
The supplied wrapper is required for native builds.
Working offline
Prepare dependencies using the Quickstart workflow before disconnecting. The lock covers the recorded dependency downloads; downloads performed outside that lock need separate inputs.
Supported scope
Target systems
- x86_64-linux
- aarch64-linux
Dependency sources
- Public HTTPS Supermarket cookbook archives
- Local cookbooks inside the working project
Platform limits
- Native capture, cookbook replay, policy export and reproducible builds pass CI on x86-64 and ARM64 Linux.
Not supported
- Cookbook gem dependencies, included policies, Git sources and authenticated registries need additional providers
- The supplied Cinc CLI and client support Policyfile workflows; commands requiring a full Omnibus Workstation layout are not supplied
- The Nix builder exports a native policy; deployment is a separate operation
More information
Setup and activation · Version compatibility · Using locked dependencies · Nix builds.