CentOS Stream 8
Sponsored Link

OpenStack Xena : Configure Designate (Network Node)2021/11/24

 
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 ]   |   |    [ Network 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    |
|                       |   |   Designate Services  |   |                       |
+-----------------------+   +-----------------------+   +-----------------------+

[1] Install Designate services and BIND 9.
# install from Xena, EPEL, PowerTools

[root@network ~]#
dnf --enablerepo=centos-openstack-xena,powertools,epel -y install openstack-designate-api openstack-designate-central openstack-designate-worker openstack-designate-producer openstack-designate-mdns python3-designateclient bind bind-utils
[2] Configure BIND.
[root@network ~]#
rndc-confgen -a -k designate -c /etc/designate.key -r /dev/urandom

wrote key file "/etc/designate.key"
[root@network ~]#
chown named:designate /etc/designate.key

[root@network ~]#
chmod 640 /etc/designate.key

[root@network ~]#
mv /etc/named.conf /etc/named.conf.org

[root@network ~]#
vi /etc/named.conf
# create new

options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { none; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        # replace query range to your environment
        allow-query     { localhost; 10.0.0.0/24; };
        allow-new-zones yes;
        request-ixfr no;
        recursion no;
        bindkeys-file "/etc/named.iscdlv.key";
        managed-keys-directory "/var/named/dynamic";
        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
};
include "/etc/designate.key";
controls {
    inet 0.0.0.0 port 953
    allow { localhost; } keys { "designate"; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "." IN {
        type hint;
        file "named.ca";
};

[root@network ~]#
chmod 640 /etc/named.conf

[root@network ~]#
chgrp named /etc/named.conf

[root@network ~]#
chown -R named. /var/named

[root@network ~]#
systemctl enable --now named

[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/bash -c "designate-manage database sync" designate

[root@network ~]#
systemctl enable --now 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/designate.key

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

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

[root@network ~]#
su -s /bin/bash -c "designate-manage pool update" designate

Updating Pools Configuration
****************************
[root@network ~]#
systemctl enable --now designate-worker designate-producer designate-mdns
[4] If SELinux is enabled, change policy.
[root@network ~]#
setsebool -P named_write_master_zones on

[5] If Firewalld is running, allow service ports.
[root@network ~]#
firewall-cmd --add-service=dns

[root@network ~]#
firewall-cmd --add-port={5354/tcp,5354/udp,9001/tcp}

success
[root@network ~]#
firewall-cmd --runtime-to-permanent

success
[6] Verify status of services on a Openstack Node. That's OK if all status are [Up].
[root@dlp ~(keystone)]#
dnf --enablerepo=centos-openstack-xena,powertools,epel -y install python3-designateclient
[root@dlp ~(keystone)]#
openstack dns service list

+--------------------------------------+-------------------+--------------+--------+-------+--------------+
| id                                   | hostname          | service_name | status | stats | capabilities |
+--------------------------------------+-------------------+--------------+--------+-------+--------------+
| bd3ef562-fbb0-4205-9c6c-c28248566e67 | network.srv.world | api          | UP     | -     | -            |
| e42add88-e1d7-4d37-9ff2-0b1be396e2bd | network.srv.world | central      | UP     | -     | -            |
| 40467503-b3ef-46f1-a8fb-cafe2ecf8ad3 | network.srv.world | worker       | UP     | -     | -            |
| 6c9a4372-6901-434b-8016-4f9ad89e532c | network.srv.world | producer     | UP     | -     | -            |
| a613d928-4bb8-4f1e-9d14-c87028c0d80c | network.srv.world | mdns         | UP     | -     | -            |
+--------------------------------------+-------------------+--------------+--------+-------+--------------+
Matched Content