OpenStack Zed : How to use Designate2022/10/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 | | 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. |
ubuntu@dlp ~(keystone)$ openstack zone create --email dnsmaster@server.education server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2022-10-10T07:03:45.000000 | | description | None | | email | dnsmaster@server.education | | id | 27d37fa6-1729-47e3-a35c-395816093cfb | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 4dd1e1f6bac441ff9c77002c3ab4c58a | | serial | 1665385425 | | 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 | +--------------------------------------+-------------------+---------+------------+--------+--------+ | 27d37fa6-1729-47e3-a35c-395816093cfb | server.education. | PRIMARY | 1665385425 | ACTIVE | NONE | +--------------------------------------+-------------------+---------+------------+--------+--------+ # 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 | 2022-10-10T07:04:25.000000 | | description | None | | id | 2337604d-76f8-42e0-bc8c-d589434cec69 | | name | node01.server.education. | | project_id | 4dd1e1f6bac441ff9c77002c3ab4c58a | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | 27d37fa6-1729-47e3-a35c-395816093cfb | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+--------------------------+------ | id | name | type +--------------------------------------+--------------------------+------ | a54fe0f2-6356-446f-88aa-96d25adc31f8 | server.education. | NS | f1f0475e-11c7-4eba-b652-5deecbc0b347 | server.education. | SOA | 2337604d-76f8-42e0-bc8c-d589434cec69 | node01.server.education. | A +--------------------------------------+--------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1665385465 3546 600 86400 3600 | ACTIVE | NONE | | 192.168.100.10 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # verify resolution ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world node01.server.education. ; <<>> DiG 9.18.1-1ubuntu1.2-Ubuntu <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49235 ;; 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: Mon Oct 10 07:05:24 UTC 2022 ;; 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 | 2022-10-10T07:06:05.000000 | | description | None | | email | dnsmaster@server.education | | id | 6305834f-fd72-4b59-a715-51add1496957 | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 4dd1e1f6bac441ff9c77002c3ab4c58a | | serial | 1665385565 | | 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 | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 27d37fa6-1729-47e3-a35c-395816093cfb | server.education. | PRIMARY | 1665385465 | ACTIVE | NONE | | 6305834f-fd72-4b59-a715-51add1496957 | 100.168.192.in-addr.arpa. | PRIMARY | 1665385565 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # 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 | 2022-10-10T07:06:56.000000 | | description | None | | id | 24dca48d-51b1-45c0-8672-353756ab9d58 | | name | 10.100.168.192.in-addr.arpa. | | project_id | 4dd1e1f6bac441ff9c77002c3ab4c58a | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 6305834f-fd72-4b59-a715-51add1496957 | | 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 +--------------------------------------+------------------------------+------ | 8500cc5f-81c2-4beb-92c7-3f6391e3e717 | 100.168.192.in-addr.arpa. | SOA | d282f622-448b-4078-8480-dc3c200f4381 | 100.168.192.in-addr.arpa. | NS | 24dca48d-51b1-45c0-8672-353756ab9d58 | 10.100.168.192.in-addr.arpa. | PTR +--------------------------------------+------------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. dnsmaster.server.education. 1665385616 3577 600 86400 3600 | ACTIVE | NONE | | network.srv.world. | ACTIVE | NONE | | node01.server.education. | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # verify resolution ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world -x 192.168.100.10 ; <<>> DiG 9.18.1-1ubuntu1.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: 64210 ;; 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: Mon Oct 10 07:07:44 UTC 2022 ;; MSG SIZE rcvd: 93 |
[3] | To delete record or zone, do like follows. |
ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+--------------------------+------ | id | name | type +--------------------------------------+--------------------------+------ | a54fe0f2-6356-446f-88aa-96d25adc31f8 | server.education. | NS | f1f0475e-11c7-4eba-b652-5deecbc0b347 | server.education. | SOA | 2337604d-76f8-42e0-bc8c-d589434cec69 | node01.server.education. | A +--------------------------------------+--------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1665385465 3546 600 86400 3600 | ACTIVE | NONE | | 192.168.100.10 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # delete [node01] record ubuntu@dlp ~(keystone)$ openstack recordset delete server.education. node01.server.education. +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | DELETE | | created_at | 2022-10-10T07:04:25.000000 | | description | None | | id | 2337604d-76f8-42e0-bc8c-d589434cec69 | | name | node01.server.education. | | project_id | 4dd1e1f6bac441ff9c77002c3ab4c58a | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2022-10-10T07:09:05.000000 | | version | 2 | | zone_id | 27d37fa6-1729-47e3-a35c-395816093cfb | | zone_name | server.education. | +-------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-------------------+------ | id | name | type +--------------------------------------+-------------------+------ | a54fe0f2-6356-446f-88aa-96d25adc31f8 | server.education. | NS | f1f0475e-11c7-4eba-b652-5deecbc0b347 | server.education. | SOA +--------------------------------------+-------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1665385745 3546 600 86400 3600 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 27d37fa6-1729-47e3-a35c-395816093cfb | server.education. | PRIMARY | 1665385745 | ACTIVE | NONE | | 6305834f-fd72-4b59-a715-51add1496957 | 100.168.192.in-addr.arpa. | PRIMARY | 1665385616 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # delete [server.education.] zone ubuntu@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2022-10-10T07:03:45.000000 | | description | None | | email | dnsmaster@server.education | | id | 27d37fa6-1729-47e3-a35c-395816093cfb | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 4dd1e1f6bac441ff9c77002c3ab4c58a | | serial | 1665385745 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2022-10-10T07:10:15.000000 | | version | 7 | +----------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 6305834f-fd72-4b59-a715-51add1496957 | 100.168.192.in-addr.arpa. | PRIMARY | 1665385616 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |