How to use Chef's versioning classes to determine whether a version constraint is matched.
How to upload a given community cookbook from Chef Supermarket to Chef Server, using Berkshelf.
How to create a dependency graph for a given cookbook's dependencies to understand the order to install them in.
How to set up kitchen-ec2 to use an SSH key that isn't available in AWS by amending the
user-data of the created EC2 instance.
How to resolve
Waiting for SSH service when running kitchen-docker.
Better Chef Reporting for Automated Pipelines (1 mins read).
How to get better machine-parseable reports for your Chef Pipelines.
How to source your Chef Gem dependencies from your Chef cookbook's
metadata.rb instead of duplicating them between files.
Programatically Determining the Version of a Chef Cookbook (1 mins read).
How to determine a Chef cookbook's version programatically, using Ruby.
How to Use Cookstyle to Autocorrect Style Issues (1 mins read).
How to use the
cookstyle tool with Chef cookbooks to autocorrect style issues.
Well it's taken me a few years, but I've finally worked out how to manage Gems in #Chef without horrible
chef exec bundle exec ... commands https://www.jvt.me/posts/2021/02/22/chefdk-gemfile/
How to install Ruby Gems in local development using your
Gotcha: AWS SDK Proxy Setup with Test Kitchen (2 mins read).
How to avoid odd proxy issues when using the AWS SDK, when using Test Kitchen.
Using Chef to Delete Files that aren't in a List (2 mins read).
How to delete files in a directory that don't match a list.
ChefSpec Gotcha: Using
render_file When Deleting Files (2 mins read).
How to use
render_file with ChefSpec when you're deleting the file.
Chef Attributes and
default.rb - it's in the name (3 mins read).
Why you should only be setting defaults in your Chef attributes, and moving heavy lifting elsewhere.
How to use a private RubyGems repository for your Chef gem dependencies in Test Kitchen.
Looking at the different dependency management solutions of Chef, and how, where and why you would use each one.
Performing a No-Op with
chef-client using JSON (2 mins read).
How to perform a
chef-client run without executing anything.
How to run tests from the ChefDK in Docker (6 mins read).
How to get up and running with the ChefDK to perform common tests, such as unit tests and linting.
A directory structure I've found quite useful for writing ChefSpec tests for custom resources, by creating a fake cookbook within the cookbook you're testing.
The updated error message returned by a Chef
ValidationFailed error, when you're specifying which properties are
required on a custom resource.
Revert 'Some knowledge-sharing news' (5 mins read).
The unfortunate decision to cancel my Packt training courses.
Using the example of deploying and running a Java JAR file as a way to show the lifecycle of a fully test-driven Chef cookbook.
How to use
chef-shell to see attribute config and recipes, with and without a Chef Server.
OggCamp 2018 (21 mins read).
A look at my time at OggCamp 2018, the talks I presented and attended.
Some exciting job and knowledge-sharing news (4 mins read).
Moving into Quality Engineering, publishing Chef training courses, conference speaking about Chef at OggCamp and the complex mess that is this very static website at DevOpsDays London.
Notes from the AWS + Chef Dev Day Roadshow in London (13 mins read).
Notes from the AWS Dev Day Roadshow in London, where we got to play around with Chef, Chef Automate and InSpec using AWS OpsWorks.
file in Chef doesn't actually
delete it (3 mins read).
Why you should explicitly add
backup false when
file through Chef, to avoid leaving potentially sensitive files still on the box.
Morsels of Goodness: What's Cooking in Chef 14? (5 mins read).
A look at the new features coming in the new Chef 14 release, as well as what to watch out for when upgrading.
Bundling Common Rake Tasks into a Gem (8 mins read).
An example of how to create a helper gem for common Rake task, using the real-world example of Chef cookbooks.
docker login as another user in Chef (2 mins read).
Hitting the error
permission denied while trying to connect to the Docker daemon socket when trying to run
docker login as a non-root user in Chef.
Chef 13 Upgrade:
knife-cookbook-doc Rubocop Updates (1 mins read).
Missing space after # and
Do not use block comments errors for your
knife-cookbook-doc formatted comments.
Chef 13 Upgrade:
knife-cookbook-doc gem upgrade (1 mins read).
Logger entries in autogenerated
README.mds for Chef 13.
Preparing for breaking changes in Chef 14 by renaming
new_resource.property_name in Custom Resources.
ruby_blocks with ChefSpec (3 mins read).
Testing implementation of a
ruby_block in ChefSpec, to ensure that the code executes as expected.
Chef 13 Upgrade: Lessons Learnt and Documented for Posterity (1 mins read).
Notes on the main problems encountered when upgrading from Chef 12 to Chef 13, both with ChefSpec and Rubocop.
Chef 13 Upgrade: Rubocop Changes for
lazy Parameters (1 mins read).
How to resolve the
Parenthesize the param lazy Rubocop error when upgrading your cookbook to Chef 13.
How to resolve the
Parenthesize the param render_file Rubocop error when upgrading your cookbook to Chef 13.