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

RSS

cwb (4) Versions 0.1.3

Installs/Configures cwb

Berkshelf/Librarian
Policyfile
Knife
cookbook 'cwb', '~> 0.1.3'
cookbook 'cwb', '~> 0.1.3', :supermarket
knife cookbook site install cwb
knife cookbook site download cwb
README
Dependencies
Changelog
Quality 33%

Cloud WorkBench Cookbook (CWB Cookbook)

This cookbook prepares a machine for CWB benchmarks.

Attributes

Logging

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'

Resource

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'

Libraries

cwb_defaults(self)

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

file '/tmp/something' do
  cwb_defaults(self)
  action :create
end

Cwb::BenchmarkUtil

Provides path utilities for your benchmark.

Example usage within your recipe:

my_bench = Cwb::BenchmarkUtil.new('benchmark-name', node)
cwb_benchmark my_bench.name

# 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
  cwb_defaults(self)
  source 'config.ini.erb'
end

Cwb::Util

Cwb::Util.root_dir(node)

cwb_util = Cwb::Util.new(node)
cwb_util.root_dir

Usage

cwb::default

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 .

Notes

  • 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.

Development

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 (joel.scheuner.dev@gmail.com)

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.1.3 (2016-07-25)

  • Fix metadata request for google provider to obtain the provider_instance_id

0.1.2 (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 README.md docs
  • Add additional code documentation
  • Ensure consistent use of quotes preferring single quotes '

0.1.0 (2015-04-25)

  • Initial release of cwb

Collaborator Number Metric
            

0.1.3 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.3 failed this metric

FC059: LWRP provider does not declare use_inline_resources: cwb/providers/benchmark.rb:1
FC059: LWRP provider does not declare use_inline_resources: cwb/providers/benchmark_suite.rb:1
FC064: Ensure issues_url is set in metadata: cwb/metadata.rb:1
FC065: Ensure source_url is set in metadata: cwb/metadata.rb:1
FC066: Ensure chef_version is set in metadata: cwb/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: cwb/metadata.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.3 passed this metric

No Binaries Metric
            

0.1.3 passed this metric

Publish Metric
            

0.1.3 passed this metric

Supported Platforms Metric
            

0.1.3 failed this metric

cwb should declare what platform(s) it supports.

Testing File Metric
            

0.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number