Add support for deploying multiple DNS servers
This commit is contained in:
parent
4a4c2a87e6
commit
f5ba64c51d
|
@ -41,10 +41,10 @@ default['openstack']['dns']['syslog']['use'] = false
|
|||
default['openstack']['dns']['api']['auth']['version'] = node['openstack']['api']['auth']['version']
|
||||
|
||||
# Settings for the default pool
|
||||
default['openstack']['dns']['pool']['ns_hostname'] = 'ns1.example.org.'
|
||||
default['openstack']['dns']['pool']['ns_address'] = '127.0.0.1'
|
||||
default['openstack']['dns']['pool']['ns_hostnames'] = ['ns1.example.org.']
|
||||
default['openstack']['dns']['pool']['ns_addresses'] = ['127.0.0.1']
|
||||
default['openstack']['dns']['pool']['masters'] = ['127.0.0.1']
|
||||
default['openstack']['dns']['pool']['bind_host'] = '127.0.0.1'
|
||||
default['openstack']['dns']['pool']['bind_hosts'] = ['127.0.0.1']
|
||||
|
||||
# platform-specific settings
|
||||
default['openstack']['dns']['user'] = 'designate'
|
||||
|
|
|
@ -7,7 +7,7 @@ source_url 'https://github.com/cloudbau/cookbook-openstack-dns' if respond_to?(:
|
|||
license 'Apache 2.0'
|
||||
description 'Installs and configures the Designate Service'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '0.1.0'
|
||||
version '0.2.0'
|
||||
|
||||
%w(ubuntu redhat centos).each do |os|
|
||||
supports os
|
||||
|
|
|
@ -139,10 +139,10 @@ template '/etc/designate/pools.yaml' do
|
|||
mode 00644
|
||||
variables(
|
||||
banner: node['openstack']['dns']['custom_template_banner'],
|
||||
bind_host: pool_config['bind_host'],
|
||||
bind_hosts: pool_config['bind_hosts'],
|
||||
masters: pool_config['masters'],
|
||||
ns_address: pool_config['ns_address'],
|
||||
ns_hostname: pool_config['ns_hostname']
|
||||
ns_addresses: pool_config['ns_addresses'],
|
||||
ns_hostnames: pool_config['ns_hostnames']
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -11,26 +11,26 @@
|
|||
# This should be a record that is created outside of designate, that
|
||||
# points to the public IP of the controller node.
|
||||
ns_records:
|
||||
- hostname: <%= @ns_hostname %>
|
||||
<% @ns_hostnames.each do |ns_hostname| %>
|
||||
- hostname: <%= ns_hostname %>
|
||||
priority: 1
|
||||
<% end %>
|
||||
|
||||
# List out the nameservers for this pool. These are the actual BIND servers.
|
||||
# We use these to verify changes have propagated to all nameservers.
|
||||
nameservers:
|
||||
- host: <%= @ns_address %>
|
||||
<% @ns_addresses.each do |ns_address| %>
|
||||
- host: <%= ns_address %>
|
||||
port: 53
|
||||
<% end %>
|
||||
|
||||
# List out the targets for this pool. For BIND there will be one
|
||||
# entry for each BIND server, as we have to run rndc command on each server
|
||||
targets:
|
||||
<% @bind_hosts.each do |bind_host| %>
|
||||
- type: bind9
|
||||
description: BIND9 Server 1
|
||||
description: BIND9 Server <%= bind_host %>
|
||||
|
||||
# List out the designate-mdns servers from which BIND servers should
|
||||
# request zone transfers (AXFRs) from.
|
||||
# This should be the IP of the controller node.
|
||||
# If you have multiple controllers you can add multiple masters
|
||||
# by running designate-mdns on them, and adding them here.
|
||||
masters:
|
||||
<% @masters.each do |host| %>
|
||||
- host: <%= host %>
|
||||
|
@ -39,8 +39,9 @@
|
|||
|
||||
# BIND Configuration options
|
||||
options:
|
||||
host: <%= @bind_host %>
|
||||
host: <%= bind_host %>
|
||||
port: 53
|
||||
rndc_host: <%= @bind_host %>
|
||||
rndc_host: <%= bind_host %>
|
||||
rndc_port: 953
|
||||
rndc_key_file: /etc/designate/rndc.key
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue