OpenStack Caracal : How to use Designate2024/08/07 |
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. |
[cent@dlp ~(keystone)]$ openstack zone create --email dnsmaster@server.education server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2024-08-07T07:09:29.000000 | | description | None | | email | dnsmaster@server.education | | id | 2de35275-669b-46a4-9849-4f2c1d44454b | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 03a31c43ede44dcbaacb05c870920e81 | | serial | 1723014569 | | shared | False | | 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 | +--------------------------------------+-------------------+---------+------------+--------+--------+ | 2de35275-669b-46a4-9849-4f2c1d44454b | server.education. | PRIMARY | 1723014569 | 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 | 2024-08-07T07:10:00.000000 | | description | None | | id | 17f6cfa4-6cc7-4bf0-9b26-530d5124d2c6 | | name | node01.server.education. | | project_id | 03a31c43ede44dcbaacb05c870920e81 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | 2de35275-669b-46a4-9849-4f2c1d44454b | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] [cent@dlp ~(keystone)]$ openstack recordset list server.education. +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 53e11f72-0bc0-4adb-9651-3135d850594d | server.education. | NS | network.srv.world. | ACTIVE | NONE | | bf96c40d-7785-4ee2-91bd-97f49508a7dd | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1723014602 3569 600 86400 3600 | ACTIVE | NONE | | 17f6cfa4-6cc7-4bf0-9b26-530d5124d2c6 | 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.16.23-RH <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 46974 ;; 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: 10 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Wed Aug 07 16:10:41 JST 2024 ;; 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 | 2024-08-07T07:11:55.000000 | | description | None | | email | dnsmaster@server.education | | id | 2d59b1dc-0b58-4691-964a-a2837a84c87a | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 03a31c43ede44dcbaacb05c870920e81 | | serial | 1723014715 | | shared | False | | 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 | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 2de35275-669b-46a4-9849-4f2c1d44454b | server.education. | PRIMARY | 1723014602 | ACTIVE | NONE | | 2d59b1dc-0b58-4691-964a-a2837a84c87a | 100.168.192.in-addr.arpa. | PRIMARY | 1723014715 | 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 | 2024-08-07T07:12:50.000000 | | description | None | | id | 9c7f51c7-175f-4186-9a38-8f3499e23c61 | | name | 10.100.168.192.in-addr.arpa. | | project_id | 03a31c43ede44dcbaacb05c870920e81 | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 2d59b1dc-0b58-4691-964a-a2837a84c87a | | 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 | +--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 7f298cbf-b1f1-4288-b3f4-6f190d874f2b | 100.168.192.in-addr.arpa. | SOA | network.srv.world. dnsmaster.server.education. 1723014772 3597 600 86400 3600 | ACTIVE | NONE | | e1c1098f-1666-4bd6-ba19-f8f6e7f35bf3 | 100.168.192.in-addr.arpa. | NS | network.srv.world. | ACTIVE | NONE | | 9c7f51c7-175f-4186-9a38-8f3499e23c61 | 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.16.23-RH <<>> -p 5354 @network.srv.world -x 192.168.100.10 ; (1 server found) ;; global options: +cmd ;; Got answer: ;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 50377 ;; 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: 10 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Wed Aug 07 16:13:26 JST 2024 ;; 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 | +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 53e11f72-0bc0-4adb-9651-3135d850594d | server.education. | NS | network.srv.world. | ACTIVE | NONE | | bf96c40d-7785-4ee2-91bd-97f49508a7dd | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1723014602 3569 600 86400 3600 | ACTIVE | NONE | | 17f6cfa4-6cc7-4bf0-9b26-530d5124d2c6 | 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 | 2024-08-07T07:10:00.000000 | | description | None | | id | 17f6cfa4-6cc7-4bf0-9b26-530d5124d2c6 | | name | node01.server.education. | | project_id | 03a31c43ede44dcbaacb05c870920e81 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2024-08-07T07:14:22.000000 | | version | 2 | | zone_id | 2de35275-669b-46a4-9849-4f2c1d44454b | | zone_name | server.education. | +-------------+--------------------------------------+[cent@dlp ~(keystone)]$ openstack recordset list server.education. +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 53e11f72-0bc0-4adb-9651-3135d850594d | server.education. | NS | network.srv.world. | ACTIVE | NONE | | bf96c40d-7785-4ee2-91bd-97f49508a7dd | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1723014862 3569 600 86400 3600 | ACTIVE | NONE | +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+[cent@dlp ~(keystone)]$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 2de35275-669b-46a4-9849-4f2c1d44454b | server.education. | PRIMARY | 1723014862 | ACTIVE | NONE | | 2d59b1dc-0b58-4691-964a-a2837a84c87a | 100.168.192.in-addr.arpa. | PRIMARY | 1723014772 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # delete the [server.education.] zone [cent@dlp ~(keystone)]$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2024-08-07T07:09:29.000000 | | description | None | | email | dnsmaster@server.education | | id | 2de35275-669b-46a4-9849-4f2c1d44454b | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 03a31c43ede44dcbaacb05c870920e81 | | serial | 1723014862 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2024-08-07T07:15:13.000000 | | version | 7 | +----------------+--------------------------------------+[cent@dlp ~(keystone)]$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 2d59b1dc-0b58-4691-964a-a2837a84c87a | 100.168.192.in-addr.arpa. | PRIMARY | 1723014772 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |
|