45 lines
1.5 KiB
Ruby
45 lines
1.5 KiB
Ruby
#
|
|
# Cookbook:: openstack-dns
|
|
# Recipe:: neutron_int
|
|
#
|
|
# Copyright:: 2017, x-ion GmbH
|
|
# Copyright:: 2020, Oregon State University
|
|
#
|
|
# 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.
|
|
#
|
|
|
|
class ::Chef::Recipe
|
|
include ::Openstack
|
|
end
|
|
|
|
dns_endpoint = internal_endpoint 'dns-api'
|
|
dns_url = dns_endpoint.to_s + '/v2'
|
|
|
|
identity_endpoint = internal_endpoint 'identity'
|
|
auth_url = identity_endpoint.to_s
|
|
|
|
node.default['openstack']['network']['conf'].tap do |conf|
|
|
conf['DEFAULT']['external_dns_driver'] = 'designate'
|
|
conf['designate']['url'] = dns_url
|
|
conf['designate']['auth_type'] = 'password'
|
|
conf['designate']['auth_url'] = auth_url
|
|
conf['designate']['username'] = 'designate'
|
|
conf['designate']['project_name'] = 'service'
|
|
conf['designate']['project_domain_name'] = 'Default'
|
|
conf['designate']['user_domain_name'] = 'Default'
|
|
end
|
|
|
|
node.default['openstack']['network']['conf_secrets'].tap do |conf_secrets|
|
|
conf_secrets['designate']['password'] = get_password 'service', 'openstack-dns'
|
|
end
|