cookbook 'pdns', '= 5.0.0'
pdns
(50) Versions
5.0.0
-
-
10.0.0
-
9.0.0
-
8.0.3
-
8.0.2
-
8.0.1
-
8.0.0
-
6.1.1
-
6.1.0
-
6.0.0
-
5.0.0
-
4.4.0
-
4.3.1
-
4.3.0
-
4.2.0
-
4.1.0
-
4.0.0
-
3.5.0
-
3.4.1
-
3.4.0
-
3.3.2
-
3.3.1
-
3.3.0
-
3.2.0
-
3.1.0
-
3.0.0
-
2.5.0
-
2.4.1
-
2.4.0
-
2.3.0
-
2.2.1
-
2.2.0
-
2.1.1
-
2.1.0
-
2.0.0
-
1.1.1
-
1.1.0
-
1.0.5
-
1.0.4
-
1.0.3
-
1.0.2
-
1.0.1
-
1.0.0
-
0.3.4
-
0.3.2
-
0.3.0
-
0.2.0
-
0.1.2
-
0.1.0
-
0.0.2
-
0.0.1
Follow14
- 10.0.0
- 9.0.0
- 8.0.3
- 8.0.2
- 8.0.1
- 8.0.0
- 6.1.1
- 6.1.0
- 6.0.0
- 5.0.0
- 4.4.0
- 4.3.1
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.5.0
- 3.4.1
- 3.4.0
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.0
- 1.1.1
- 1.1.0
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.3.4
- 0.3.2
- 0.3.0
- 0.2.0
- 0.1.2
- 0.1.0
- 0.0.2
- 0.0.1
Installs/Configures PowerDNS Recursor and Authoritative server
cookbook 'pdns', '= 5.0.0', :supermarket
knife supermarket install pdns
knife supermarket download pdns
PowerDNS Community Cookbook
Provides resources for installing and configuring both PowerDNS authoritative and recursor. It uses the official PowerDNS repositories for packages and installs the appropiate configuration for your platform's init system.
Build Status
Requirements
Platforms:
- Ubuntu 14.04 and newer
- Debian 8 and newer
- RHEL 7 and newer
- CentOS 6.9 and newer
Chef:
- Chef 13 or newer
Init Systems:
- SysV
- systemd
Usage
Combine the different resources in order to install, configure, and manage your PowerDNS instances. This is a list of resouces that can be used:
| Resource | Functionality |
|-------------------------------------|---------------------------------------------------|
| pdns_authoritative_install | Installs an authoritative server |
| pdns_authoritative_config | Configures an authoritative instance |
| pdns_authoritative_service | Manages an authoritative instance |
| pdns_recursor_install | Installs a recusor |
| pdns_recursor_config | Configures a recursor instance |
| pdns_recursor_service | Manages a a recursor instance |
To fully configure an authoritative server you need to add at least 3 resources to your recipe, pdns_authoritative_install
, pdns_authoritative_config
and pdns_authoritative_service
. If you want to install any backend other than the default (bind) for the authoritative server you need to install the corresponding packages for the backend you want. There is an example for a postgresql backend in test/cookbooks/pdns_test/recipes/
.
For a recursor use the pdns_recursor_install
, pdns_recursor_config
, and pdns_recursor_service
resources in your wrapper cookbooks to install, configure, and define PowerDNS recursors. Set the different properties on the resources according to your install and configuration needs. You can see a good example of this in test/cookbooks/pdns_test/recipes_recursor_install_single.rb
For advanced use it is recommended to take a look at the chef resources themselves.
Properties
A note about instance names
PowerDNS parses the name of the instance by breaking apart the first hyphen it sees so all virtual service names (ones without a blank string) start with the service type and a hyphen. For example:
pdns_authoritative_config 'server_01' do action :create launch ['gpgsql'] variables( gpgsql_host: '127.0.0.1', gpgsql_user: 'pdns', gpgsql_port: 5432, gpgsql_dbname: 'pdns', gpgsql_password: 'wadus' ) end pdns_authoritative_service 'service_01' do action [:enable, :start] end
Will create a file named /etc/powerdns/pdns-server_01.conf
:
launch ['gpgsql']
gpgsql-host=127.0.0.1
gpgsql-user=pdns
gpgsql-port=5432
gpgsql-dbname=pdns
gpgsql-password=wadus
And a service named pdns-server_01
which is symbolically linked linked to pdns
if you are using SysVinit.
General note about resource properties
Most properties are simple ruby strings, but there is another cases that require special attention.
Properties specified as elements in arrays will be split up (see split ruby method) and separated by commas.
Boolean properties will be always translated to 'yes' or 'no'.
Some properties need to be set consistently accross resources, they will be noted in their specific sections at the top under 'Consistent?'.
Most of the properties are optional and have sane defaults, so they are only recommended for customized installs.
pdns_authoritative_install
Installs PowerDNS authoritative server 4.1.x series using PowerDNS official repository in the supported platforms.
Properties
Name | Type | Default value |
---|---|---|
version | String | '' |
series | String | '41' |
debug | true, false | false |
allow_upgrade | true, false | false |
Usage examples
Install the latest 4.1.x series PowerDNS Authoritative Server
pdns_authoritative_install 'server_01'
Install the latest 4.0.x series PowerDNS Authoritative Server
pdns_authoritative_install 'server_01' do series '40' end
Install and upgrade to the latest 4.0.x PowerDNS Authoritative Server release
pdns_authoritative_install 'server_01' do series '40' allow_upgrade true end
pdns_authoritative_config
Creates a PowerDNS recursor configuration, there is a fixed set of required properties (listed below) but most of the configuration is left to the user freely, every property set in the variables
hash property will be rendered in the config template. Remember that using underscores _
for property names is required and it's translated to hyphens -
in configuration templates.
Properties
Name | Class | Default value | Consistent? |
---|---|---|---|
instance_name | String | name_property | Yes |
launch | Array, nil | ['bind'] | No |
config_dir | String | see default_authoritative_config_directory helper method |
Yes |
socket_dir | String | "/var/run/#{resource.instance_name}" | Yes |
run_group | String | see default_authoritative_run_user helper method |
No |
run_user | String | see default_authoritative_run_user helper method |
No |
run_user_home | String | see default_user_attributes helper method |
No |
run_user_shell | String | see default_user_attributes helper method |
No |
setuid | String | resource.run_user | No |
setgid | String | resource.run_group | No |
source | String,nil | 'authoritative_service.conf.erb' | No |
cookbook | String,nil | 'pdns' | No |
variables | Hash | { bind_config: "#{resource.config_dir}/bindbackend.conf" } | No |
Usage Example
Create a PowerDNS authoritative configuration file named server-01
:
pdns_authoritative_config 'server_01' do
action :create
launch ['gpgsql']
variables(
gpgsql_host: '127.0.0.1',
gpgsql_user: 'pdns',
gpgsql_port: 5432,
gpgsql_dbname: 'pdns',
gpgsql_password: 'wadus',
allow_axfr_ips: [ '127.0.0.0/8', '::1', '195.234.23,34'],
api: true,
api-_eadonly: true
)
end
pdns_authoritative_service
Creates a init service to manage a PowerDNS authoritative instance. This service supports all the regular actions (start, stop, restart, etc.). Check the compatibility section to see which init services are supported.
Important: services are not restarted or reloaded automatically on config changes in this cookbook, you need to add this in your wrapper cookbook if you desire this functionality, the pdns_authoritative_service
cookbook provides actions to do it.
Properties
Name | Class | Default value | Consistent? |
---|---|---|---|
instance_name | String | name_property | Yes |
cookbook | String | 'pdns' | No |
source | String | 'authoritative.init.debian.erb' | No |
config_dir | String | See default_authoritative_config_directory helper method |
Yes |
socket_dir | String | "/var/run/#{instance_name}" | Yes |
variables | Hash | {} | No |
Usage example
pdns_authoritative_service 'server_01' do
action [:enable, :start]
end
pdns_recursor_install
Installs PowerDNS recursor 4.1.x series using PowerDNS official repository in the supported platforms.
Properties
Name | Type | Default value |
---|---|---|
version | String | '' |
series | String | '41' |
debug | true, false | false |
allow_upgrade | true, false | false |
Usage examples
Install the latest 4.1.x release PowerDNS recursor
pdns_recursor_install 'latest_4_1_x_recursor'
Install the latest 4.0.x release PowerDNS recursor
pdns_recursor_install 'my_recursor' do series '40' end
Install and upgrade to the latest 4.0.x PowerDNS recursor release
pdns_recursor_install 'my_recursor' do series '40' allow_upgrade true end
pdns_recursor_service
Sets up a PowerDNS recursor instance using the appropiate init system .
Important: services not restarted or reloaded automatically on config changes in this cookbook, you need to add this in your wrapper cookbook if you desire this functionality, the pdns_recursor_service
cookbook provides actions to do it.
Properties
Name | Class | Default value | Consistent? |
---|---|---|---|
instance_name | String | name_property | Yes |
config_dir | String | see default_recursor_config_directory helper method |
Yes |
cookbook (SysVinit) | String,nil | 'pdns' | No |
source (SysVinit) | String,nil | 'recursor.init.#{node['platform_family']}.erb' | No |
variables (SysVinit) | Hash | {} | No |
-
config_dir
: Path of the recursor configuration directory. -
cookbook
: Cookbook for a custom configuration template (Applied only when using SysVinit). -
source
: Name of the recursor custom template (Applied only when using SysVinit). -
variables
: Variables hash to pass to the sysvinit template
Usage Example
Configure a PowerDNS recursor service instance named 'my_recursor' in your wrapper cookbook for Acme Corp with a custom template named my-recursor.erb
pdns_recursor_service 'my_recursor' do
source 'my-recursor.erb'
cookbook 'acme-pdns-recursor'
end
pdns_recursor_config
Creates a PowerDNS recursor configuration.
Properties
| | Name | Class | Default value | Consistent? |
|----------------|-------------|--------------------------------------------------------|-------------|
| instance_name | String | name_property | Yes |
| config_dir | String | see default_recursor_config_directory
helper method | Yes |
| socket_dir | String | /var/run/#{resource.instance_name} | Yes |
| run_group | String | see default_recursor_run_user
helper method | No |
| run_user | String | see default_recursor_run_user
helper method | No |
| run_user_home | String | see default_user_attributes
helper method | No |
| run_user_shell | String | see default_user_attributes
helper method | No |
| setuid | String | resource.run_user | No |
| setgid | String | resource.run_group | No |
| source | String, nil | 'recursor_service.conf.erb' | No |
| cookbook | String, nil | 'pdns' | No |
| variables | Hash | {} | No |
-
config_dir
(C): Path of the recursor configuration directory. -
socket_dir
(C): Directory where sockets are created. -
source
(C): Name of the recursor custom template. -
socket_dir
(C): Directory where sockets are created. -
cookbook
(C): Cookbook for a custom configuration template -
variables
: Variables for the configuration template. -
run_group
: Unix group that runs the recursor. -
run_user
: Unix user that runs the recursor. -
run_user_home
: Home of the Unix user that runs the recursor. -
run_user_shell
: Shell of the Unix user that runs the recursor.
Usage Example
Create a PowerDNS recursor configuration named 'my_recursor' in your wrapper cookbook for Acme Corp which uses a custom template named my-recursor.erb
and a few attributes:
pdns_recursor_config 'my_recursor' do
source 'my-recursor.erb'
cookbook 'acme-pdns-recursor'
variables(client-tcp-timeout: '20', loglevel: '5', network-timeout: '2000')
end
Virtual Hosting
PowerDNS supports virtual hosting: running many instances of PowerDNS on different ports on the same machine. This is done by a few clever hacks on the init scripts that allow to specify different config files for each instance. This cookbook leverages this functionality in both recursor and authoritative.
PowerDNS recommends a specific naming schema authoritative for virtual hosting. Specifically it does not allow hyphens (-) on the init scripts beyond the first which is provided by the init script (/etc/init.d/pdns-
).
We have adopted the convention of using underscores (_) in the name attributes of underscores in order to comply with this requirement.
Contributing
There is an specific file for contributing guidelines on this cokbook: CONTRIBUTING.md
Testing
There is an specific file for testing guidelines on this cokbook: TESTING.md
License & Authors
- Author:: Aaron Kalin (aaron.kalin@dnsimple.com)
- Author:: Amy Aronsohn (amy.aronsohn@dnsimple.com)
- Author:: Jacobo García (jacobo.garcia@dnsimple.com)
- Author:: Anthony Eden (anthony.eden@dnsimple.com)
Copyright:: 2010-2014, Chef Software, Inc & 2014-2018 DNSimple Corp. 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.
Change Log
v5.0.0 (2018-11-26)
Implemented enhancements:
- add an upgrade action to the recursor_install_rhel resource. #84 (MattMencel)
Merged pull requests:
- Add 'series' property for install resources #101 (martinisoft)
- Remove instance_name from install resources #100 (martinisoft)
- Campsite and cleanup cookstyle violations #99 (martinisoft)
- Update dokken config and bump to Chef 13+ #98 (martinisoft)
- Update Copyright #96 (onlyhavecans)
v4.4.0 (2018-03-09)
Implemented enhancements:
Closed issues:
- Support RHEL #93
v4.3.1 (2018-03-08)
Fixed bugs:
- Fix: converge suite authoritative-postgres-centos-6 #63
- Testing cleanup/fixup #92 (martinisoft)
Closed issues:
Merged pull requests:
- Fix config permissions #90 (onlyhavecans)
- Testing to chef 13 #87 (onlyhavecans)
v4.3.0 (2017-08-16)
Fixed bugs:
- Rename default recursor configuration #86 (martinisoft)
v4.2.0 (2017-08-16)
Merged pull requests:
- Move powerdns public key into cookbook #85 (onlyhavecans)
v4.1.0 (2017-08-09)
Fixed bugs:
- Use append so that users can add to the pdns group #82 (onlyhavecans)
Closed issues:
v4.0.0 (2017-08-04)
Implemented enhancements:
Closed issues:
- Add Systemd support #58
v3.5.0 (2017-07-13)
v3.4.1 (2017-06-29)
Closed issues:
- pdns_recursor_service_sysvinit behaves different when using Vagrant or Docker as providers #77
- Recursor refuses to start with custom socket-dir setting #74
Merged pull requests:
- Stopping default recursor on debian based distros for sysvinit #78 (therobot)
- Removing DB schema #76 (therobot)
v3.4.0 (2017-06-27)
Merged pull requests:
v3.3.2 (2017-06-23)
Merged pull requests:
v3.3.1 (2017-06-20)
Merged pull requests:
v3.3.0 (2017-06-14)
Merged pull requests:
v3.2.0 (2017-06-02)
Implemented enhancements:
v3.1.0 (2017-06-01)
Merged pull requests:
- Enhance and fix matchers #67 (therobot)
- Add systemd support for recursor and authoritative PowerDNS #66 (jmauro)
v3.0.0 (2017-05-29)
Implemented enhancements:
- Improving the way configuration options are handled #24
- Authoritative Resource #49 (therobot)
- PowerDNS recursor using Chef 12.5+ resource #48 (therobot)
Fixed bugs:
- Missing libssl-dev on source installs #44
Closed issues:
- Add tests for multi recursor-multi #60
- Add integration test for multi suits #57
- Virtual hosting for recursor #55
- Rename cookbook repository and update metadata/README #47
- Sunset Chef 10.x and possibly 11.x support? #28
- Switch to bind for the default backend #23
- converge will fail on centos 6.5 #18
- Refactor the use of mysql::client #15
Merged pull requests:
v2.5.0 (2017-02-08)
Merged pull requests:
- Upgrade to latest 3.4.11 version / 3.7.4 version #46 (therobot)
- Adding missing dependency libssl dev on source install #45 (therobot)
- Cleanup and campsite the cookbook #40 (martinisoft)
- Docs: recursor is sometimes called resolver #39 (jgoldschrafe)
v2.4.1 (2016-09-14)
Merged pull requests:
- Fix authoritative downlaod link #38 (onlyhavecans)
v2.4.0 (2016-09-13)
Merged pull requests:
v2.3.0 (2016-09-09)
Closed issues:
- Bootstrapping fails #35
Merged pull requests:
- Bump authoritative version due to advisory #37 (onlyhavecans)
v2.2.1 (2016-03-04)
v2.2.0 (2016-03-04)
v2.1.1 (2016-03-04)
Closed issues:
- No pdns-server package #33
v2.1.0 (2016-01-11)
Merged pull requests:
v2.0.0 (2016-01-04)
Merged pull requests:
v1.1.1 (2015-12-23)
Merged pull requests:
v1.1.0 (2015-12-10)
v1.0.5 (2015-11-10)
v1.0.4 (2015-09-02)
v1.0.3 (2015-05-04)
v1.0.2 (2015-05-04)
Merged pull requests:
v1.0.1 (2014-12-17)
v1.0.0 (2014-12-15)
Merged pull requests:
- Cleanup work for the pdns cookbook #22 (martinisoft)
v0.3.4 (2014-07-15)
Merged pull requests:
- Testing and Minor Updates #14 (cwebberOps)
v0.3.3 (2014-07-14)
v0.3.2 (2014-07-14)
Merged pull requests:
- Remove incorrect search domains #11 (carolinebeauchamp)
v0.3.0 (2014-02-21)
v0.2.0 (2013-08-28)
Merged pull requests:
0.1.2 (2013-05-28)
Merged pull requests:
- [COOK-2986] Fix foodcritic warnings #7 (stevendanna)
- [COOK-2604] Configure a PowerDNS server #2 (dje)
* This Change Log was automatically generated by github_changelog_generator
Collaborator Number Metric
5.0.0 passed this metric
Contributing File Metric
5.0.0 passed this metric
Foodcritic Metric
5.0.0 passed this metric
No Binaries Metric
5.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
pdns/files/default/powerdns.asc
Testing File Metric
5.0.0 passed this metric
Version Tag Metric
5.0.0 passed this metric
5.0.0 passed this metric
5.0.0 passed this metric
Foodcritic Metric
5.0.0 passed this metric
No Binaries Metric
5.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
pdns/files/default/powerdns.asc
Testing File Metric
5.0.0 passed this metric
Version Tag Metric
5.0.0 passed this metric
5.0.0 passed this metric
5.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
pdns/files/default/powerdns.asc
Testing File Metric
5.0.0 passed this metric
Version Tag Metric
5.0.0 passed this metric
5.0.0 passed this metric
5.0.0 passed this metric