Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

example (15) Versions 0.1.3

Recipe cookbook that calls Chef resources defined in a separate resource cookbook dependency. Integration tests are in InSpec.

Policyfile
Berkshelf
Knife
cookbook 'example', '= 0.1.3', :supermarket
cookbook 'example', '= 0.1.3'
knife supermarket install example
knife supermarket download example
README
Dependencies
Changelog
Quality 100%

example

Build Status

This is a simple cookbook that depends on a resource cookbook called example_resources, which defines a simple Chef resource.

The purpose of this cookbook is to illustrate the relationship between a cookbook that defines a new Chef resource, and another cookbook that consumes it.

Integration tests are in InSpec. Unit tests are in ChefSpec.

To test

  1. Install bundled gems using Bundler in context of ChefDK
  2. Converge in context of Bundler and ChefDK
  3. Verify in context of Bundler and ChefDK
$ chef exec bundle install
$ chef exec bundle exec kitchen converge
$ chef exec bundle exec kitchen verify

Gemfile

Currently ChefDK provides Test Kitchen 1.5.0 which doesn't play nice with InSpec.

Note how I lock gem versions using the Gemfile. Run your tests in the context of these Gemfile locks, otherwise you will likely see problems [at the time of this writing].

This is because ChefDK does a shim thing and locks Test Kitchen to 1.5.0, so I use a Gemfile to lock to Test Kitchen 1.6.0.

The ChefDK shim looks like this for ChefDK 0.15.2 on OS X:

$ cat /opt/chefdk/bin/kitchen
#!/opt/chefdk/embedded/bin/ruby
#--APP_BUNDLER_BINSTUB_FORMAT_VERSION=1--
ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
gem "chef-config", "= 12.7.2"
gem "mixlib-config", "= 2.2.1"
gem "mixlib-shellout", "= 2.2.6"
gem "mixlib-install", "= 0.7.1"
gem "net-scp", "= 1.2.1"
gem "net-ssh", "= 3.0.2"
gem "safe_yaml", "= 1.0.4"
gem "thor", "= 0.19.1"
gem "test-kitchen", "= 1.5.0"

spec = Gem::Specification.find_by_name("test-kitchen", "= 1.5.0")
bin_file = spec.bin_file("kitchen")

Kernel.load(bin_file)

Dependent cookbooks

example_resources >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

This file tracks and describes changes to example_resources.

This project adheres to [semantic versioning 2.0][semver].

v0.1.2 (2016-03-19)

  • Correct spelling of InSpec
  • Improve metadata for Supermarket
  • Fix Travis CI config
  • Correct my email address
  • Remove group from Berksfile

v0.1.1 (2016-03-18)

  • Minor changes, refer to public supermarket

v0.1.0 (2016-03-18)

  • Initial version, a simple cookbook that depends on example_resources

Foodcritic Metric
            

0.1.3 passed this metric