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

berkshelf-api (4) Versions 1.2.2

Installs a Berkshelf API server

Berkshelf/Librarian
Policyfile
Knife
cookbook 'berkshelf-api', '~> 1.2.2'
cookbook 'berkshelf-api', '~> 1.2.2', :supermarket
knife cookbook site install berkshelf-api
knife cookbook site download berkshelf-api
README
Dependencies
Quality 44%

berkshelf-api

Build Status

Quick Start

Apply the following role to your server (making sure both cookbooks are available):

{
  "name": "berkshelf-api",
  "description": "",
  "json_class": "Chef::Role",
  "default_attributes": {
  },
  "override_attributes": {
  },
  "chef_type": "role",
  "run_list": [
      "recipe[nginx]",
      "recipe[berkshelf-api]",
  ],
  "env_run_lists": {
  }
}

Attributes

  • node['berkshelf-api']['path'] – The directory to hold the configuration and cache. (default: /etc/berkshelf)
  • node['berkshelf-api']['version'] – Version or git reference to install. (default: master)
  • node['berkshelf-api']['port'] – Port to listen on. (default: 26200)
  • node['berkshelf-api']['log_path'] – Directory for runit logs (default: ./main, under /etc/sv/berkshelf-api)
  • node['berkshelf-api']['log_verbosity'] – Log verbosity flag, one of '', '-v', '-d', '-q'. (default: '')
  • node['berkshelf-api']['user'] – User to run as. (default: berkshelf)
  • node['berkshelf-api']['group'] – Group to run as. (default: berkshelf)
  • node['berkshelf-api']['install_path'] – The directory to clone into if installing from git. (default: /opt/berkshelf)
  • node['berkshelf-api']['git_repository'] – URI to clone from if installing from git. (default: https://github.com/berkshelf/berkshelf-api.git)
  • node['berkshelf-api']['config'] – A hash of configuration data to be added to config.json. (default: {})
  • node['berkshelf-api']['opscode_url'] – URL to use for the default Community Site endpoint. (default: https://community.opscode.com/api/v1)
  • node['berkshelf-api']['proxy']['enabled'] – Install an HTTP proxy. (default: if the apache2 or nginx recipe is in the run list)
  • node['berkshelf-api']['proxy']['listen_ports'] – HTTP ports for the proxy. (default: [80])
  • node['berkshelf-api']['proxy']['hostname'] – Server name for the proxy. (default: node['fqdn'])
  • node['berkshelf-api']['proxy']['ssl_enabled'] – Configure HTTPS support. (default: false)
  • node['berkshelf-api']['proxy']['ssl_redirect_http'] – Redirect from http: to https: if SSL is enabled. (default: true)
  • node['berkshelf-api']['proxy']['ssl_listen_ports'] – HTTPS ports for the proxy. (default: [443])
  • node['berkshelf-api']['proxy']['ssl_path'] – Base path for SSL-related files. (default: /etc/berkshelf/ssl)
  • node['berkshelf-api']['proxy']['ssl_cert_path'] – Path to the SSL certificate. (default: /etc/berkshelf/ssl/berkshelf-api.pem)
  • node['berkshelf-api']['proxy']['ssl_key_path'] – Path to the SSL private key. (default: /etc/berkshelf/ssl/berkshelf-api.key)
  • node['berkshelf-api']['proxy']['provider'] – Proxy provider to use. One of: nginx, apache. (default: auto-detect based on run list)

Resources

berkshelf_api

The berkshelf_api resource defines a berkshelf-api server installation.

berkshelf_api '/etc/berks' do
  version '1.1.0'
  config do
    endpoints [{type: 'opscode'}]
  end
end

All resource attributes have the same meaning as the node attributes above and default to the node attribute if not specified.

  • path – The directory to hold the configuration and cache. (name_attribute)
  • version – Version or git reference to install. (default: node['berkshelf-api']['version'])
  • port – Port to listen on. (default: node['berkshelf-api']['port'])
  • user – User to run as. (default: node['berkshelf-api']['user'])
  • group – Group to run as. (default: node['berkshelf-api']['group'])
  • install_path – The directory to clone into if installing from git. (default: node['berkshelf-api']['install_path'])
  • git_repository – URI to clone from if installing from git. (default: node['berkshelf-api']['git_repository'] if version is a git reference)
  • config – A hash or block of configuration data to be added to config.json.
  • log_path - Directory to write the runit service logs, relative to /etc/sv/berkshelf-api . (default: node['berkshelf-api']['log_path'])
  • log_verbosity - Which flag, if any, to pass to berks-api to control log verbosity; one of '', '-d','-v', or '-q'. (default: node['berkshelf-api']['log_verbosity'])

berkshelf_api_opscode_endpoint

The berkshelf_api_opscode_endpoint defines a community site endpoint for a berkshelf_api resource.

berkshelf_api_opscode_endpoint 'https://community.opscode.com/api/v1'

It can also be used via the shorter, nested syntax:

berkshelf_api '/etc/berks' do
  opscode_endpoint # Defaults to node['berkshelf-api']['opscode_url'] if no URL is given
  opscode_endpoint 'http://example.com/cookbooks'
end
  • url – URL for the community site. (name_attribute)

berkshelf_api_chef_server_endpoint

The berkshelf_api_chef_server_endpoint defines a chef server endpoint for a berkshelf_api resource.

berkshelf_api_chef_server_endpoint 'https://api.opscode.com/organizations/example' do
  client_name 'berks'
  client_key <<EOH
-----BEGIN RSA PRIVATE KEY-----
[...]
-----END RSA PRIVATE KEY-----
EOH
end

It can also be used via the shorter, nested syntax:

berkshelf_api '/etc/berks' do
  chef_server_endpoint 'https://api.opscode.com/organizations/example', 'berks', '[...]'
  chef_server_endpoint 'https://api.opscode.com/organizations/example' do
    client_name 'berks'
    client_key <<EOH
-----BEGIN RSA PRIVATE KEY-----
[...]
-----END RSA PRIVATE KEY-----
EOH
  end
end
  • url – URL for the chef server. (name_attribute)
  • client_name – Chef API client username. (required)
  • client_key – Chef API client private key. (required)

berkshelf_api_auto_chef_server_endpoint

The berkshelf_api_chef_server_endpoint defines a chef server endpoint for a berkshelf_api resource that uses the same configuration as the active chef-client.

berkshelf_api_auto_chef_server_endpoint ''

It can also be used via the shorter, nested syntax:

berkshelf_api '/etc/berks' do
  auto_chef_server_endpoint
end

berkshelf_api_github_endpoint

The berkshelf_api_github_endpoint defines a Github endpoint for a berkshelf_api resource.

berkshelf_api_github_endpoint 'myorg' do
  api_token '[...]'
end

It can also be used via the shorter, nested syntax:

berkshelf_api '/etc/berks' do
  github_endpoint 'myorg', '[...]'
  github_endpoint 'myorg' do
    api_token '[...]'
  end
end
  • organization – Github organization to scan. (name_attribute)
  • api_token – Github API token. (required)

Dependent cookbooks

runit >= 0.0.0
poise-ruby >= 0.0.0
poise >= 0.0.0
git >= 0.0.0
build-essential >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

1.2.2 failed this metric

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

Contributing File Metric
            

1.2.2 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
            

1.2.2 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: berkshelf-api/libraries/berkshelf_api_proxy.rb:159
FC007: Ensure recipe dependencies are reflected in cookbook metadata: berkshelf-api/libraries/berkshelf_api_proxy.rb:183
FC007: Ensure recipe dependencies are reflected in cookbook metadata: berkshelf-api/libraries/berkshelf_api_proxy.rb:184
FC007: Ensure recipe dependencies are reflected in cookbook metadata: berkshelf-api/libraries/berkshelf_api_proxy.rb:185
FC064: Ensure issues_url is set in metadata: berkshelf-api/metadata.rb:1
FC065: Ensure source_url is set in metadata: berkshelf-api/metadata.rb:1
FC066: Ensure chef_version is set in metadata: berkshelf-api/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: berkshelf-api/metadata.rb:1
FC069: Ensure standardized license defined in metadata: berkshelf-api/metadata.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

1.2.2 passed this metric

No Binaries Metric
            

1.2.2 passed this metric

Publish Metric
            

1.2.2 passed this metric

Supported Platforms Metric
            

1.2.2 failed this metric

berkshelf-api should declare what platform(s) it supports.

Testing File Metric
            

1.2.2 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
            

1.2.2 passed this metric