Tag chef
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.
Recommended read: Goodbye, Foodcritic https://blog.chef.io/goodbye-foodcritic/
Setting up a custom RubyGems Repository for Chef in Test Kitchen (1 mins read).
How to use a private RubyGems repository for your Chef gem dependencies in Test Kitchen.
How Many Gadgets Does the Kitchen Need?! The Many Tools for Chef Dependency Management (5 mins read).
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.
Using Fake Cookbooks for Writing ChefSpec Tests for your Custom Chef Resources (3 mins read).
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.
Chef 14 Upgrade: Change in ValidationFailed
error messages when setting required
properties (2 mins read).
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.
Test-Driven Chef Cookbook Development Using ChefSpec (and a sprinkling of InSpec) (38 mins read).
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.
Using chef-shell
to interactively debug attributes and recipes (5 mins read).
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.
Beware: delete
ing a file
in Chef doesn't actually delete
it (3 mins read).
Why you should explicitly add backup false
when delete
ing a 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.
Running 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).
Disabling the 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).
Fixing odd Logger
entries in autogenerated knife-cookbook-doc
README.md
s for Chef 13.
Chef 13 Upgrade: Deprecation of Namespace Collisions in Custom Resources (1 mins read).
Preparing for breaking changes in Chef 14 by renaming property_name
to new_resource.property_name
in Custom Resources.
Testing Chef's ruby_block
s 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.
Chef 13 Upgrade: Rubocop Changes for Testing render_file
with ChefSpec and a with_content
Block (1 mins read).
How to resolve the Parenthesize the param render_file
Rubocop error when upgrading your cookbook to Chef 13.
Chef 13 Upgrade: Rubocop Changes for Word Array Literals (%w
) (1 mins read).
A one-liner shell command to fix Rubocop errors %w-literals should be delimited by [ and ]
.
Chef 13 Upgrade: Testing ruby_block
s with ChefSpec (1 mins read).
Replace your block.old_run_action
with block.block.call
to trigger ruby_block
s within ChefSpec 7 and Chef 13.
SSLError
When Running Berkshelf Behind a Proxy (2 mins read).
Getting around the pesky OpenSSL::SSL::SSLError SSLv2/v3 read server hello A
error when running Berkshelf behind a proxy.
Running service
resources in Kitchen-Docker (3 mins read).
How to get up and running with service
resources when running Test Kitchen with the Docker driver, in this example for use with GitLab CI.
Trusting Self-Signed Certificates from the Chef Development Kit (2 mins read).
How to get the ChefDK (and associated tools) to trust internal / self-signed certificates, in an easy oneliner.
Getting around Permission Denied
when running ChefSpec (3 mins read).
How to handle getting an EACCES
when trying to run ChefSpec on a recipe.
Testing include_recipe
s with Chef and ChefSpec (2 mins read).
How to best test include_recipe
s within your Chef recipes, as well as how to ensure that you aren't running any dependent recipes in your tests.
Building Chef Cookbooks with GitLab (Part 1) (11 mins read).
An introduction to how to build a cookbook using GitLab's Continuous Integration platform in conjunction with kitchen-docker
.