Giter VIP home page Giter VIP logo

djbdns's Introduction

djbdns Cookbook

Cookbook Version CI State OpenCollective OpenCollective License

Installs and configures Dan Bernstein's DNS tinydns, aka djbdns. Services are configured to start up under runit.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If youโ€™d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Platforms

The following platforms are supported via test kitchen.

  • Ubuntu
  • Debian
  • RHEL

It may work with or without modification on other platforms, particularly using the source install method.

Chef

  • Chef 14+

Cookbooks

  • build-essential - for compiling the source.
  • ucspi-tcp - tcpserver is used by the axfr recipe.
  • runit - for setting up the services.

Attributes

  • node['djbdns']['tinydns_ipaddress'] - listen address for public facing tinydns server
  • node['djbdns']['tinydns_internal_ipaddress'] - listen address for internal tinydns server
  • node['djbdns']['public_dnscache_ipaddress'] - listen address for public DNS cache
  • node['djbdns']['axfrdns_ipaddress'] - listen address for axfrdns
  • node['djbdns']['public_dnscache_allowed_networks'] - subnets that are allowed to talk to the dnscache.
  • node['djbdns']['tinydns_internal_resolved_domain'] - default domain this tinydns serves
  • node['djbdns']['tinydns_internal_resolved_reverse_domains'] - default in-addr.arpa domains this tinydns serves
  • node['djbdns']['axfrdns_dir'] - default location of the axfrdns service and configuration, default /etc/djbdns/axfrdns
  • node['djbdns']['tinydns_dir'] - default location of the tinydns service and configuration, default /etc/djbdns/tinydns
  • node['djbdns']['tinydns_internal_dir'] - default location of the tinydns internal service and configuration, default /etc/djbdns/tinydns_internal
  • node['djbdns']['public_dnscache_dir'] - default location of the public dnscache service and configuration, default /etc/djbdns/public-dnscache
  • node['djbdns']['bin_dir'] - default location where binaries will be stored.
  • node['djbdns']['axfrdns_uid'] - default uid for the axfrdns user
  • node['djbdns']['dnscache_uid'] - default uid for the dnscache user
  • node['djbdns']['dnslog_uid'] - default uid for the dnslog user
  • node['djbdns']['tinydns_uid'] - default uid for the tinydns user
  • node['djbdns']['package_name'] - name of the djbdns package. this shouldn't be changed most of the time, but may be necessary to use the Debian fork, dbndns.
  • node['djbdns']['install_method'] - method used to install djbdns, can be package, or source.

Resources

djbdns_rr

Adds a resource record for the specified FQDN.

Actions

  • :add: Creates a new entry in the tinydns data file with the add-X scripts in the tinydns root directory.

Attribute Parameters

  • fqdn: name attribute. specifies the fully qualified domain name of the record.
  • ip: ip address for the record.
  • type: specifies the type of entry. valid types are: alias, alias6, childns, host, host6, mx, and ns. default is host.
  • cwd: current working directory where the add scripts and data files must be located. default is the node attribute djbdns[:tinydns_internal_dir], usually /etc/djbdns/tinydns-internal.

Example

djbdns_rr 'www.example.com' do
  ip '192.168.0.100'
  type 'host'
  action :add
  notifies :run, 'execute[build-tinydns-internal-data]'
end

(The resource execute[build-tinydns-internal-data] should run a make in the tinydns root directory (aka cwd).

Recipes

default

The default recipe installs djbdns software from package where available, otherwise installs from source. It also sets up the users that will run the djbdns services using the UID's specified by the attributes above. The service type to use is selected based on platform.

The default recipe attempts to install djbdns on as many platforms as possible. It tries to determine the platform's installation method:

  • Debian will install from packages
  • All other distributions will install from source.

Service specific users will be created as system users:

  • dnscache
  • dnslog
  • tinydns

axfr

Creates the axfrdns user and sets up the axfrdns service.

cache

Sets up a local DNS caching server.

internal_server

Sets up a server to be an internal nameserver. To modify resource records in the environment, modify the tinydns-internal-data.erb template, or create entries in a data bag named djbdns, and an item named after the domain, with underscores instead of spaces. Example structure of the data bag:

{
  "id": "int_example_com",
  "ns": [
    { "int.example.com": "192.168.0.5" },
    { "0.168.192.in-addr.arpa": "192.168.0.5" }
  ],
  "alias": [
    { "www.int.example.com": "192.168.0.100" }
  ],
  "host": [
    { "web1.int.example.com": "192.168.0.100" }
  ]
}

Aliases and hosts should be an array of hashes, each entry containing the fqdn as the key and the IP as the value. In this example 192.168.0.5 is the IP of the nameserver and we're listing it as authoritative for int.example.com and for reverse DNS for 192.168.0.x.

server

Sets up a server to be a public nameserver. To modify resource records in the environment, modify the tinydns-data.erb template. The recipe does not yet use the data bag per internal_server above, but will in a future release.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

djbdns's People

Contributors

arr-dev avatar atkrad avatar damacus avatar hartmantis avatar josephholsten avatar jtimberman avatar kitchen-porter avatar nathenharvey avatar patcon avatar ramereth avatar renovate[bot] avatar stevendanna avatar tas50 avatar xorima avatar xorimabot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

djbdns's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • sous-chefs/.github 3.0.0
  • actions/checkout v4
  • actionshub/chef-install 2.0.4
  • actionshub/test-kitchen 2.1.0
.github/workflows/stale.yml
  • actions/stale v8

  • Check this box to trigger a request for Renovate to run again on this repository

add support for fedora

fedora has a package ndjbdns that might be useful, and will certainly require a fair amount of refactoring.

runit dependency conflicts with nginx cookbook

djbdns requires runit <= 0.16.2 while nginx (i use version 2.7.4) requires runit ~> 1.2. This causes chef-client run fail with error:

Cookbook dependency resolution error:

Error message: Unable to satisfy constraints on package runit due to solution constraint (hadoop >= 0.0.0). Solution constraints that may result in a constraint on runit:
...
You might be able to resolve this issue with:
1-) Removing cookbook versions that depend on deleted cookbooks.
2-) Removing unused cookbook versions.
3-) Pinning exact cookbook versions using environments.

Can we remove (runit) <= 0.16.2 from dependency.

Remove bluepill support

I no longer use bluepill, and I'd like to clean up the additional complexity supporting a third process supervision suite brings to this cookbook.

debian is a source based install now

Debian has removed the djbdns package from at least version 7+, and appears to have replaced it with dbndns, a Debian-ized fork of djbdns.

While it uses the djbdns source package, neither package is available for wheezy or jessie (as of now, the testing codename). It's in sid, but no one should use sid, even with apt pinning, for essential services such as DNS servers.

Users who wish to use a package based installation of djbdns can do so by setting the install_method attribute (coming soon to a master branch near you) to "package", and also building and hosting their own package. This should be relatively simple for anyone familiar with running their own apt repository.

Modernize djbdns_rr

Use:

  • converge_by to support why run mode
  • state_attrs to support chef reporting
  • use_inline_resources

drop support for old ubuntu versions

The cookbook's currently released version "supports" ubuntu 6.06 through 8.04, all of which are long EOL (or should be ๐ŸŽฑ ๐Ÿ˜ธ). This support is made possible by using a "source" install method. That install method will be the "we didn't know about another way to package install this so fall back" method, so this is essential no change.

use runit as the default service type

Currently the fallback/default service type is bluepill, which is a fine cross-platform supervision suite. However, the runit cookbook supports RHEL platforms in addition to Debian platforms with a package installation method, so it stands to reason that it is a cromulent service type there as well. Also, the latest in test kitchen goodness for this cookbook works just fine on CentOS 5 and 6, so we know it will work well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.