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


cwb (4) Versions 0.1.2

Installs/Configures cwb

cookbook 'cwb', '= 0.1.2'
cookbook 'cwb', '= 0.1.2', :supermarket
knife cookbook site install cwb
knife cookbook site download cwb

Cloud WorkBench Cookbook (CWB Cookbook)

This cookbook prepares a machine for CWB benchmarks.



default['benchmark']['logging_enabled'] = false

System Specific

# This attribute will overwrite owner and group if present
default['benchmark']['ssh_username'] = nil
default['benchmark']['owner'] = 'ubuntu'
default['benchmark']['group'] = 'ubuntu'


Use the cwb_benchmark resource to define a benchmark. Make sure you place the Ruby implementation of the benchmark within files/default/benchmark_name.rb. Take care of correct naming! Example: * Cookbook and benchmark name: http-benchmark (hyphen) * Ruby benchmark implementation: http_benchmark (underscore) * Ruby benchmark class name: HttpBenchmark (CamelCase => HTTPBenchmark is wrong!)

cwb_benchmark 'benchmark-name'



Instead of hardcoding owner and group you should use the cwb_defaults(self) utility method:

file '/tmp/something' do
  action :create


Provides path utilities for your benchmark.

Example usage within your recipe:

my_bench ='benchmark-name', node)

# Create a config file from a template that should reside
# at the same directory as the Ruby benchmark file.
template my_bench.path_for('config.ini') do
  source 'config.ini.erb'



cwb_util =



You should not explicitly include the cwb::default recipe within your cookbooks. Instead the CWB Server will take care of adding cwb to the Chef run list.

Internal Structure

The cwb::core recipe prepares the following structure for benchmarks that are subsequently added by custom benchmark cookbooks. Do NOT rely in this internal structure as it might change in the future.

├── benchmark_suite.txt [single benchmark suite to be executed]
├── benchmarks.txt [ordered list of benchmarks to be executed]
├── node.yml [hash of Chef node attributes]
├── app-bench
│   └── app_bench.rb
├── micro-bench
│   └── micro_bench.rb
├── my-bench
│   └── my_bench.rb
│   └── config.ini

cwb CLI

The command line utility is able to execute single benchmarks in isolation or an entire benchmark suite. The default benchmark suite will execute all benchmarks according to the order in benchmarks.txt which reflects the recipe order in the Chef run list.

cwb execute micro-bench/micro_bench.rb
cwb execute .


  • This cookbook monkypatches the String class by adding the utility methods camelize and underscore. These methods are for internal use, do NOT depend on them.


Integration Tests

Requirements: VirtualBox , Vagrant, and vagrant plugin install vagrant-omnibus

kitchen list
kitchen converge
kitchen verify

All together with kitchen test

Publish Cookbook

Publish Chef Cookbook to Chef Supermarket (only for owners)

Bump version in metadata.rb

knife cookbook site share "cwb" "Other"
git tag -a cwb/v0.1.X -m 'COMMENT'
git push origin --tags

License and Authors

Author:: Joel Scheuner (

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.1.1 (2015-04-29)

  • Fix cookbook attribute implementation for cwb_benchmark and cwb_benchmark_suite implementations

0.1.1 (2015-04-27)

  • Introduce the benchmark.logging_enabled attribute to replace benchmark.redirect_io
  • Fix internal resource duplication issue that prevented adding multiple benchmarks (internally using attribute now)
  • Add integration tests
  • Restructure docs
  • Add additional code documentation
  • Ensure consistent use of quotes preferring single quotes '

0.1.0 (2015-04-25)

  • Initial release of cwb

Foodcritic Metric

0.1.2 failed this metric

FC009: Resource attribute not recognised: /tmp/cook/2f7c46ac532dd49b6ded441c/cwb/recipes/install.rb:2