填充 Designate 池:
su -s /bin/sh -c "designate-manage pool update" designate
3、启动 Designate 中心和 API 服务:
systemctl enable --now designate-central designate-api
4、验证 Designate 服务运行:
# openstack dns service list -
+--------------+--------+-------+--------------+ | service_name | status | stats | capabilities | +--------------+--------+-------+--------------+ | central | UP | - | - | | api | UP | - | - | | mdns | UP | - | - | | worker | UP | - | - | | producer | UP | - | - | +--------------+--------+-------+--------------+
用外部 DNS 配置 OpenStack Neutron
1、为 Designate 服务配置 iptables:
# iptables -I INPUT -p tcp -m multiport --dports 9001 -m comment --comment "designate incoming" -j ACCEPT # iptables -I INPUT -p tcp -m multiport --dports 5354 -m comment --comment "Designate mdns incoming" -j ACCEPT # iptables -I INPUT -p tcp -m multiport --dports 53 -m comment --comment "bind incoming" -j ACCEPT # iptables -I INPUT -p udp -m multiport --dports 53 -m comment --comment "bind/powerdns incoming" -j ACCEPT # iptables -I INPUT -p tcp -m multiport --dports 953 -m comment --comment "rndc incoming - bind only" -j ACCEPT # service iptables save; service iptables restart # setsebool named_write_master_zones 1
2、 编辑 /etc/neutron/neutron.conf 的 [default] 节:
external_dns_driver = designate
3、 在 /etc/neutron/neutron.conf 中添加 [designate] 节:
[designate] url = http://{{ CONTROLLER_SERVER_IP }}:9001/v2 ## This end point of designate auth_type = password auth_url = http://{{ CONTROLLER_SERVER_IP }}:5000 username = designate password = rhlab123 project_name = services project_domain_name = Default user_domain_name = Default allow_reverse_dns_lookup = True ipv4_ptr_zone_prefix_size = 24 ipv6_ptr_zone_prefix_size = 116
4、编辑 neutron.conf 的 dns_domain :
dns_domain = rhlab.dev.
重启:
# systemctl restart neutron-*
5、在 /etc/neutron/plugins/ml2/ml2_conf.ini 中的组成层 2(ML2)中添加 dns :
extension_drivers=port_security,qos,dns
6、在 Designate 中添加区域:
# openstack zone create –email=admin@rhlab.dev rhlab.dev.
(编辑:ASP站长网)
|