设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 手机 数据 公司
当前位置: 首页 > 服务器 > 搭建环境 > Windows > 正文

用OpenStack Designate构建一个DNS即服务(DNSaaS)(2)

发布时间:2019-05-15 02:26 所属栏目:117 来源:Amjad Yaseen
导读:在 [service:api] 节配置 auth_strategy : [service:api] listen = 0.0.0.0:9001 auth_strategy = keystone api_base_uri = http://{{ CONTROLLER_SERVER_IP }}:9001/ enable_api_v2 = True enabled_extensions_v2

[service:api] 节配置 auth_strategy

  1. [service:api]
  2. listen = 0.0.0.0:9001
  3. auth_strategy = keystone
  4. api_base_uri = http://{{ CONTROLLER_SERVER_IP }}:9001/
  5. enable_api_v2 = True
  6. enabled_extensions_v2 = quotas, reports

[keystone_authtoken] 节配置下列选项:

  1. [keystone_authtoken]
  2. auth_type = password
  3. username = designate
  4. password = rhlab123
  5. project_name = service
  6. project_domain_name = Default
  7. user_domain_name = Default
  8. www_authenticate_uri = http://{{ CONTROLLER_SERVER_IP }}:5000/
  9. auth_url = http://{{ CONTROLLER_SERVER_IP }}:5000/

[service:worker] 节,启用 worker 模型:

  1. enabled = True
  2. notify = True

[storage:sqlalchemy] 节,配置数据库访问:

  1. [storage:sqlalchemy]
  2. connection = mysql+pymysql://designate:rhlab123@{{ CONTROLLER_SERVER_IP }}/designate

填充 Designate 数据库:

  1. # su -s /bin/sh -c "designate-manage database sync" designate

2、 创建 Designate 的 pools.yaml 文件(包含 target 和 bind 细节):

编辑 /etc/designate/pools.yaml

  1. - name: default
  2. # The name is immutable. There will be no option to change the name after
  3. # creation and the only way will to change it will be to delete it
  4. # (and all zones associated with it) and recreate it.
  5. description: Default Pool
  6.  
  7. attributes: {}
  8.  
  9. # List out the NS records for zones hosted within this pool
  10. # This should be a record that is created outside of designate, that
  11. # points to the public IP of the controller node.
  12. ns_records:
  13. - hostname: {{Controller_FQDN}}. # Thisis mDNS
  14. priority: 1
  15.  
  16. # List out the nameservers for this pool. These are the actual BIND servers.
  17. # We use these to verify changes have propagated to all nameservers.
  18. nameservers:
  19. - host: {{ DNS_SERVER_IP }}
  20. port: 53
  21.  
  22. # List out the targets for this pool. For BIND there will be one
  23. # entry for each BIND server, as we have to run rndc command on each server
  24. targets:
  25. - type: bind9
  26. description: BIND9 Server 1
  27.  
  28. # List out the designate-mdns servers from which BIND servers should
  29. # request zone transfers (AXFRs) from.
  30. # This should be the IP of the controller node.
  31. # If you have multiple controllers you can add multiple masters
  32. # by running designate-mdns on them, and adding them here.
  33. masters:
  34. - host: {{ CONTROLLER_SERVER_IP }}
  35. port: 5354
  36.  
  37. # BIND Configuration options
  38. options:
  39. host: {{ DNS_SERVER_IP }}
  40. port: 53
  41. rndc_host: {{ DNS_SERVER_IP }}
  42. rndc_port: 953
  43. rndc_key_file: /etc/rndc.key
  44. rndc_config_file: /etc/rndc.conf

(编辑:ASP站长网)

网友评论
推荐文章
    热点阅读