Ubuntu 24.04
Sponsored Link

OpenStack Dalmatian : How to use Designate2024/10/18

 

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.
ubuntu@dlp ~(keystone)$
openstack zone create --email dnsmaster@server.education server.education.

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | CREATE                               |
| attributes     |                                      |
| created_at     | 2024-10-18T01:10:21.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 24dc751d-06f3-4909-91f4-cdeccf8afece |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 84e315c8d65e4b3cb33aaf69c9eed0c3     |
| serial         | 1729213821                           |
| shared         | False                                |
| 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 |
+------------------+------------------+---------+------------+--------+--------+
| 24dc751d-06f3-   | server.education | PRIMARY | 1729213821 | ACTIVE | NONE   |
| 4909-91f4-       | .                |         |            |        |        |
| cdeccf8afece     |                  |         |            |        |        |
+------------------+------------------+---------+------------+--------+--------+

# 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  | 2024-10-18T01:11:06.000000           |
| description | None                                 |
| id          | 8ace86ce-625d-4830-8713-09751c27cbae |
| name        | node01.server.education.             |
| project_id  | 84e315c8d65e4b3cb33aaf69c9eed0c3     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | 24dc751d-06f3-4909-91f4-cdeccf8afece |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

# OK if [status] is [ACTIVE]

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

+-----------------+-----------------+------+-----------------+--------+--------+
| id              | name            | type | records         | status | action |
+-----------------+-----------------+------+-----------------+--------+--------+
| ade31cf9-db96-  | server.educatio | SOA  | network.srv.wor | ACTIVE | NONE   |
| 46d3-b549-      | n.              |      | ld. dnsmaster.s |        |        |
| 5074ca90ebed    |                 |      | erver.education |        |        |
|                 |                 |      | . 1729213869    |        |        |
|                 |                 |      | 3519 600 86400  |        |        |
|                 |                 |      | 3600            |        |        |
| c4018d24-af3b-  | server.educatio | NS   | network.srv.wor | ACTIVE | NONE   |
| 425e-8821-      | n.              |      | ld.             |        |        |
| a82092ad39f0    |                 |      |                 |        |        |
| 8ace86ce-625d-  | node01.server.e | A    | 192.168.100.10  | ACTIVE | NONE   |
| 4830-8713-      | ducation.       |      |                 |        |        |
| 09751c27cbae    |                 |      |                 |        |        |
+-----------------+-----------------+------+-----------------+--------+--------+

# verify name resolution

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


; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> -p 5354 @network.srv.world node01.server.education.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62438
;; 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: 7 msec
;; SERVER: 10.0.0.50#5354(network.srv.world) (UDP)
;; WHEN: Fri Oct 18 01:12:19 UTC 2024
;; 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     | 2024-10-18T01:14:07.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 3623db25-0102-4476-a02f-45f4cfedcf55 |
| masters        |                                      |
| name           | 100.168.192.in-addr.arpa.            |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 84e315c8d65e4b3cb33aaf69c9eed0c3     |
| serial         | 1729214047                           |
| shared         | False                                |
| 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 |
+------------------+------------------+---------+------------+--------+--------+
| 24dc751d-06f3-   | server.education | PRIMARY | 1729213869 | ACTIVE | NONE   |
| 4909-91f4-       | .                |         |            |        |        |
| cdeccf8afece     |                  |         |            |        |        |
| 3623db25-0102-   | 100.168.192.in-  | PRIMARY | 1729214047 | ACTIVE | NONE   |
| 4476-a02f-       | addr.arpa.       |         |            |        |        |
| 45f4cfedcf55     |                  |         |            |        |        |
+------------------+------------------+---------+------------+--------+--------+

# 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  | 2024-10-18T01:14:59.000000           |
| description | None                                 |
| id          | 719f91d5-fb69-4bd8-888f-0715ad718ad5 |
| name        | 10.100.168.192.in-addr.arpa.         |
| project_id  | 84e315c8d65e4b3cb33aaf69c9eed0c3     |
| records     | node01.server.education.             |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | PTR                                  |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | 3623db25-0102-4476-a02f-45f4cfedcf55 |
| 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 | records         | status | action |
+-----------------+-----------------+------+-----------------+--------+--------+
| 86d80713-f147-  | 100.168.192.in- | NS   | network.srv.wor | ACTIVE | NONE   |
| 4b05-a584-      | addr.arpa.      |      | ld.             |        |        |
| 4880d00c3645    |                 |      |                 |        |        |
| 975337f3-d024-  | 100.168.192.in- | SOA  | network.srv.wor | ACTIVE | NONE   |
| 4aed-a82e-      | addr.arpa.      |      | ld. dnsmaster.s |        |        |
| 7a9afa9a8ebd    |                 |      | erver.education |        |        |
|                 |                 |      | . 1729214105    |        |        |
|                 |                 |      | 3563 600 86400  |        |        |
|                 |                 |      | 3600            |        |        |
| 719f91d5-fb69-  | 10.100.168.192. | PTR  | node01.server.e | ACTIVE | NONE   |
| 4bd8-888f-      | in-addr.arpa.   |      | ducation.       |        |        |
| 0715ad718ad5    |                 |      |                 |        |        |
+-----------------+-----------------+------+-----------------+--------+--------+

# verify address resolution

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


; <<>> DiG 9.18.28-0ubuntu0.24.04.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: 19921
;; 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(network.srv.world) (UDP)
;; WHEN: Fri Oct 18 01:15:47 UTC 2024
;; MSG SIZE  rcvd: 93
[3] To delete record or zone, do like follows.
ubuntu@dlp ~(keystone)$
openstack recordset list server.education.

+-----------------+-----------------+------+-----------------+--------+--------+
| id              | name            | type | records         | status | action |
+-----------------+-----------------+------+-----------------+--------+--------+
| ade31cf9-db96-  | server.educatio | SOA  | network.srv.wor | ACTIVE | NONE   |
| 46d3-b549-      | n.              |      | ld. dnsmaster.s |        |        |
| 5074ca90ebed    |                 |      | erver.education |        |        |
|                 |                 |      | . 1729213869    |        |        |
|                 |                 |      | 3519 600 86400  |        |        |
|                 |                 |      | 3600            |        |        |
| c4018d24-af3b-  | server.educatio | NS   | network.srv.wor | ACTIVE | NONE   |
| 425e-8821-      | n.              |      | ld.             |        |        |
| a82092ad39f0    |                 |      |                 |        |        |
| 8ace86ce-625d-  | node01.server.e | A    | 192.168.100.10  | ACTIVE | NONE   |
| 4830-8713-      | ducation.       |      |                 |        |        |
| 09751c27cbae    |                 |      |                 |        |        |
+-----------------+-----------------+------+-----------------+--------+--------+

# delete [node01] record

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

+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| action      | DELETE                               |
| created_at  | 2024-10-18T01:11:06.000000           |
| description | None                                 |
| id          | 8ace86ce-625d-4830-8713-09751c27cbae |
| name        | node01.server.education.             |
| project_id  | 84e315c8d65e4b3cb33aaf69c9eed0c3     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | 2024-10-18T01:17:33.000000           |
| version     | 2                                    |
| zone_id     | 24dc751d-06f3-4909-91f4-cdeccf8afece |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

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

+-----------------+-----------------+------+-----------------+--------+--------+
| id              | name            | type | records         | status | action |
+-----------------+-----------------+------+-----------------+--------+--------+
| ade31cf9-db96-  | server.educatio | SOA  | network.srv.wor | ACTIVE | NONE   |
| 46d3-b549-      | n.              |      | ld. dnsmaster.s |        |        |
| 5074ca90ebed    |                 |      | erver.education |        |        |
|                 |                 |      | . 1729214255    |        |        |
|                 |                 |      | 3519 600 86400  |        |        |
|                 |                 |      | 3600            |        |        |
| c4018d24-af3b-  | server.educatio | NS   | network.srv.wor | ACTIVE | NONE   |
| 425e-8821-      | n.              |      | ld.             |        |        |
| a82092ad39f0    |                 |      |                 |        |        |
+-----------------+-----------------+------+-----------------+--------+--------+

ubuntu@dlp ~(keystone)$
openstack zone list

+------------------+------------------+---------+------------+--------+--------+
| id               | name             | type    |     serial | status | action |
+------------------+------------------+---------+------------+--------+--------+
| 24dc751d-06f3-   | server.education | PRIMARY | 1729214255 | ACTIVE | NONE   |
| 4909-91f4-       | .                |         |            |        |        |
| cdeccf8afece     |                  |         |            |        |        |
| 3623db25-0102-   | 100.168.192.in-  | PRIMARY | 1729214105 | ACTIVE | NONE   |
| 4476-a02f-       | addr.arpa.       |         |            |        |        |
| 45f4cfedcf55     |                  |         |            |        |        |
+------------------+------------------+---------+------------+--------+--------+

# delete [server.education.] zone

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

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | DELETE                               |
| attributes     |                                      |
| created_at     | 2024-10-18T01:10:21.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 24dc751d-06f3-4909-91f4-cdeccf8afece |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | 84e315c8d65e4b3cb33aaf69c9eed0c3     |
| serial         | 1729214255                           |
| shared         | False                                |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | 2024-10-18T01:18:49.000000           |
| version        | 7                                    |
+----------------+--------------------------------------+

ubuntu@dlp ~(keystone)$
openstack zone list

+------------------+------------------+---------+------------+--------+--------+
| id               | name             | type    |     serial | status | action |
+------------------+------------------+---------+------------+--------+--------+
| 3623db25-0102-   | 100.168.192.in-  | PRIMARY | 1729214105 | ACTIVE | NONE   |
| 4476-a02f-       | addr.arpa.       |         |            |        |        |
| 45f4cfedcf55     |                  |         |            |        |        |
+------------------+------------------+---------+------------+--------+--------+
Matched Content