Ubuntu 20.04
Sponsored Link

OpenStack Yoga : Configure Designate (Network Node)2022/04/07

 
Install OpenStack DNS Service (Designate).
This example is based on the environment like follows.
Install Designate services on Network Node and also install BIND 9 as a backend DNS service on it.
------------+---------------------------+---------------------------+------------
            |                           |                           |
        eth0|10.0.0.30              eth0|10.0.0.50              eth0|10.0.0.51
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Storage Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Open vSwitch     |   |        Libvirt        |
|  Memcached  httpd     |   |     Neutron Server    |   |     Nova Compute      |
|  Keystone   Glance    |   |       OVN-Northd      |   |      Open vSwitch     |
|  Nova API             |   |     Cinder Volume     |   |   OVN Metadata Agent  |
|  Cinder API           |   |     iSCSI Target      |   |     OVN-Controller    |
|                       |   |    Heat API/Engine    |   |                       |
|                       |   |   Designate Services  |   |                       |
+-----------------------+   +-----------------------+   +-----------------------+

[1] Install Designate services and BIND 9.
root@network:~#
apt -y install designate-api designate-central designate-worker designate-producer designate-mdns python3-designateclient bind9 bind9utils
[2] Configure BIND.
root@network:~#
rndc-confgen -a -k designate -c /etc/bind/designate.key

wrote key file "/etc/bind/designate.key"
root@network:~#
chown bind:designate /etc/bind/designate.key

root@network:~#
chmod 640 /etc/bind/designate.key

root@network:~#
mv /etc/bind/named.conf.options /etc/bind/named.conf.options.org

root@network:~#
vi /etc/bind/named.conf.options
# create new

options {
        directory "/var/cache/bind";
        listen-on port 53 { any; };
        listen-on-v6 port 53 { none; };
        # replace query range to your environment
        allow-query     { localhost; 10.0.0.0/24; };
        allow-new-zones yes;
        request-ixfr no;
        recursion no;
        dnssec-validation auto;
        auth-nxdomain no;
};
include "/etc/bind/designate.key";
controls {
    inet 0.0.0.0 port 953
    allow { localhost; } keys { "designate"; };
};

root@network:~#
chmod 644 /etc/bind/named.conf.options

root@network:~#
chown -R bind. /etc/bind

root@network:~#
systemctl restart bind9

[3] Configure Designate.
root@network:~#
mv /etc/designate/designate.conf /etc/designate/designate.conf.org

root@network:~#
vi /etc/designate/designate.conf
# create new

[DEFAULT]
log_dir = /var/log/designate
# RabbitMQ connection info
transport_url = rabbit://openstack:password@10.0.0.30
root_helper = sudo designate-rootwrap /etc/designate/rootwrap.conf

[database]
# MariaDB connection info
connection = mysql+pymysql://designate:password@10.0.0.30/designate

[service:api]
listen = 0.0.0.0:9001
auth_strategy = keystone
api_base_uri = http://10.0.0.50:9001
enable_api_v2 = True
enabled_extensions_v2 = quotas, reports

# Keystone auth info
[keystone_authtoken]
www_authenticate_uri = http://10.0.0.30:5000
auth_url = http://10.0.0.30:5000
memcached_servers = 10.0.0.30:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = designate
password = servicepassword

[service:worker]
enabled = True
notify = True

[storage:sqlalchemy]
# MariaDB connection info
connection = mysql+pymysql://designate:password@10.0.0.30/designate

root@network:~#
chmod 640 /etc/designate/designate.conf

root@network:~#
chgrp designate /etc/designate/designate.conf

root@network:~#
su -s /bin/sh -c "designate-manage database sync" designate

root@network:~#
systemctl restart designate-central designate-api

root@network:~#
systemctl enable designate-central designate-api
root@network:~#
vi /etc/designate/pools.yaml
# create new (replace hostname and IP address to your own environment)

- name: default
  description: Default Pool
  attributes: {}
  ns_records:
    - hostname: network.srv.world.
      priority: 1
  nameservers:
    - host: 10.0.0.50
      port: 53
  targets:
    - type: bind9
      description: BIND9 Server
      masters:
        - host: 10.0.0.50
          port: 5354
      options:
        host: 10.0.0.50
        port: 53
        rndc_host: 10.0.0.50
        rndc_port: 953
        rndc_key_file: /etc/bind/designate.key

root@network:~#
chmod 640 /etc/designate/pools.yaml

root@network:~#
chgrp designate /etc/designate/pools.yaml

root@network:~#
su -s /bin/sh -c "designate-manage pool update" designate

Updating Pools Configuration
****************************
root@network:~#
systemctl restart designate-worker designate-producer designate-mdns

root@network:~#
systemctl enable designate-worker designate-producer designate-mdns
[4] Verify the status of services on a Node. That's OK if all status are [Up].
root@dlp ~(keystone)#
apt -y install python3-designateclient
root@dlp ~(keystone)#
openstack dns service list

+--------------------------------------+-------------------+--------------+--------+-------+--------------+
| id                                   | hostname          | service_name | status | stats | capabilities |
+--------------------------------------+-------------------+--------------+--------+-------+--------------+
| 5cec4412-4173-4968-aea0-49e3bf91b4d7 | network.srv.world | central      | UP     | -     | -            |
| 58ebcd88-7915-4b84-b34c-0a70641a62f9 | network.srv.world | api          | UP     | -     | -            |
| cee0acd3-973c-41d9-9210-4481536c114e | network.srv.world | mdns         | UP     | -     | -            |
| 81cb996b-4bec-49cc-a59e-cbaf668a2c76 | network.srv.world | worker       | UP     | -     | -            |
| 8686dd0f-9bd1-4115-9738-cc100cb8fd5c | network.srv.world | producer     | UP     | -     | -            |
+--------------------------------------+-------------------+--------------+--------+-------+--------------+
Matched Content