CentOS 8
Sponsored Link

OpenStack Ussuri : How to use Designate2020/06/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
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Network Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Open vSwitch     |   |        Libvirt        |
|  Memcached  httpd     |   |        L2 Agent       |   |     Nova Compute      |
|  Keystone   Glance    |   |        L3 Agent       |   |      Open vSwitch     |
|  Nova API             |   |     Metadata Agent    |   |        L2 Agent       |
|  Neutron Server       |   |     Cinder Volume     |   |                       |
|  Metadata Agent       |   |   Heat API   API-CFN  |   |                       |
|  Cinder API           |   |   Heat Engine  Named  |   |                       |
|                       |   |   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     | 2020-06-10T05:27:35.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | ef0abc6c-4cf5-4435-ab08-eee94373f447 |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | d9c8c215499949cfb249b28bdaba848a     |
| serial         | 1591766855                           |
| 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 |
+--------------------------------------+-------------------+---------+------------+--------+--------+
| ef0abc6c-4cf5-4435-ab08-eee94373f447 | server.education. | PRIMARY | 1591766855 | 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  | 2020-06-10T05:28:35.000000           |
| description | None                                 |
| id          | 69e7d6ef-f350-4dbb-91de-2a407e076e86 |
| name        | node01.server.education.             |
| project_id  | d9c8c215499949cfb249b28bdaba848a     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | ef0abc6c-4cf5-4435-ab08-eee94373f447 |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

# OK if [status] is [ACTIVE]

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

+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name                     | type | records                                                                       | status | action |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| daa22212-355c-4473-a125-a8013c561fe5 | server.education.        | SOA  | network.srv.world. dnsmaster.server.education. 1591766915 3576 600 86400 3600 | ACTIVE | NONE   |
| f55b5e3a-5c88-40a4-a04d-f6ca9fbaddd6 | server.education.        | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| 69e7d6ef-f350-4dbb-91de-2a407e076e86 | 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.4-P2-RedHat-9.11.4-26.P2.el8 <<>> -p 5354 @network.srv.world node01.server.education.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 43815
;; 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: Wed Jun 10 14:29:43 JST 2020
;; 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     | 2020-06-10T05:30:24.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | 611b8646-cb32-4561-9552-c401815d2a59 |
| masters        |                                      |
| name           | 100.168.192.in-addr.arpa.            |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | d9c8c215499949cfb249b28bdaba848a     |
| serial         | 1591767024                           |
| 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 |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| ef0abc6c-4cf5-4435-ab08-eee94373f447 | server.education.         | PRIMARY | 1591766915 | ACTIVE | NONE   |
| 611b8646-cb32-4561-9552-c401815d2a59 | 100.168.192.in-addr.arpa. | PRIMARY | 1591767024 | 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  | 2020-06-10T05:31:00.000000           |
| description | None                                 |
| id          | a6b5503d-7dc1-414d-acde-c4e1156dc871 |
| name        | 10.100.168.192.in-addr.arpa.         |
| project_id  | d9c8c215499949cfb249b28bdaba848a     |
| records     | node01.server.education.             |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | PTR                                  |
| updated_at  | None                                 |
| version     | 1                                    |
| zone_id     | 611b8646-cb32-4561-9552-c401815d2a59 |
| 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 |
+--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| 0fd811b3-e78b-4fe6-be9f-39847af8209c | 100.168.192.in-addr.arpa.    | SOA  | network.srv.world. dnsmaster.server.education. 1591767060 3563 600 86400 3600 | ACTIVE | NONE   |
| b0531516-b82c-4b6e-a4e9-1b47244df9b0 | 100.168.192.in-addr.arpa.    | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| a6b5503d-7dc1-414d-acde-c4e1156dc871 | 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.4-P2-RedHat-9.11.4-26.P2.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: 1922
;; 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: 22 msec
;; SERVER: 10.0.0.50#5354(10.0.0.50)
;; WHEN: Wed Jun 10 14:31:37 JST 2020
;; MSG SIZE  rcvd: 93
[3] To delete record or zone, do like follows.
[cent@dlp ~(keystone)]$
openstack recordset list server.education.

+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name                     | type | records                                                                       | status | action |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+
| daa22212-355c-4473-a125-a8013c561fe5 | server.education.        | SOA  | network.srv.world. dnsmaster.server.education. 1591766915 3576 600 86400 3600 | ACTIVE | NONE   |
| f55b5e3a-5c88-40a4-a04d-f6ca9fbaddd6 | server.education.        | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
| 69e7d6ef-f350-4dbb-91de-2a407e076e86 | node01.server.education. | A    | 192.168.100.10                                                                | ACTIVE | NONE   |
+--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+

# delete [node01] record

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

+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| action      | DELETE                               |
| created_at  | 2020-06-10T05:28:35.000000           |
| description | None                                 |
| id          | 69e7d6ef-f350-4dbb-91de-2a407e076e86 |
| name        | node01.server.education.             |
| project_id  | d9c8c215499949cfb249b28bdaba848a     |
| records     | 192.168.100.10                       |
| status      | PENDING                              |
| ttl         | None                                 |
| type        | A                                    |
| updated_at  | 2020-06-10T05:32:46.000000           |
| version     | 2                                    |
| zone_id     | ef0abc6c-4cf5-4435-ab08-eee94373f447 |
| zone_name   | server.education.                    |
+-------------+--------------------------------------+

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

+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+
| id                                   | name              | type | records                                                                       | status | action |
+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+
| daa22212-355c-4473-a125-a8013c561fe5 | server.education. | SOA  | network.srv.world. dnsmaster.server.education. 1591767166 3576 600 86400 3600 | ACTIVE | NONE   |
| f55b5e3a-5c88-40a4-a04d-f6ca9fbaddd6 | server.education. | NS   | network.srv.world.                                                            | ACTIVE | NONE   |
+--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+

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

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| ef0abc6c-4cf5-4435-ab08-eee94373f447 | server.education.         | PRIMARY | 1591767166 | ACTIVE | NONE   |
| 611b8646-cb32-4561-9552-c401815d2a59 | 100.168.192.in-addr.arpa. | PRIMARY | 1591767060 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+

# delete [server.education.] zone

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

+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| action         | DELETE                               |
| attributes     |                                      |
| created_at     | 2020-06-10T05:27:35.000000           |
| description    | None                                 |
| email          | dnsmaster@server.education           |
| id             | ef0abc6c-4cf5-4435-ab08-eee94373f447 |
| masters        |                                      |
| name           | server.education.                    |
| pool_id        | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id     | d9c8c215499949cfb249b28bdaba848a     |
| serial         | 1591767166                           |
| status         | PENDING                              |
| transferred_at | None                                 |
| ttl            | 3600                                 |
| type           | PRIMARY                              |
| updated_at     | 2020-06-10T05:33:29.000000           |
| version        | 7                                    |
+----------------+--------------------------------------+

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

+--------------------------------------+---------------------------+---------+------------+--------+--------+
| id                                   | name                      | type    |     serial | status | action |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
| 611b8646-cb32-4561-9552-c401815d2a59 | 100.168.192.in-addr.arpa. | PRIMARY | 1591767060 | ACTIVE | NONE   |
+--------------------------------------+---------------------------+---------+------------+--------+--------+
Matched Content