Ubuntu 20.04
Sponsored Link

OpenStack Yoga : How to use Designate2022/04/07

 
This is how to use Designate.
This example is based on the environment like follows.
------------+---------------------------+---------------------------+------------
            |                           |                           |
        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] Login as a user you'd like to set DNS entry. It's OK to work on any node. (This example is on Control Node) For example, create a [server.education] zone.
ubuntu@dlp ~(keystone)$
openstack zone create --email dnsmaster@server.education server.education.

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | CREATE                               |
| attributes     |                                      |
| created_at     | 2022-04-07T03:49:40.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | b171dfb8-507f-443e-b4cb-6fa94b11305f |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | d3434f55aa5541cfab5f13916da0697d     |
| serial         | 1649303380                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | None                                 |
| version        | 1                                    |
+----------------+--------------------------------------+

# OK if [status] is [ACTIVE]

ubuntu@dlp ~(keystone)$
openstack zone list

+--------------------------------------+-------------------+---------+------------+--------+--------+
| id                                   | name              | type    |     serial | status | action |
+--------------------------------------+-------------------+---------+------------+--------+--------+
| b171dfb8-507f-443e-b4cb-6fa94b11305f | server.education. | PRIMARY | 1649303380 | ACTIVE | NONE   |
+--------------------------------------+-------------------+---------+------------+--------+--------+

# add [A] record

ubuntu@dlp ~(keystone)$
openstack recordset create --record '192.168.100.10' --type A server.education. node01

+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| action      | CREATE                               |
| created_at  | 2022-04-07T03:50:12.000000           |
| description | None                                 |
| id          | 11acfbed-fa25-4df0-8f0c-6ac65d5bf149 |
| name        | node01.server.education.             |
| project_id  | d3434f55aa5541cfab5f13916da0697d     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | b171dfb8-507f-443e-b4cb-6fa94b11305f |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

# OK if [status] is [ACTIVE]

ubuntu@dlp ~(keystone)$
openstack recordset list server.education.

+--------------------------------------+--------------------------+------
| id                                   | name                     | type 
+--------------------------------------+--------------------------+------
| 3826d317-6afc-4bb7-9805-9a563aadbe24 | server.education.        | NS   
| 94316e81-cf29-44a0-9013-b29101892b53 | server.education.        | SOA  
| 11acfbed-fa25-4df0-8f0c-6ac65d5bf149 | node01.server.education. | A    
+--------------------------------------+--------------------------+------
+-------------------------------------------------------------------------------+--------+--------+
| records                                                                       | status | action |
+-------------------------------------------------------------------------------+--------+--------+
| network.srv.world.                                                            | ACTIVE | NONE   |
| network.srv.world. dnsmaster.server.education. 1649303412 3546 600 86400 3600 | ACTIVE | NONE   |
| 192.168.100.10                                                                | ACTIVE | NONE   |
+-------------------------------------------------------------------------------+--------+--------+

# verify resolution

ubuntu@dlp ~(keystone)$
dig -p 5354 @network.srv.world node01.server.education.


; <<>> DiG 9.16.1-Ubuntu <<>> -p 5354 @network.srv.world node01.server.education.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34206
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 8192
;; QUESTION SECTION:
;node01.server.education.       IN      A

;; ANSWER SECTION:
node01.server.education. 3600   IN      A       192.168.100.10

;; Query time: 24 msec
;; SERVER: 10.0.0.50#5354(10.0.0.50)
;; WHEN: Thu Apr 07 12:50:57 JST 2022
;; MSG SIZE  rcvd: 68
[2] For example, create a [192.168.100.0/24] reverse zone.
ubuntu@dlp ~(keystone)$
openstack zone create --email dnsmaster@server.education 100.168.192.in-addr.arpa.

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | CREATE                               |
| attributes     |                                      |
| created_at     | 2022-04-07T03:52:00.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 9cb90696-50b4-4140-b70f-243d55ef8f39 |
| masters        |                                      |
| name           | 100.168.192.in-addr.arpa.            |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | d3434f55aa5541cfab5f13916da0697d     |
| serial         | 1649303520                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | None                                 |
| version        | 1                                    |
+----------------+--------------------------------------+

# OK if [status] is [ACTIVE]

ubuntu@dlp ~(keystone)$
openstack zone list

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| b171dfb8-507f-443e-b4cb-6fa94b11305f | server.education.         | PRIMARY | 1649303412 | ACTIVE | NONE   |
| 9cb90696-50b4-4140-b70f-243d55ef8f39 | 100.168.192.in-addr.arpa. | PRIMARY | 1649303520 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+

# add PTR record

ubuntu@dlp ~(keystone)$
openstack recordset create --record 'node01.server.education.' --type PTR 100.168.192.in-addr.arpa. 10

+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| action      | CREATE                               |
| created_at  | 2022-04-07T03:52:57.000000           |
| description | None                                 |
| id          | f17d2874-e6bd-49c0-8a52-b96d88a1e985 |
| name        | 10.100.168.192.in-addr.arpa.         |
| project_id  | d3434f55aa5541cfab5f13916da0697d     |
| records     | node01.server.education.             |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | PTR                                  |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | 9cb90696-50b4-4140-b70f-243d55ef8f39 |
| zone_name   | 100.168.192.in-addr.arpa.            |
+-------------+--------------------------------------+

# OK if [status] is [ACTIVE]

ubuntu@dlp ~(keystone)$
openstack recordset list 100.168.192.in-addr.arpa.

+--------------------------------------+------------------------------+------
| id                                   | name                         | type 
+--------------------------------------+------------------------------+------
| 20931006-4c76-445c-91d7-71c005271b90 | 100.168.192.in-addr.arpa.    | NS   
| 9a8decc8-c6e7-41e0-8c77-0c48e5328323 | 100.168.192.in-addr.arpa.    | SOA  
| f17d2874-e6bd-49c0-8a52-b96d88a1e985 | 10.100.168.192.in-addr.arpa. | PTR  
+--------------------------------------+------------------------------+------
+-------------------------------------------------------------------------------+--------+--------+
| records                                                                       | status | action |
+-------------------------------------------------------------------------------+--------+--------+
| network.srv.world.                                                            | ACTIVE | NONE   |
| network.srv.world. dnsmaster.server.education. 1649303577 3513 600 86400 3600 | ACTIVE | NONE   |
| node01.server.education.                                                      | ACTIVE | NONE   |
+-------------------------------------------------------------------------------+--------+--------+

# verify resolution

ubuntu@dlp ~(keystone)$
dig -p 5354 @network.srv.world -x 192.168.100.10


; <<>> DiG 9.16.1-Ubuntu <<>> -p 5354 @network.srv.world -x 192.168.100.10
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64882
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 8192
;; QUESTION SECTION:
;10.100.168.192.in-addr.arpa.   IN      PTR

;; ANSWER SECTION:
10.100.168.192.in-addr.arpa. 3600 IN    PTR     node01.server.education.

;; Query time: 28 msec
;; SERVER: 10.0.0.50#5354(10.0.0.50)
;; WHEN: Thu Apr 07 12:53:35 JST 2022
;; MSG SIZE  rcvd: 93
[3] To delete record or zone, do like follows.
ubuntu@dlp ~(keystone)$
openstack recordset list server.education.

+--------------------------------------+--------------------------+------
| id                                   | name                     | type 
+--------------------------------------+--------------------------+------
| 3826d317-6afc-4bb7-9805-9a563aadbe24 | server.education.        | NS   
| 94316e81-cf29-44a0-9013-b29101892b53 | server.education.        | SOA  
| 11acfbed-fa25-4df0-8f0c-6ac65d5bf149 | node01.server.education. | A    
+--------------------------------------+--------------------------+------
+-------------------------------------------------------------------------------+--------+--------+
| records                                                                       | status | action |
+-------------------------------------------------------------------------------+--------+--------+
| network.srv.world.                                                            | ACTIVE | NONE   |
| network.srv.world. dnsmaster.server.education. 1649303412 3546 600 86400 3600 | ACTIVE | NONE   |
| 192.168.100.10                                                                | ACTIVE | NONE   |
+-------------------------------------------------------------------------------+--------+--------+

# delete [node01] record

ubuntu@dlp ~(keystone)$
openstack recordset delete server.education. node01.server.education.

+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| action      | DELETE                               |
| created_at  | 2022-04-07T03:50:12.000000           |
| description | None                                 |
| id          | 11acfbed-fa25-4df0-8f0c-6ac65d5bf149 |
| name        | node01.server.education.             |
| project_id  | d3434f55aa5541cfab5f13916da0697d     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | 2022-04-07T03:54:36.000000           |
| version     | 2                                    |
| zone_id     | b171dfb8-507f-443e-b4cb-6fa94b11305f |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

ubuntu@dlp ~(keystone)$
openstack recordset list server.education.

+--------------------------------------+-------------------+------
| id                                   | name              | type 
+--------------------------------------+-------------------+------
| 3826d317-6afc-4bb7-9805-9a563aadbe24 | server.education. | NS   
| 94316e81-cf29-44a0-9013-b29101892b53 | server.education. | SOA  
+--------------------------------------+-------------------+------
+-------------------------------------------------------------------------------+--------+--------+
| records                                                                       | status | action |
+-------------------------------------------------------------------------------+--------+--------+
| network.srv.world.                                                            | ACTIVE | NONE   |
| network.srv.world. dnsmaster.server.education. 1649303676 3546 600 86400 3600 | ACTIVE | NONE   |
+-------------------------------------------------------------------------------+--------+--------+

ubuntu@dlp ~(keystone)$
openstack zone list

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| b171dfb8-507f-443e-b4cb-6fa94b11305f | server.education.         | PRIMARY | 1649303676 | ACTIVE | NONE   |
| 9cb90696-50b4-4140-b70f-243d55ef8f39 | 100.168.192.in-addr.arpa. | PRIMARY | 1649303577 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+

# delete [server.education.] zone

ubuntu@dlp ~(keystone)$
openstack zone delete server.education.

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | DELETE                               |
| attributes     |                                      |
| created_at     | 2022-04-07T03:49:40.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | b171dfb8-507f-443e-b4cb-6fa94b11305f |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | d3434f55aa5541cfab5f13916da0697d     |
| serial         | 1649303676                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | 2022-04-07T03:55:34.000000           |
| version        | 7                                    |
+----------------+--------------------------------------+

ubuntu@dlp ~(keystone)$
openstack zone list

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| 9cb90696-50b4-4140-b70f-243d55ef8f39 | 100.168.192.in-addr.arpa. | PRIMARY | 1649303577 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
Matched Content