OpenStack Zed : How to use Designate2023/06/29 |
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 | | Neutron L2/L3 Agent | | Libvirt | | Memcached Nginx | | Neutron Metadata | | Nova Compute | | Keystone httpd | | Open vSwitch | | Neutron L2 Agent | | Glance Nova API | | iSCSI Target | | Open vSwitch | | Neutron Server | | Cinder Volume | | | | Neutron Metadata | | Designate Services | | | | Cinder API | | Nginx | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[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. |
debian@dlp ~(keystone)$ openstack zone create --email dnsmaster@server.education server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2023-06-29T08:17:31.000000 | | description | None | | email | dnsmaster@server.education | | id | c017890d-7930-466d-aae3-f2232dc8f116 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | serial | 1688026651 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | None | | version | 1 | +----------------+--------------------------------------+ # OK if [status] is [ACTIVE] debian@dlp ~(keystone)$ openstack zone list +--------------------------------------+-------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+-------------------+---------+------------+--------+--------+ | c017890d-7930-466d-aae3-f2232dc8f116 | server.education. | PRIMARY | 1688026651 | ACTIVE | NONE | +--------------------------------------+-------------------+---------+------------+--------+--------+ # add [A] record debian@dlp ~(keystone)$ openstack recordset create --record '192.168.100.10' --type A server.education. node01 +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2023-06-29T08:20:40.000000 | | description | None | | id | aa5fc3fb-e423-4ea9-afd6-c3521a89e1bd | | name | node01.server.education. | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | c017890d-7930-466d-aae3-f2232dc8f116 | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] debian@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+--------------------------+------ | id | name | type +--------------------------------------+--------------------------+------ | ba9220c4-d9e7-44af-85cd-92e7b129edd3 | server.education. | NS | ea3afabb-43df-45cb-811a-bf85f5e8c9c4 | server.education. | SOA | aa5fc3fb-e423-4ea9-afd6-c3521a89e1bd | node01.server.education. | A +--------------------------------------+--------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1688026840 3584 600 86400 3600 | ACTIVE | NONE | | 192.168.100.10 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # verify resolution debian@dlp ~(keystone)$ dig -p 5354 @network.srv.world node01.server.education. ; <<>> DiG 9.18.12-1-Debian <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46807 ;; 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: Thu Jun 29 03:21:27 CDT 2023 ;; MSG SIZE rcvd: 68 |
[2] | For example, create a [192.168.100.0/24] reverse zone. |
debian@dlp ~(keystone)$ openstack zone create --email dnsmaster@server.education 100.168.192.in-addr.arpa. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2023-06-29T08:22:07.000000 | | description | None | | email | dnsmaster@server.education | | id | 3f35c8f8-cf52-4819-b894-e0c5a6857645 | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | serial | 1688026927 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | None | | version | 1 | +----------------+--------------------------------------+ # OK if [status] is [ACTIVE] debian@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | c017890d-7930-466d-aae3-f2232dc8f116 | server.education. | PRIMARY | 1688026840 | ACTIVE | NONE | | 3f35c8f8-cf52-4819-b894-e0c5a6857645 | 100.168.192.in-addr.arpa. | PRIMARY | 1688026927 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # add PTR record debian@dlp ~(keystone)$ openstack recordset create --record 'node01.server.education.' --type PTR 100.168.192.in-addr.arpa. 10 +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2023-06-29T08:22:48.000000 | | description | None | | id | 42065b93-387c-435b-8f46-d0893e61d7f9 | | name | 10.100.168.192.in-addr.arpa. | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 3f35c8f8-cf52-4819-b894-e0c5a6857645 | | zone_name | 100.168.192.in-addr.arpa. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] debian@dlp ~(keystone)$ openstack recordset list 100.168.192.in-addr.arpa. +--------------------------------------+------------------------------+------ | id | name | type +--------------------------------------+------------------------------+------ | 098da994-8d45-4c3e-a330-f868ffa40602 | 100.168.192.in-addr.arpa. | NS | 0fb679ed-0106-44dc-b0b7-ae817a4e2507 | 100.168.192.in-addr.arpa. | SOA | 42065b93-387c-435b-8f46-d0893e61d7f9 | 10.100.168.192.in-addr.arpa. | PTR +--------------------------------------+------------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1688026968 3513 600 86400 3600 | ACTIVE | NONE | | node01.server.education. | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # verify resolution debian@dlp ~(keystone)$ dig -p 5354 @network.srv.world -x 192.168.100.10 ; <<>> DiG 9.18.12-1-Debian <<>> -p 5354 @network.srv.world -x 192.168.100.10 ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19808 ;; 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: 7 msec ;; SERVER: 10.0.0.50#5354(network.srv.world) (UDP) ;; WHEN: Thu Jun 29 03:23:42 CDT 2023 ;; MSG SIZE rcvd: 93 |
[3] | To delete record or zone, do like follows. |
debian@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+--------------------------+------ | id | name | type +--------------------------------------+--------------------------+------ | ba9220c4-d9e7-44af-85cd-92e7b129edd3 | server.education. | NS | ea3afabb-43df-45cb-811a-bf85f5e8c9c4 | server.education. | SOA | aa5fc3fb-e423-4ea9-afd6-c3521a89e1bd | node01.server.education. | A +--------------------------------------+--------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1688026840 3584 600 86400 3600 | ACTIVE | NONE | | 192.168.100.10 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # delete [node01] record debian@dlp ~(keystone)$ openstack recordset delete server.education. node01.server.education. +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | DELETE | | created_at | 2023-06-29T08:20:40.000000 | | description | None | | id | aa5fc3fb-e423-4ea9-afd6-c3521a89e1bd | | name | node01.server.education. | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2023-06-29T08:24:46.000000 | | version | 2 | | zone_id | c017890d-7930-466d-aae3-f2232dc8f116 | | zone_name | server.education. | +-------------+--------------------------------------+debian@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-------------------+------ | id | name | type +--------------------------------------+-------------------+------ | ba9220c4-d9e7-44af-85cd-92e7b129edd3 | server.education. | NS | ea3afabb-43df-45cb-811a-bf85f5e8c9c4 | server.education. | SOA +--------------------------------------+-------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1688027086 3584 600 86400 3600 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+debian@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | c017890d-7930-466d-aae3-f2232dc8f116 | server.education. | PRIMARY | 1688027086 | ACTIVE | NONE | | 3f35c8f8-cf52-4819-b894-e0c5a6857645 | 100.168.192.in-addr.arpa. | PRIMARY | 1688026968 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # delete [server.education.] zone debian@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2023-06-29T08:17:31.000000 | | description | None | | email | dnsmaster@server.education | | id | c017890d-7930-466d-aae3-f2232dc8f116 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | serial | 1688027086 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2023-06-29T08:25:50.000000 | | version | 7 | +----------------+--------------------------------------+debian@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 3f35c8f8-cf52-4819-b894-e0c5a6857645 | 100.168.192.in-addr.arpa. | PRIMARY | 1688026968 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |
|