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

bind-ddns (16) Versions 1.13.0

Install and configure ISC Bind on server and nsupdate on clients

Policyfile
Berkshelf
Knife
cookbook 'bind-ddns', '~> 1.13.0', :supermarket
cookbook 'bind-ddns', '~> 1.13.0'
knife supermarket install bind-ddns
knife supermarket download bind-ddns
README
Dependencies
Changelog
Quality 50%

Bind DDNS

Description

Install and configure ISC Bind https://www.isc.org/downloads/bind/ with
full Dynamic DNS support.

On client side, install nsupdate, provide a generic provider and a recipe
to update DNS entries.

Requirements

Cookbooks and gems

Declared in [metadata.rb](metadata.rb) and in [Gemfile](Gemfile).

Platforms

  • RHEL Family 7, tested on Centos

Note: it should work fine on Debian 8 it is currently not tested.

Usage

Easy Setup

Add recipe[bind-ddns::server] in your run-list to install and configure
Bind. Configuration will be fetched from attributes options, zones and
keys.

To add a client, add recipe[bind-ddns::client]. nsupdate recipe will
update all records defined in records.

To see an example, look at [.kitchen.yml](.kitchen.yml).

Test

This cookbook is fully tested through the installation of a server and a client
in docker hosts. This uses kitchen, docker and some monkey-patching.

If you run kitchen list, you will see 2 suites, Each corresponds to a different
server:

  • server-ddns-centos-7: Bind server
  • client-ddns-centos-7: DNS client with nsupdate

For more information, see [.kitchen.yml](.kitchen.yml) and [test](test)
directory.

Attributes

Configuration is done by overriding default attributes. All configuration keys
have a default defined in [attributes/default.rb](attributes/default.rb).
Please read it to have a comprehensive view of what and how you can configure
this cookbook behavior.

Note: for fields needing an IP address, it is possible to set an interface
name, which will be resolved to its first non-local address.

Specific configuration (client or server)

To allow clients and servers to share a same role, it is possible to define
specific configuration keys applicable to one of the status (client or server).

Specific configurations can be any of the attributes defined in
[attributes/default.rb](attributes/default.rb) but in either "client-config"
or "server-config" sub-tree.

A node is declared as server if its FQDN is included in attribute
"['bind-ddns']['servers']" defined as an array. Else, it is considered
as a client.

Recipes

default

Call init and then, following the node status, call client or
server recipe.

init

Determine if the current machine is a server or a client. Write the result
in "run_state['bind-ddns']['status']". Then merge default and specific
(client or server) configurations and store the result in
"run_state['bind-ddns']['config']".

Note: init is included in all recipes.

package

Install Bind package.

package_client

Install Bind utils package.

config

Configure Bind server: named.conf, keys and zones.
Then check configuration through named-checkconf.

service

Enable and start named service, subscribes on named-checkconf resource.

nsupdate

Call bind-ddns default provider (which call nsupdate command) based on
attribute records. See [.kitchen.yml](.kitchen.yml) for more information.

Replace some missing configuration attributes:
- domain (name attribute) by the FQDN
- data by the ip defined in "node[:ipaddress]"
- zone by the tail part of the domain

resolvconf

Set resolv.conf using server attribute.

client

Install Bind utils, configure resolv.conf if requested (by attribute
set_resolv_conf) with recipe resolvconf and call nsupdate recipe.

server

Install, configure and launch Bind. Then call client recipe.

Resources/Providers

default

Add, update or remove a DNS record using nsupdate. Read the
[resources/default.rb](resource file) for more details.

Simple example:
ruby
bind_ddns 'test.foo' do
server 'ns.foo'
data "10.11.12.13"
keyname 'foo'
secret 'XXXX'
end

Use action :delete to delete an entry (default is :add).

Changelog

Available in [CHANGELOG](CHANGELOG).

Contributing

Please read carefully [CONTRIBUTING.md](CONTRIBUTING.md) before making a merge
request.

License and Author

Copyright (c) 2015-2017 Sam4Mobile, 2017-2018 Make.org

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.

Changelog

1.13.0

Main:

  • fix #3: unable to create reverse zones
  • feat: add support to configure start-up options
  • chore: remove extra empty lines in zone template
    • WARNING: this may change zone template and thus discard all current dynamic entries

Tests:

  • use product_name and install_strategy to replace deprecated require_chef_omnibus
  • include .gitlab-ci.yml from test-cookbook

Misc:

  • style(foodcritic): remove use_inline_resource
  • style(rubocop): disable short params name rule
  • chore: add 2018 to copyright notice

1.12.0

Main:

  • feat: add statistics-channels in named.conf

Misc:

  • style(rubocop): fix heredoc delimiters offenses
  • docs: use karma for git format in contributing
  • chore: add foodcritic & rubocop in Gemfile

1.11.0

Main:

  • fix #2: use (configurable) full path for rndc bin

Tests:

  • use .gitlab-ci.yml template [20170731]

1.10.0

Main:

  • fix: correct use of package_retries when nil, which is default (chef 13)
  • fix: allow forward zones to be defined (#1)

Tests:

  • set template for .gitlab-ci.yml [20170529]

Misc:

  • refactor: replace 'bind-ddns' by cookbook_name

1.9.0

Main:

  • Handover maintainance to Make.org

Tests:

  • Use latest template for .gitlab-ci.yml [20170405]
  • Add build_pull for kitchen driver, reorganise opts
  • Fix tests when resolv contains an IPV6 with iface

Misc:

  • Add chef_version, fix license in metadata
  • Fix rubocop offenses (mostly %i with [])
  • Disable FC085 for the moment

1.8.0

Main:

  • Fix output of category (logging) in named.conf
  • Use cookbook_name "macro" everywhere

Tests:

  • Use latest gitlab-ci config (20170117)
  • Fix cleaning of test instances on CI

1.7.0

Main:

  • Add port option for nsupdate resource

Tests:

  • Use latest gitlab-ci config (20161220)
  • Set always_update_cookbooks to avoid old berk lock

1.6.0

Main:

  • Refactor default provider to manage correctly non-A entries
  • Fix #1: nsupdate fails during first run on server

Tests:

  • Use latest gitlab-ci.yml template (20160914)
  • Fix test cleaning, make verify independant
  • Refactor tests, use dig, be more consistent

Misc:

  • Fix rubocop offenses (from new versions)

1.5.0

Main:

  • Fix provider: use nsupdate delete instead of del 'delete' is valid on all version whereas 'del' is only valid since 9.9, make it compatible Centos 6

Tests:

  • Use Continuous Integration with gitlab-ci, use templated config
  • Set skip_preparation to true for kitchen-docker_cli
  • Set seccomp to unconfined for docker run
  • Add option to retry package installation
  • Set forwarders for tests
  • Use nameservers from host to populate test config

Misc:

  • Fix rubocop issue in bindserver_spec.rb
  • Fix rubocop offense on file mode
  • Write changelog in markdown

1.4.0

Main:

  • Can use specific options for clients or servers, to allow clients and
    servers to share the same role

    • Add an init recipe which initialize the configuration correctly
    • Modify default to choose between client and server recipe
    • client specific configurations should be in 'client-config' and servers in 'server-config'
    • the servers should be defined with 'servers' key
    • backward compatibility is not broken
  • Switch to docker_cli, use prepared docker image

    • Switch kitchen driver from docker to docker_cli
    • Use sbernard/centos-systemd-kitchen image instead of bare centos
    • Remove privileged mode :)
    • Remove some now useless monkey patching
    • Fix a typo in kitchen_command, fixing kitchen create command

Misc:

  • Fix default options not merged with user attributes
  • Improve documentation, explain resource attributes and specific configurations
  • Better tests, to test specific option behavior
  • Fix all rubocop offenses
    • In particular, package-client recipe is renamed to package_client

1.3.1

  • Fix deprecated behavior (using nil as argument for a default resource)

1.3.0

  • Use lazy to simplify the definition of template "#{filepath}.erb"
  • Small cleanup of default provider & resource, key info are required
  • Fix idempotency by removing the block hack used to run the resource
  • Add a test case on :delete for default provider

1.2.0

  • Add option for secondary servers in resolv.conf
  • Reorganize README:
    • Move changelog from README to CHANGELOG
    • Move contribution guide to CONTRIBUTING.md
    • Reorder README, fix Gemfile missing
  • Add Apache 2 license file

1.1.0

  • Fix failed run when a zone is reloaded while named is stopped
  • Fix failed run when an interface name is used for its ip and this ip is fetched during the same run
  • Fix failed run when a zone is modified while named is stopped
  • Remove useless field 'hmac' in resource and provider

1.0.1

  • Fix default hostmaster email

1.0.0

  • Initial version with Centos 7 support

Collaborator Number Metric
            

1.13.0 passed this metric

Contributing File Metric
            

1.13.0 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.13.0 passed this metric

No Binaries Metric
            

1.13.0 passed this metric

Testing File Metric
            

1.13.0 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.13.0 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