CentOS Stream 8
Sponsored Link

OpenStack Wallaby : How to use Designate2021/04/26

 
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 ]   |   |    [ 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] 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     | 2021-04-26T02:10:33.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 40041ef7-d2e9-409c-8a31-5f12ec26bbd3 |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 9bdf6ca0e49a416da8df5554fbfdec74     |
| serial         | 1619403033                           |
| 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 |
+--------------------------------------+-------------------+---------+------------+--------+--------+
| 40041ef7-d2e9-409c-8a31-5f12ec26bbd3 | server.education. | PRIMARY | 1619403033 | 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  | 2021-04-26T02:11:02.000000           |
| description | None                                 |
| id          | 519832f3-7d88-4fdf-9a15-65af7a4c62a4 |
| name        | node01.server.education.             |
| project_id  | 9bdf6ca0e49a416da8df5554fbfdec74     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | 40041ef7-d2e9-409c-8a31-5f12ec26bbd3 |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

# OK if [status] is [ACTIVE]

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

+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name                     | type | records                                                                       | status | action |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| af895820-70e8-490d-92be-b7e3bdcfd955 | server.education.        | SOA  | network.srv.world. dnsmaster.server.education. 1619403062 3565 600 86400 3600 | ACTIVE | NONE   |
| e05a794b-ea18-4777-8a4f-d73a63b455e3 | server.education.        | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| 519832f3-7d88-4fdf-9a15-65af7a4c62a4 | 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.11.26-RedHat-9.11.26-3.el8 <<>> -p 5354 @network.srv.world node01.server.education.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 22216
;; 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: 22 msec
;; SERVER: 10.0.0.50#5354(10.0.0.50)
;; WHEN: Mon Apr 26 11:11:30 JST 2021
;; 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     | 2021-04-26T02:36:31.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 2070977a-256b-4dac-9e7a-4eb1cf270571 |
| masters        |                                      |
| name           | 100.168.192.in-addr.arpa.            |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 9bdf6ca0e49a416da8df5554fbfdec74     |
| serial         | 1619404591                           |
| 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 |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| 40041ef7-d2e9-409c-8a31-5f12ec26bbd3 | server.education.         | PRIMARY | 1619403062 | ACTIVE | NONE   |
| 2070977a-256b-4dac-9e7a-4eb1cf270571 | 100.168.192.in-addr.arpa. | PRIMARY | 1619404591 | 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  | 2021-04-26T02:37:17.000000           |
| description | None                                 |
| id          | 297d53b7-68c8-441b-9369-64c4b111ae21 |
| name        | 10.100.168.192.in-addr.arpa.         |
| project_id  | 9bdf6ca0e49a416da8df5554fbfdec74     |
| records     | node01.server.education.             |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | PTR                                  |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | 2070977a-256b-4dac-9e7a-4eb1cf270571 |
| 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 |
+--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| 09cb6a88-fbb2-4434-a19e-8554eb0d8dda | 100.168.192.in-addr.arpa.    | SOA  | network.srv.world. dnsmaster.server.education. 1619404637 3533 600 86400 3600 | ACTIVE | NONE   |
| 402774aa-7f5c-47ac-b13f-5328c9110b11 | 100.168.192.in-addr.arpa.    | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| 297d53b7-68c8-441b-9369-64c4b111ae21 | 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.11.26-RedHat-9.11.26-3.el8 <<>> -p 5354 @network.srv.world -x 192.168.100.10
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 50964
;; 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: 20 msec
;; SERVER: 10.0.0.50#5354(10.0.0.50)
;; WHEN: Mon Apr 26 11:37:48 JST 2021
;; 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 |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| af895820-70e8-490d-92be-b7e3bdcfd955 | server.education.        | SOA  | network.srv.world. dnsmaster.server.education. 1619403062 3565 600 86400 3600 | ACTIVE | NONE   |
| e05a794b-ea18-4777-8a4f-d73a63b455e3 | server.education.        | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| 519832f3-7d88-4fdf-9a15-65af7a4c62a4 | 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  | 2021-04-26T02:11:02.000000           |
| description | None                                 |
| id          | 519832f3-7d88-4fdf-9a15-65af7a4c62a4 |
| name        | node01.server.education.             |
| project_id  | 9bdf6ca0e49a416da8df5554fbfdec74     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | 2021-04-26T02:39:43.000000           |
| version     | 2                                    |
| zone_id     | 40041ef7-d2e9-409c-8a31-5f12ec26bbd3 |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

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

+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name              | type | records                                                                       | status | action |
+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+
| af895820-70e8-490d-92be-b7e3bdcfd955 | server.education. | SOA  | network.srv.world. dnsmaster.server.education. 1619404783 3565 600 86400 3600 | ACTIVE | NONE   |
| e05a794b-ea18-4777-8a4f-d73a63b455e3 | server.education. | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+

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

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| 40041ef7-d2e9-409c-8a31-5f12ec26bbd3 | server.education.         | PRIMARY | 1619404783 | ACTIVE | NONE   |
| 2070977a-256b-4dac-9e7a-4eb1cf270571 | 100.168.192.in-addr.arpa. | PRIMARY | 1619404637 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+

# delete the [server.education.] zone

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

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | DELETE                               |
| attributes     |                                      |
| created_at     | 2021-04-26T02:10:33.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 40041ef7-d2e9-409c-8a31-5f12ec26bbd3 |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 9bdf6ca0e49a416da8df5554fbfdec74     |
| serial         | 1619404783                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | 2021-04-26T02:40:30.000000           |
| version        | 7                                    |
+----------------+--------------------------------------+

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

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| 2070977a-256b-4dac-9e7a-4eb1cf270571 | 100.168.192.in-addr.arpa. | PRIMARY | 1619404637 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
Matched Content