Ubuntu 20.04
Sponsored Link

OpenStack Ussuri : How to use Designate2020/06/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
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Network Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Linux Bridge     |   |        Libvirt        |
|  Memcached  httpd     |   |   L2 Agent L3 Agent   |   |     Nova Compute      |
|  Keystone   Glance    |   |     Metadata Agent    |   |      Linux Bridge     |
|  Nova API  Cinder API |   |     Cinder Volume     |   |        L2 Agent       |
|  Neutron Server       |   |        Heat API       |   |                       |
|  Metadata Agent       |   |      Heat Engine      |   |                       |
|                       |   |   Designate Services  |   |                       |
|                       |   |   named               |   |                       |
+-----------------------+   +-----------------------+   +-----------------------+

[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     | 2020-06-18T04:15:05.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | d8b23b7b-7c93-4ec0-954a-1d088c4d47c8 |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | eaa8de359ae0451d944a6401e688f730     |
| serial         | 1592453705                           |
| 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 |
+--------------------------------------+-------------------+---------+------------+--------+--------+
| d8b23b7b-7c93-4ec0-954a-1d088c4d47c8 | server.education. | PRIMARY | 1592453705 | 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  | 2020-06-18T04:15:47.000000           |
| description | None                                 |
| id          | d40e7c01-aa19-4434-b1cd-0aca0a657ff2 |
| name        | node01.server.education.             |
| project_id  | eaa8de359ae0451d944a6401e688f730     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | d8b23b7b-7c93-4ec0-954a-1d088c4d47c8 |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

# OK if [status] is [ACTIVE]

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

+--------------------------------------+--------------------------+------
| id                                   | name                     | type 
+--------------------------------------+--------------------------+------
| 758b4fe0-1133-4a27-ab33-547a67aca956 | server.education.        | NS   
| ad0b6cab-ea8b-4484-acaa-43c2b430e3dc | server.education.        | SOA  
| d40e7c01-aa19-4434-b1cd-0aca0a657ff2 | node01.server.education. | A    
+--------------------------------------+--------------------------+------
+-------------------------------------------------------------------------------+--------+--------+
| records                                                                       | status | action |
+-------------------------------------------------------------------------------+--------+--------+
| network.srv.world.                                                            | ACTIVE | NONE   |
| network.srv.world. dnsmaster.server.education. 1592453747 3519 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: 98
;; 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: 20 msec
;; SERVER: 10.0.0.50#5354(10.0.0.50)
;; WHEN: Thu Jun 18 13:16:40 JST 2020
;; 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     | 2020-06-18T04:17:19.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | d801126b-381b-46ef-a3c3-ae83defb8eef |
| masters        |                                      |
| name           | 100.168.192.in-addr.arpa.            |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | eaa8de359ae0451d944a6401e688f730     |
| serial         | 1592453839                           |
| 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 |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| d8b23b7b-7c93-4ec0-954a-1d088c4d47c8 | server.education.         | PRIMARY | 1592453747 | ACTIVE | NONE   |
| d801126b-381b-46ef-a3c3-ae83defb8eef | 100.168.192.in-addr.arpa. | PRIMARY | 1592453839 | 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  | 2020-06-18T04:17:58.000000           |
| description | None                                 |
| id          | d955d738-3c6c-493e-b9a5-502993eaaadf |
| name        | 10.100.168.192.in-addr.arpa.         |
| project_id  | eaa8de359ae0451d944a6401e688f730     |
| records     | node01.server.education.             |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | PTR                                  |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | d801126b-381b-46ef-a3c3-ae83defb8eef |
| 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 
+--------------------------------------+------------------------------+------
| 094a4f4f-1847-4ecf-b49b-b1a080023dd1 | 100.168.192.in-addr.arpa.    | NS   
| ec6a7f71-8020-4ea3-b1bd-1a68947788b2 | 100.168.192.in-addr.arpa.    | SOA  
| d955d738-3c6c-493e-b9a5-502993eaaadf | 10.100.168.192.in-addr.arpa. | PTR  
+--------------------------------------+------------------------------+------
+-------------------------------------------------------------------------------+--------+--------+
| records                                                                       | status | action |
+-------------------------------------------------------------------------------+--------+--------+
| network.srv.world.                                                            | ACTIVE | NONE   |
| network.srv.world. dnsmaster.server.education. 1592453878 3556 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: 56002
;; 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: Thu Jun 18 13:18:37 JST 2020
;; MSG SIZE  rcvd: 93
[3] To delete record or zone, do like follows.
ubuntu@dlp ~(keystone)$
openstack recordset list server.education.

+--------------------------------------+--------------------------+------
| id                                   | name                     | type 
+--------------------------------------+--------------------------+------
| 758b4fe0-1133-4a27-ab33-547a67aca956 | server.education.        | NS   
| ad0b6cab-ea8b-4484-acaa-43c2b430e3dc | server.education.        | SOA  
| d40e7c01-aa19-4434-b1cd-0aca0a657ff2 | node01.server.education. | A    
+--------------------------------------+--------------------------+------
+-------------------------------------------------------------------------------+--------+--------+
| records                                                                       | status | action |
+-------------------------------------------------------------------------------+--------+--------+
| network.srv.world.                                                            | ACTIVE | NONE   |
| network.srv.world. dnsmaster.server.education. 1592453747 3519 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  | 2020-06-18T04:15:47.000000           |
| description | None                                 |
| id          | d40e7c01-aa19-4434-b1cd-0aca0a657ff2 |
| name        | node01.server.education.             |
| project_id  | eaa8de359ae0451d944a6401e688f730     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | 2020-06-18T04:19:56.000000           |
| version     | 2                                    |
| zone_id     | d8b23b7b-7c93-4ec0-954a-1d088c4d47c8 |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

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

+--------------------------------------+-------------------+------
| id                                   | name              | type 
+--------------------------------------+-------------------+------
| 758b4fe0-1133-4a27-ab33-547a67aca956 | server.education. | NS   
| ad0b6cab-ea8b-4484-acaa-43c2b430e3dc | server.education. | SOA  
+--------------------------------------+-------------------+------
+-------------------------------------------------------------------------------+--------+--------+
| records                                                                       | status | action |
+-------------------------------------------------------------------------------+--------+--------+
| network.srv.world.                                                            | ACTIVE | NONE   |
| network.srv.world. dnsmaster.server.education. 1592453996 3519 600 86400 3600 | ACTIVE | NONE   |
+-------------------------------------------------------------------------------+--------+--------+

ubuntu@dlp ~(keystone)$
openstack zone list

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| d8b23b7b-7c93-4ec0-954a-1d088c4d47c8 | server.education.         | PRIMARY | 1592453996 | ACTIVE | NONE   |
| d801126b-381b-46ef-a3c3-ae83defb8eef | 100.168.192.in-addr.arpa. | PRIMARY | 1592453878 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+

# delete [server.education.] zone

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

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | DELETE                               |
| attributes     |                                      |
| created_at     | 2020-06-18T04:15:05.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | d8b23b7b-7c93-4ec0-954a-1d088c4d47c8 |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | eaa8de359ae0451d944a6401e688f730     |
| serial         | 1592453996                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | 2020-06-18T04:20:50.000000           |
| version        | 7                                    |
+----------------+--------------------------------------+

ubuntu@dlp ~(keystone)$
openstack zone list

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| d801126b-381b-46ef-a3c3-ae83defb8eef | 100.168.192.in-addr.arpa. | PRIMARY | 1592453878 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
Matched Content