OpenStack Caracal : How to use Designate2024/04/10 |
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-04-10T01:26:21.000000 | | description | None | | email | dnsmaster@server.education | | id | a4a72fc6-9cff-4222-b579-9473aa388c89 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 2bcdd2fecf1d4a8c8faf87f1232cf365 | | serial | 1712712381 | | 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 | +------------------+------------------+---------+------------+--------+--------+ | a4a72fc6-9cff- | server.education | PRIMARY | 1712712381 | ACTIVE | NONE | | 4222-b579- | . | | | | | | 9473aa388c89 | | | | | | +------------------+------------------+---------+------------+--------+--------+ # 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-04-10T01:26:59.000000 | | description | None | | id | f93fc4a3-b52b-4956-8b6a-857d4588fa4d | | name | node01.server.education. | | project_id | 2bcdd2fecf1d4a8c8faf87f1232cf365 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | a4a72fc6-9cff-4222-b579-9473aa388c89 | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +-----------------+-----------------+------+-----------------+--------+--------+ | id | name | type | records | status | action | +-----------------+-----------------+------+-----------------+--------+--------+ | 395baf22-35c5- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4ead-bd4b- | n. | | ld. dnsmaster.s | | | | 74b453cbf9f1 | | | erver.education | | | | | | | . 1712712423 | | | | | | | 3575 600 86400 | | | | | | | 3600 | | | | ef22b739-0f45- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 498e-96c3- | n. | | ld. | | | | ba19f3fa539b | | | | | | | f93fc4a3-b52b- | node01.server.e | A | 192.168.100.10 | ACTIVE | NONE | | 4956-8b6a- | ducation. | | | | | | 857d4588fa4d | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # verify resolution ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world node01.server.education. ; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62108 ;; 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: 35 msec ;; SERVER: 10.0.0.50#5354(network.srv.world) (UDP) ;; WHEN: Wed Apr 10 10:27:40 JST 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-04-10T01:28:28.000000 | | description | None | | email | dnsmaster@server.education | | id | 60e1a212-de74-4806-8f6a-23ebea0a01c8 | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 2bcdd2fecf1d4a8c8faf87f1232cf365 | | serial | 1712712508 | | 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 | +------------------+------------------+---------+------------+--------+--------+ | a4a72fc6-9cff- | server.education | PRIMARY | 1712712423 | ACTIVE | NONE | | 4222-b579- | . | | | | | | 9473aa388c89 | | | | | | | 60e1a212-de74- | 100.168.192.in- | PRIMARY | 1712712508 | ACTIVE | NONE | | 4806-8f6a- | addr.arpa. | | | | | | 23ebea0a01c8 | | | | | | +------------------+------------------+---------+------------+--------+--------+ # 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-04-10T01:29:05.000000 | | description | None | | id | 4178d75a-cf96-4750-b808-424602a4b19e | | name | 10.100.168.192.in-addr.arpa. | | project_id | 2bcdd2fecf1d4a8c8faf87f1232cf365 | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 60e1a212-de74-4806-8f6a-23ebea0a01c8 | | 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 | +-----------------+-----------------+------+-----------------+--------+--------+ | 7a01cc2a-6af7- | 100.168.192.in- | SOA | network.srv.wor | ACTIVE | NONE | | 44cb-9ed2- | addr.arpa. | | ld. dnsmaster.s | | | | 1d3c97a54eb3 | | | erver.education | | | | | | | . 1712712548 | | | | | | | 3576 600 86400 | | | | | | | 3600 | | | | fce95447-298a- | 100.168.192.in- | NS | network.srv.wor | ACTIVE | NONE | | 44dd-8b44- | addr.arpa. | | ld. | | | | d969c1688aa9 | | | | | | | 4178d75a-cf96- | 10.100.168.192. | PTR | node01.server.e | ACTIVE | NONE | | 4750-b808- | in-addr.arpa. | | ducation. | | | | 424602a4b19e | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # verify resolution ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world -x 192.168.100.10 ; <<>> DiG 9.18.18-0ubuntu0.22.04.2-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: 36252 ;; 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: 11 msec ;; SERVER: 10.0.0.50#5354(network.srv.world) (UDP) ;; WHEN: Wed Apr 10 10:29:40 JST 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 | +-----------------+-----------------+------+-----------------+--------+--------+ | 395baf22-35c5- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4ead-bd4b- | n. | | ld. dnsmaster.s | | | | 74b453cbf9f1 | | | erver.education | | | | | | | . 1712712423 | | | | | | | 3575 600 86400 | | | | | | | 3600 | | | | ef22b739-0f45- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 498e-96c3- | n. | | ld. | | | | ba19f3fa539b | | | | | | | f93fc4a3-b52b- | node01.server.e | A | 192.168.100.10 | ACTIVE | NONE | | 4956-8b6a- | ducation. | | | | | | 857d4588fa4d | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # delete [node01] record ubuntu@dlp ~(keystone)$ openstack recordset delete server.education. node01.server.education. +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | DELETE | | created_at | 2024-04-10T01:26:59.000000 | | description | None | | id | f93fc4a3-b52b-4956-8b6a-857d4588fa4d | | name | node01.server.education. | | project_id | 2bcdd2fecf1d4a8c8faf87f1232cf365 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2024-04-10T01:30:49.000000 | | version | 2 | | zone_id | a4a72fc6-9cff-4222-b579-9473aa388c89 | | zone_name | server.education. | +-------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +-----------------+-----------------+------+-----------------+--------+--------+ | id | name | type | records | status | action | +-----------------+-----------------+------+-----------------+--------+--------+ | 395baf22-35c5- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4ead-bd4b- | n. | | ld. dnsmaster.s | | | | 74b453cbf9f1 | | | erver.education | | | | | | | . 1712712653 | | | | | | | 3575 600 86400 | | | | | | | 3600 | | | | ef22b739-0f45- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 498e-96c3- | n. | | ld. | | | | ba19f3fa539b | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ubuntu@dlp ~(keystone)$ openstack zone list +------------------+------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +------------------+------------------+---------+------------+--------+--------+ | a4a72fc6-9cff- | server.education | PRIMARY | 1712712653 | ACTIVE | NONE | | 4222-b579- | . | | | | | | 9473aa388c89 | | | | | | | 60e1a212-de74- | 100.168.192.in- | PRIMARY | 1712712548 | ACTIVE | NONE | | 4806-8f6a- | addr.arpa. | | | | | | 23ebea0a01c8 | | | | | | +------------------+------------------+---------+------------+--------+--------+ # delete [server.education.] zone ubuntu@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2024-04-10T01:26:21.000000 | | description | None | | email | dnsmaster@server.education | | id | a4a72fc6-9cff-4222-b579-9473aa388c89 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 2bcdd2fecf1d4a8c8faf87f1232cf365 | | serial | 1712712653 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2024-04-10T01:31:45.000000 | | version | 7 | +----------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack zone list +------------------+------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +------------------+------------------+---------+------------+--------+--------+ | 60e1a212-de74- | 100.168.192.in- | PRIMARY | 1712712548 | ACTIVE | NONE | | 4806-8f6a- | addr.arpa. | | | | | | 23ebea0a01c8 | | | | | | +------------------+------------------+---------+------------+--------+--------+ |
Sponsored Link |
|