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

chefknife (2) Versions 0.1.19

Installs/Configures chefknife

Policyfile
Berkshelf
Knife
cookbook 'chefknife', '~> 0.1.19', :supermarket
cookbook 'chefknife', '~> 0.1.19'
knife supermarket install chefknife
knife supermarket download chefknife
README
Dependencies
Changelog
Quality 17%

Travis-ci status: Build Status

chefknife Cookbook

Chefknife is a Ruby command-line utility to help manage multiple Chef servers and multiple knife configs.

Requirements

A recent copy of Ruby. Tested with 1.9.3.

Attributes

This cookbook contains the following attributes.

Config file for chefknife.

<pre><code>
default['chefknife']['chefknife_config'] = '/etc/chef/chefknife'
</pre></code>

List of Chef knife configs ( e.g. knife.rb ). You MUST OVERRIDE this!

<pre><code>
default['chefknife']['knife_configs'] = []
</pre></code>

Usage

You can execute chefknife, chefknife -h, or chefknife --help to get the help menu:
<pre><code>
jenkins@jenkins.example.com: ~/chef-hosted: chefknife
Usage: opt_parser COMMAND [OPTIONS]

Commands
environments: Upload ALL Chef environments to ALL Chef servers!
environment: Upload single Chef environment to ALL Chef servers
roles: Upload ALL Chef roles to ALL Chef servers!
role: Upload single role to ALL Chef servers
data_bags: Upload ALL Chef data bags to ALL Chef servers!
data_bag: Upload single data bag to ALL Chef servers
cookbooks: Upload ALL Chef cookbooks to ALL Chef servers!
cookbook: Upload single cookbook to ALL Chef servers

Options
-h, --help help
</pre></code>

NOTE: All chefknife commands must be executed from within your Chef repo ( e.g. Chef repo shoudl be = to PWD ).

The following chefknife cmd can be used to upload ALL Chef environments to ALL Chef servers!:
<pre><code>
jenkins@jenkins.example.com: ~/chef-hosted: chefknife environments
</pre></code>

The following chefknife cmd can be used to upload a single Chef environment to ALL Chef servers:
This assumes you have an enviroment called production.
<pre><code>
jenkins@jenkins.example.com: ~/chef-hosted: chefknife environment production
</pre></code>

The following chefknife cmd can be used to upload ALL Chef roles to ALL Chef servers!:
<pre><code>
jenkins@jenkins.example.com: ~/chef-hosted: chefknife roles
</pre></code>

The following chefknife cmd can be used to upload a single Chef role to ALL Chef servers!:
This assumes you have a role named webserver.
<pre><code>
jenkins@jenkins.example.com: ~/chef-hosted: chefknife role webserver
</pre></code>

The following chefknife cmd can be used to upload ALL cookbooks to ALL Chef servers!:
<pre><code>
jenkins@jenkins.example.com: ~/chef-hosted: chefknife cookbooks
</pre></code>

The following chefknife cmd can be used to upload a single cookbook to ALL Chef servers!:
<pre><code>
jenkins@jenkins.example.com: ~/chef-hosted: chefknife cookbook apache2
</pre></code>

You should override the default['chefknife']['knife_configs'] = [] attribute with a list of knife configs for all your chef servers,
including Enterprise Chef if you're using it.

Below is a sample role you could use to deploy chefknife and it's config file /etc/chef/chefknife containing paths to multiple knife.rb files.
<pre><code>
name "chefknife"
description "Manages multiple Chef Servers."
override_attributes(
"chefknife" => {
"knife_configs" => [ "/etc/chef/chef01-knife.rb","/etc/chef/chef02-knife.rb" ]
}
)
</pre></code>

You can install chefknife by including chefknife in your node's run_list:
<pre><code>
{
"name":"my_node",
"run_list": [
"recipe[chefknife]"
]
}
</pre></code>

Below is a sample chefknife config.
<pre><code>
skywalker@alderaan: ~: cat /etc/chef/chefknife
knife_config~~/etc/chef/chef01-knife.rb
knife_config~~/etc/chef/chef02-knife.rb
</pre></code>

DEFAULT BEHAVIOR

  • The chefknife cmd-line utility will be written as /usr/local/bin/chefknife.
  • chefknife's config file will be written as /etc/chef/chefknife.

Contributing

  • Fork the repository on Github
  • Create a named feature branch (like add_component_x)
  • Write you change
  • Write tests for your change (if applicable)
  • Run the tests, ensuring they all pass
  • Submit a Pull Request using Github

License and Authors

Authors: Gerald L. Hevener Jr., M.S.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

chefknife CHANGELOG

This file is used to list changes made in each version of the chefknife cookbook.

0.1.19

  • Add Travis-CI button to README.md.

0.1.18

  • Fix foodcritic by removing unused template variable from chefknife::default.

0.1.17

  • Update Travis-CI support.

0.1.16

  • Fix .kitchen.yml so test-kitchen will work.

0.1.15

  • Remove metadata.json.

0.1.14

  • Add OSX support.

0.1.13

  • Fix chefknife template syntax error.

0.1.12

  • Fix syntax errors.

0.1.11

  • Update attributes file.

0.1.10
- Fix syntax error in default.rb.

0.1.9
- Update default.rb.

0.1.8

  • Fix syntax in default.rb.

0.1.7

  • Add attributes for user/group ownership. Mainly due to no root UNIX group on OSX.

0.1.6

  • Fix chefknife data_bag to upload single data bag item.

0.1.0

  • [your_name] - Initial release of chefknife

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Collaborator Number Metric
            

0.1.19 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.19 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.19 failed this metric

FC064: Ensure issues_url is set in metadata: chefknife/metadata.rb:1
FC065: Ensure source_url is set in metadata: chefknife/metadata.rb:1
FC066: Ensure chef_version is set in metadata: chefknife/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: chefknife/metadata.rb:1
FC069: Ensure standardized license defined in metadata: chefknife/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.1.19 passed this metric

Testing File Metric
            

0.1.19 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.19 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