CentOS Stream 9
Sponsored Link

OpenStack Zed : How to use Designate2022/11/11

 
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
+-----------+-----------+     +-----------+-----------+     +-----------+-----------+
|   [ dlp.srv.world ]   |     | [ network.srv.world ] |     |  [ node01.srv.world ] |
|     (Control Node)    |     |     (Network Node)    |     |     (Compute Node)    |
|                       |     |                       |     |                       |
|  MariaDB    RabbitMQ  |     |      Open vSwitch     |     |        Libvirt        |
|  Memcached  Nginx     |     |     Neutron Server    |     |      Nova Compute     |
|  Keystone   httpd     |     |      OVN-Northd       |     |      Open vSwitch     |
|  Glance     Nova API  |     |  Nginx  iSCSI Target  |     |   OVN Metadata Agent  |
|  Cinder API           |     |     Cinder Volume     |     |     OVN-Controller    |
|                       |     |   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.
[cent@dlp ~(keystone)]$
openstack zone create --email dnsmaster@server.education server.education.

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | CREATE                               |
| attributes     |                                      |
| created_at     | 2022-11-11T03:54:10.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 0890bae4-2239-4016-bf4e-107b2395ce7a |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 28b6e37c787240e4a975d3614821cc71     |
| serial         | 1668138850                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | None                                 |
| version        | 1                                    |
+----------------+--------------------------------------+

# OK if [status] is [ACTIVE]

[cent@dlp ~(keystone)]$
openstack zone list

+--------------------------------------+-------------------+---------+------------+--------+--------+
| id                                   | name              | type    |     serial | status | action |
+--------------------------------------+-------------------+---------+------------+--------+--------+
| 0890bae4-2239-4016-bf4e-107b2395ce7a | server.education. | PRIMARY | 1668138850 | ACTIVE | NONE   |
+--------------------------------------+-------------------+---------+------------+--------+--------+

# add [A] record

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

+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| action      | CREATE                               |
| created_at  | 2022-11-11T03:54:48.000000           |
| description | None                                 |
| id          | e70e3b41-38b3-4432-8700-163025b5fa17 |
| name        | node01.server.education.             |
| project_id  | 28b6e37c787240e4a975d3614821cc71     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | 0890bae4-2239-4016-bf4e-107b2395ce7a |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

# OK if [status] is [ACTIVE]

[cent@dlp ~(keystone)]$
openstack recordset list server.education.

+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name                     | type | records                                                                       | status | action |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| 5372a4d9-89c4-4ca7-af50-cf82bbb4b9b3 | server.education.        | SOA  | network.srv.world. dnsmaster.server.education. 1668138888 3567 600 86400 3600 | ACTIVE | NONE   |
| d24ada8c-0fd6-49d6-bff3-be1d1c34bf36 | server.education.        | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| e70e3b41-38b3-4432-8700-163025b5fa17 | node01.server.education. | A    | 192.168.100.10                                                                | ACTIVE | NONE   |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+

# verify resolution

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


; <<>> DiG 9.16.23-RH <<>> -p 5354 @network.srv.world node01.server.education.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 8926
;; 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: 8 msec
;; SERVER: 10.0.0.50#5354(10.0.0.50)
;; WHEN: Fri Nov 11 12:55:37 JST 2022
;; MSG SIZE  rcvd: 68
[2] For example, create a [192.168.100.0/24] reverse zone.
[cent@dlp ~(keystone)]$
openstack zone create --email dnsmaster@server.education 100.168.192.in-addr.arpa.

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | CREATE                               |
| attributes     |                                      |
| created_at     | 2022-11-11T03:56:21.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | daaf8399-6e22-44d8-9436-71689c60cbf0 |
| masters        |                                      |
| name           | 100.168.192.in-addr.arpa.            |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 28b6e37c787240e4a975d3614821cc71     |
| serial         | 1668138981                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | None                                 |
| version        | 1                                    |
+----------------+--------------------------------------+

# OK if [status] is [ACTIVE]

[cent@dlp ~(keystone)]$
openstack zone list

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| 0890bae4-2239-4016-bf4e-107b2395ce7a | server.education.         | PRIMARY | 1668138888 | ACTIVE | NONE   |
| daaf8399-6e22-44d8-9436-71689c60cbf0 | 100.168.192.in-addr.arpa. | PRIMARY | 1668138981 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+

# add PTR record

[cent@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-11-11T03:57:09.000000           |
| description | None                                 |
| id          | 743f817c-9df5-4680-8585-114e53c27d21 |
| name        | 10.100.168.192.in-addr.arpa.         |
| project_id  | 28b6e37c787240e4a975d3614821cc71     |
| records     | node01.server.education.             |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | PTR                                  |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | daaf8399-6e22-44d8-9436-71689c60cbf0 |
| zone_name   | 100.168.192.in-addr.arpa.            |
+-------------+--------------------------------------+

# OK if [status] is [ACTIVE]

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

+--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name                         | type | records                                                                       | status | action |
+--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| 2892be72-c418-42dc-8751-773a3e5deef4 | 100.168.192.in-addr.arpa.    | SOA  | network.srv.world. dnsmaster.server.education. 1668139029 3589 600 86400 3600 | ACTIVE | NONE   |
| 60f25cfd-9c9f-46d9-a39d-a9f828493edf | 100.168.192.in-addr.arpa.    | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| 743f817c-9df5-4680-8585-114e53c27d21 | 10.100.168.192.in-addr.arpa. | PTR  | node01.server.education.                                                      | ACTIVE | NONE   |
+--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+

# verify resolution

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


; <<>> DiG 9.16.23-RH <<>> -p 5354 @network.srv.world -x 192.168.100.10
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 18903
;; 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: 8 msec
;; SERVER: 10.0.0.50#5354(10.0.0.50)
;; WHEN: Fri Nov 11 12:58:05 JST 2022
;; MSG SIZE  rcvd: 93
[3] To delete records or zones, do like follows.
[cent@dlp ~(keystone)]$
openstack recordset list server.education.

+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name                     | type | records                                                                       | status | action |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| 5372a4d9-89c4-4ca7-af50-cf82bbb4b9b3 | server.education.        | SOA  | network.srv.world. dnsmaster.server.education. 1668138888 3567 600 86400 3600 | ACTIVE | NONE   |
| d24ada8c-0fd6-49d6-bff3-be1d1c34bf36 | server.education.        | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| e70e3b41-38b3-4432-8700-163025b5fa17 | node01.server.education. | A    | 192.168.100.10                                                                | ACTIVE | NONE   |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+

# delete the [node01] record

[cent@dlp ~(keystone)]$
openstack recordset delete server.education. node01.server.education.

+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| action      | DELETE                               |
| created_at  | 2022-11-11T03:54:48.000000           |
| description | None                                 |
| id          | e70e3b41-38b3-4432-8700-163025b5fa17 |
| name        | node01.server.education.             |
| project_id  | 28b6e37c787240e4a975d3614821cc71     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | 2022-11-11T03:59:08.000000           |
| version     | 2                                    |
| zone_id     | 0890bae4-2239-4016-bf4e-107b2395ce7a |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

[cent@dlp ~(keystone)]$
openstack recordset list server.education.

+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name              | type | records                                                                       | status | action |
+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+
| 5372a4d9-89c4-4ca7-af50-cf82bbb4b9b3 | server.education. | SOA  | network.srv.world. dnsmaster.server.education. 1668139148 3567 600 86400 3600 | ACTIVE | NONE   |
| d24ada8c-0fd6-49d6-bff3-be1d1c34bf36 | server.education. | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+

[cent@dlp ~(keystone)]$
openstack zone list

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| 0890bae4-2239-4016-bf4e-107b2395ce7a | server.education.         | PRIMARY | 1668139148 | ACTIVE | NONE   |
| daaf8399-6e22-44d8-9436-71689c60cbf0 | 100.168.192.in-addr.arpa. | PRIMARY | 1668139029 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+

# delete the [server.education.] zone

[cent@dlp ~(keystone)]$
openstack zone delete server.education.

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | DELETE                               |
| attributes     |                                      |
| created_at     | 2022-11-11T03:54:10.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 0890bae4-2239-4016-bf4e-107b2395ce7a |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 28b6e37c787240e4a975d3614821cc71     |
| serial         | 1668139148                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | 2022-11-11T04:00:05.000000           |
| version        | 7                                    |
+----------------+--------------------------------------+

[cent@dlp ~(keystone)]$
openstack zone list

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| daaf8399-6e22-44d8-9436-71689c60cbf0 | 100.168.192.in-addr.arpa. | PRIMARY | 1668139029 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
Matched Content