OpenStack Caracal : How to use Designate2024/05/23 |
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 | | | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[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-05-23T00:06:21.000000 | | description | None | | email | dnsmaster@server.education | | id | c7b2b8c5-a6b9-4d67-89ce-4349dff30f6e | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 18ede7365bdc430093e8fd4a90f77369 | | serial | 1716422781 | | 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 | +------------------+------------------+---------+------------+--------+--------+ | c7b2b8c5-a6b9- | server.education | PRIMARY | 1716422781 | ACTIVE | NONE | | 4d67-89ce- | . | | | | | | 4349dff30f6e | | | | | | +------------------+------------------+---------+------------+--------+--------+ # 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-05-23T00:07:11.000000 | | description | None | | id | 60137405-e2b1-450f-9bd2-2a7c382cf5b8 | | name | node01.server.education. | | project_id | 18ede7365bdc430093e8fd4a90f77369 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | c7b2b8c5-a6b9-4d67-89ce-4349dff30f6e | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +-----------------+-----------------+------+-----------------+--------+--------+ | id | name | type | records | status | action | +-----------------+-----------------+------+-----------------+--------+--------+ | 476ede5d-e842- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4d0d-afbb- | n. | | ld. dnsmaster.s | | | | 21d29169703a | | | erver.education | | | | | | | . 1716422836 | | | | | | | 3562 600 86400 | | | | | | | 3600 | | | | 9e547551-6766- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 4c3a-9841- | n. | | ld. | | | | 610c2ba525f5 | | | | | | | 60137405-e2b1- | node01.server.e | A | 192.168.100.10 | ACTIVE | NONE | | 450f-9bd2- | ducation. | | | | | | 2a7c382cf5b8 | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # verify resolution ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world node01.server.education. ; <<>> DiG 9.18.24-0ubuntu5-Ubuntu <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22611 ;; 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: 8 msec ;; SERVER: 10.0.0.50#5354(network.srv.world) (UDP) ;; WHEN: Thu May 23 00:10:03 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-05-23T00:11:18.000000 | | description | None | | email | dnsmaster@server.education | | id | 5df48c9f-5b98-410b-9416-42886a049ad0 | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 18ede7365bdc430093e8fd4a90f77369 | | serial | 1716423078 | | 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 | +------------------+------------------+---------+------------+--------+--------+ | c7b2b8c5-a6b9- | server.education | PRIMARY | 1716422836 | ACTIVE | NONE | | 4d67-89ce- | . | | | | | | 4349dff30f6e | | | | | | | 5df48c9f-5b98- | 100.168.192.in- | PRIMARY | 1716423078 | ACTIVE | NONE | | 410b-9416- | addr.arpa. | | | | | | 42886a049ad0 | | | | | | +------------------+------------------+---------+------------+--------+--------+ # 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-05-23T00:12:05.000000 | | description | None | | id | a90cb3e7-087c-4920-979b-7977aedd69eb | | name | 10.100.168.192.in-addr.arpa. | | project_id | 18ede7365bdc430093e8fd4a90f77369 | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 5df48c9f-5b98-410b-9416-42886a049ad0 | | 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 | +-----------------+-----------------+------+-----------------+--------+--------+ | 6ec5d1cb-597b- | 100.168.192.in- | SOA | network.srv.wor | ACTIVE | NONE | | 4a20-9599- | addr.arpa. | | ld. dnsmaster.s | | | | 7aadfb7763a3 | | | erver.education | | | | | | | . 1716423126 | | | | | | | 3577 600 86400 | | | | | | | 3600 | | | | a4399210-60bd- | 100.168.192.in- | NS | network.srv.wor | ACTIVE | NONE | | 453a-bd4c- | addr.arpa. | | ld. | | | | 241ed444f8c7 | | | | | | | a90cb3e7-087c- | 10.100.168.192. | PTR | node01.server.e | ACTIVE | NONE | | 4920-979b- | in-addr.arpa. | | ducation. | | | | 7977aedd69eb | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # verify resolution ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world -x 192.168.100.10 ; <<>> DiG 9.18.24-0ubuntu5-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: 10882 ;; 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: 9 msec ;; SERVER: 10.0.0.50#5354(network.srv.world) (UDP) ;; WHEN: Thu May 23 00:12:56 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 | +-----------------+-----------------+------+-----------------+--------+--------+ | 476ede5d-e842- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4d0d-afbb- | n. | | ld. dnsmaster.s | | | | 21d29169703a | | | erver.education | | | | | | | . 1716422836 | | | | | | | 3562 600 86400 | | | | | | | 3600 | | | | 9e547551-6766- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 4c3a-9841- | n. | | ld. | | | | 610c2ba525f5 | | | | | | | 60137405-e2b1- | node01.server.e | A | 192.168.100.10 | ACTIVE | NONE | | 450f-9bd2- | ducation. | | | | | | 2a7c382cf5b8 | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # delete [node01] record ubuntu@dlp ~(keystone)$ openstack recordset delete server.education. node01.server.education. +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | DELETE | | created_at | 2024-05-23T00:07:11.000000 | | description | None | | id | 60137405-e2b1-450f-9bd2-2a7c382cf5b8 | | name | node01.server.education. | | project_id | 18ede7365bdc430093e8fd4a90f77369 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2024-05-23T00:14:09.000000 | | version | 2 | | zone_id | c7b2b8c5-a6b9-4d67-89ce-4349dff30f6e | | zone_name | server.education. | +-------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +-----------------+-----------------+------+-----------------+--------+--------+ | id | name | type | records | status | action | +-----------------+-----------------+------+-----------------+--------+--------+ | 476ede5d-e842- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4d0d-afbb- | n. | | ld. dnsmaster.s | | | | 21d29169703a | | | erver.education | | | | | | | . 1716423251 | | | | | | | 3562 600 86400 | | | | | | | 3600 | | | | 9e547551-6766- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 4c3a-9841- | n. | | ld. | | | | 610c2ba525f5 | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ubuntu@dlp ~(keystone)$ openstack zone list +------------------+------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +------------------+------------------+---------+------------+--------+--------+ | c7b2b8c5-a6b9- | server.education | PRIMARY | 1716423251 | ACTIVE | NONE | | 4d67-89ce- | . | | | | | | 4349dff30f6e | | | | | | | 5df48c9f-5b98- | 100.168.192.in- | PRIMARY | 1716423126 | ACTIVE | NONE | | 410b-9416- | addr.arpa. | | | | | | 42886a049ad0 | | | | | | +------------------+------------------+---------+------------+--------+--------+ # delete [server.education.] zone ubuntu@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2024-05-23T00:06:21.000000 | | description | None | | email | dnsmaster@server.education | | id | c7b2b8c5-a6b9-4d67-89ce-4349dff30f6e | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 18ede7365bdc430093e8fd4a90f77369 | | serial | 1716423251 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2024-05-23T00:15:22.000000 | | version | 7 | +----------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack zone list +------------------+------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +------------------+------------------+---------+------------+--------+--------+ | 5df48c9f-5b98- | 100.168.192.in- | PRIMARY | 1716423126 | ACTIVE | NONE | | 410b-9416- | addr.arpa. | | | | | | 42886a049ad0 | | | | | | +------------------+------------------+---------+------------+--------+--------+ |
Sponsored Link |
|