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

bind-grid (2) Versions 0.1.1

Installs/Configures BIND

Berkshelf/Librarian
Policyfile
Knife
cookbook 'bind-grid', '~> 0.1.1'
cookbook 'bind-grid', '~> 0.1.1', :supermarket
knife cookbook site install bind-grid
knife cookbook site download bind-grid
README
Dependencies
Changelog
Quality 44%

bind-grid Cookbook

This cookbook sets up BIND server.

Contents

Requirements

Platforms

  • Debian, Ubuntu

Cookbooks

  • None.

Attributes

Key Type Description, example Default
['bind-grid']['role'] String 'master' or 'slave' 'master'
['bind-grid']['acl'] Hash acl statements. See attribute/default.rb
['bind-grid']['acl']['internal'] Array Predefined internal acl. ['127.0.0.1']
['bind-grid']['extra_statements'] String Your arbitrary statements string. ''
['bind-grid']['options']['directory'] String '/var/cache/bind'
['bind-grid']['options']['listen-on'] String IP v4 listen configurarions ''
['bind-grid']['options']['listen-on']['port'] String '53'
['bind-grid']['options']['listen-on']['ipaddresses'] Array [] (= ['127.0.0.1', node['ipaddress']])
['bind-grid']['options']['listen-on-v6'] String IP v6 listen configurarions ''
['bind-grid']['options']['listen-on-v6']['port'] String '53'
['bind-grid']['options']['listen-on-v6']['ipaddresses'] Array 'any' or 'none' [] (= 'none')
['bind-grid']['options']['dnssec-validation'] String 'auto'
['bind-grid']['options']['auth-nxdomain'] String 'no'
['bind-grid']['options']['allow-query'] Array ['internal']
['bind-grid']['options']['recursion'] String 'yes'
['bind-grid']['options']['allow-recursion'] Array ['internal']
['bind-grid']['options']['allow-transfer'] Array []
['bind-grid']['options']['forwarders'] Array []
['bind-grid']['options']['extra_statements'] String Your arbitrary options statements string. ''
['bind-grid']['zone']['files'] Array e.g. ['db.192.168.1', 'db.example.com'] []
['bind-grid']['zone'] ... Hash Optional: Zone file's common settings.
['bind-grid']['zone']['SOA']['MNAME'] String e.g. dns.example.com ''
['bind-grid']['zone']['SOA']['RNAME'] String e.g. root.example.com ''
['bind-grid']['zone']['NS'] Array e.g. ['dns.example.com'] []
['bind-grid']['zone']['masters'] String e.g. ['192.168.1.53'] ''
['bind-grid']['zone']['allow-transfer'] String e.g. ['192.168.1.54'] ''

Usage

Recipes

bind-grid::default

This recipe is the same as bind-grid::bind.

bind-grid::bind

This recipe sets up BIND server.

Add your customized zone files by wrapper cookbook

  • Create a wrapper cookbook (e.g. bind-wrapper).

  • metadata.rb: add the bind-grid dependency.

# ...
depends          'bind-grid'
  • Add your zone file templates to the directory templates/default/var/cache/bind

  • attributes/default.rb: add the zone file list to the ['bind-grid']['zone']['files'] attribute.

# This attribute must not be overridden by Environments or Roles.
force_override['bind-grid']['zone']['files'] = [
  'db.192.168.1',
  'db.example.com',
]
# options
default['bind-grid']['zone'] = {
  'SOA' => {
    'MNAME' => 'dns.example.com',
    'RNAME' => 'root.example.com',
  },
  'NS' => [
    'dns.example.com',
  ],
  'masters' => [
    '192.168.1.53',
  ],
  'allow-transfer' => [
    '192.168.1.54',
  ],
}

base_cookbook = 'bind-grid'
node.from_file(run_context.resolve_attribute(base_cookbook, 'default'))
# or execute it in a recipe.
  • recipes/bind.rb: override the bind recipe.
base_cookbook = 'bind-grid'
this_cookbook = 'bind-wrapper'

#node.from_file(run_context.resolve_attribute(base_cookbook, 'default'))
# or execute it in the `attributes/default.rb`.
include_recipe "#{base_cookbook}::bind"

if node['bind-grid']['role'] == 'master'
  zone_dir = node['bind-grid']['options']['directory']

  # override zone files.
  node['bind-grid']['zone']['files'].each {|db_file|
    res = resources(template: "#{zone_dir}/#{db_file}")
    res.cookbook this_cookbook
  }
end

Role Examples

  • roles/bind.rb
name 'bind'
description 'BIND server'

run_list(
  'recipe[bind-wrapper::bind]',
)

override_attributes(
  'bind-grid' => {
    'role' => 'master',  # or 'slave'
    'acl' => {
      'internal' => [
        '127.0.0.1',
        '192.168.1.0/24',
      ],
    },
    'options' => {
      'forwarders' => [
        '8.8.8.8',
        '8.8.4.4',
      ],
    },
    'zone' => {
      'SOA' => {
        'MNAME' => 'dns.example.com',
        'RNAME' => 'root.example.com',
      },
      'NS' => [
        'dns.example.com',
      ],
      'masters' => [
        '192.168.1.53',
      ],
      'allow-transfer' => [
        '192.168.1.54',
      ],
    },
  },
)

License and Authors

  • Author:: whitestar at osdn.jp
Copyright 2017, whitestar

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

bind-grid CHANGELOG

0.1.1

  • adds the ['bind-grid']['options']['dnssec-validation'] attribute.
  • revises documents.

0.1.0

  • Initial release of bind-grid

Collaborator Number Metric
            

0.1.1 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.1 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.1 failed this metric

FC066: Ensure chef_version is set in metadata: bind-grid/metadata.rb:1
FC069: Ensure standardized license defined in metadata: bind-grid/metadata.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.1 passed this metric

No Binaries Metric
            

0.1.1 passed this metric

Publish Metric
            

0.1.1 passed this metric

Supported Platforms Metric
            

0.1.1 passed this metric

Testing File Metric
            

0.1.1 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.1 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